File tree Expand file tree Collapse file tree 6 files changed +21
-25
lines changed
Expand file tree Collapse file tree 6 files changed +21
-25
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ async function main(folderId) {
2929 const name = `folders/${ folderId } /locations/global/floorSetting` ;
3030
3131 // Imports the Modelarmor library
32- const { ModelArmorClient } = require ( '@google-cloud/modelarmor' ) . v1 ;
32+ const { ModelArmorClient} = require ( '@google-cloud/modelarmor' ) . v1 ;
3333
3434 // Instantiates a client
3535 const modelarmorClient = new ModelArmorClient ( ) ;
@@ -42,7 +42,6 @@ async function main(folderId) {
4242
4343 const [ response ] = await modelarmorClient . getFloorSetting ( request ) ;
4444 return response ;
45-
4645 }
4746
4847 return await getFolderFloorSettings ( ) ;
@@ -61,4 +60,4 @@ if (require.main === module) {
6160 console . error ( err . message ) ;
6261 process . exitCode = 1 ;
6362 } ) ;
64- }
63+ }
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ async function main(organizationId) {
2929 const name = `organizations/${ organizationId } /locations/global/floorSetting` ;
3030
3131 // Imports the Modelarmor library
32- const { ModelArmorClient } = require ( '@google-cloud/modelarmor' ) . v1 ;
32+ const { ModelArmorClient} = require ( '@google-cloud/modelarmor' ) . v1 ;
3333
3434 // Instantiates a client
3535 const modelarmorClient = new ModelArmorClient ( ) ;
@@ -43,7 +43,6 @@ async function main(organizationId) {
4343 // Run request
4444 const [ response ] = await modelarmorClient . getFloorSetting ( request ) ;
4545 return response ;
46-
4746 }
4847
4948 return await getOrganizationFloorSettings ( ) ;
@@ -62,4 +61,4 @@ if (require.main === module) {
6261 console . error ( err . message ) ;
6362 process . exitCode = 1 ;
6463 } ) ;
65- }
64+ }
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ async function main(projectId) {
3030 const name = `projects/${ projectId } /locations/global/floorSetting` ;
3131
3232 // Imports the Modelarmor library
33- const { ModelArmorClient } = require ( '@google-cloud/modelarmor' ) . v1 ;
33+ const { ModelArmorClient} = require ( '@google-cloud/modelarmor' ) . v1 ;
3434
3535 // Instantiates a client
3636 const modelarmorClient = new ModelArmorClient ( ) ;
@@ -62,4 +62,4 @@ if (require.main === module) {
6262 console . error ( err . message ) ;
6363 process . exitCode = 1 ;
6464 } ) ;
65- }
65+ }
Original file line number Diff line number Diff line change @@ -28,14 +28,13 @@ async function main(folderId) {
2828
2929 // Imports the Model Armor library
3030 const modelarmor = require ( '@google-cloud/modelarmor' ) ;
31- const { ModelArmorClient } = modelarmor . v1 ;
32- const { protos } = modelarmor ;
31+ const { ModelArmorClient} = modelarmor . v1 ;
32+ const { protos} = modelarmor ;
3333
3434 // Instantiates a client
3535 const client = new ModelArmorClient ( ) ;
3636
3737 async function updateFolderFloorSettings ( ) {
38-
3938 const floorSettingsName = `folders/${ folderId } /locations/global/floorSetting` ;
4039
4140 // Build the floor settings with your preferred filters
@@ -55,7 +54,8 @@ async function main(folderId) {
5554 } ,
5655 {
5756 filterType :
58- protos . google . cloud . modelarmor . v1 . RaiFilterType . SEXUALLY_EXPLICIT ,
57+ protos . google . cloud . modelarmor . v1 . RaiFilterType
58+ . SEXUALLY_EXPLICIT ,
5959 confidenceLevel :
6060 protos . google . cloud . modelarmor . v1 . DetectionConfidenceLevel . HIGH ,
6161 } ,
@@ -71,7 +71,6 @@ async function main(folderId) {
7171
7272 const [ response ] = await client . updateFloorSetting ( request ) ;
7373 return response ;
74-
7574 }
7675
7776 return await updateFolderFloorSettings ( ) ;
@@ -90,4 +89,4 @@ if (require.main === module) {
9089 console . error ( err . message ) ;
9190 process . exitCode = 1 ;
9291 } ) ;
93- }
92+ }
Original file line number Diff line number Diff line change 2020 * @param {string } organizationId - Google Cloud organization ID for which floor settings need to be updated.
2121 */
2222async function main ( organizationId ) {
23-
2423 // [START modelarmor_update_organization_floor_settings]
2524 /**
2625 * TODO(developer): Uncomment these variables before running the sample.
2726 */
2827 // const organizationId = 'your-organization-id';
2928
3029 const modelarmor = require ( '@google-cloud/modelarmor' ) ;
31- const { ModelArmorClient } = modelarmor . v1 ;
32- const { protos } = modelarmor ;
30+ const { ModelArmorClient} = modelarmor . v1 ;
31+ const { protos} = modelarmor ;
3332
3433 const client = new ModelArmorClient ( ) ;
3534
3635 async function updateOrganizationFloorSettings ( ) {
37-
3836 const floorSettingsName = `organizations/${ organizationId } /locations/global/floorSetting` ;
3937
4038 // Build the floor settings with your preferred filters
@@ -54,7 +52,8 @@ async function main(organizationId) {
5452 } ,
5553 {
5654 filterType :
57- protos . google . cloud . modelarmor . v1 . RaiFilterType . SEXUALLY_EXPLICIT ,
55+ protos . google . cloud . modelarmor . v1 . RaiFilterType
56+ . SEXUALLY_EXPLICIT ,
5857 confidenceLevel :
5958 protos . google . cloud . modelarmor . v1 . DetectionConfidenceLevel . HIGH ,
6059 } ,
@@ -88,4 +87,4 @@ if (require.main === module) {
8887 console . error ( err . message ) ;
8988 process . exitCode = 1 ;
9089 } ) ;
91- }
90+ }
Original file line number Diff line number Diff line change @@ -27,14 +27,13 @@ async function main(projectId) {
2727 // const projectId = 'your-project-id';
2828
2929 const modelarmor = require ( '@google-cloud/modelarmor' ) ;
30- const { ModelArmorClient } = modelarmor . v1 ;
31- const { protos } = modelarmor ;
30+ const { ModelArmorClient} = modelarmor . v1 ;
31+ const { protos} = modelarmor ;
3232
3333 // Initiate client
3434 const client = new ModelArmorClient ( ) ;
3535
3636 async function updateProjectFloorSettings ( ) {
37-
3837 const floorSettingsName = `projects/${ projectId } /locations/global/floorSetting` ;
3938
4039 // Build the floor settings with your preferred filters
@@ -54,7 +53,8 @@ async function main(projectId) {
5453 } ,
5554 {
5655 filterType :
57- protos . google . cloud . modelarmor . v1 . RaiFilterType . SEXUALLY_EXPLICIT ,
56+ protos . google . cloud . modelarmor . v1 . RaiFilterType
57+ . SEXUALLY_EXPLICIT ,
5858 confidenceLevel :
5959 protos . google . cloud . modelarmor . v1 . DetectionConfidenceLevel . HIGH ,
6060 } ,
@@ -88,4 +88,4 @@ if (require.main === module) {
8888 console . error ( err . message ) ;
8989 process . exitCode = 1 ;
9090 } ) ;
91- }
91+ }
You can’t perform that action at this time.
0 commit comments