// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // Code generated by protoc-gen-go_gapic. DO NOT EDIT. package visionai_test import ( "context" "io" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" "google.golang.org/api/iterator" ) func ExampleNewWarehouseClient() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c } func ExampleNewWarehouseRESTClient() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c } func ExampleWarehouseClient_AddCollectionItem() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.AddCollectionItemRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#AddCollectionItemRequest. } resp, err := c.AddCollectionItem(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleWarehouseClient_AnalyzeAsset() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.AnalyzeAssetRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#AnalyzeAssetRequest. } op, err := c.AnalyzeAsset(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleWarehouseClient_AnalyzeCorpus() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.AnalyzeCorpusRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#AnalyzeCorpusRequest. } op, err := c.AnalyzeCorpus(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleWarehouseClient_ClipAsset() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.ClipAssetRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ClipAssetRequest. } resp, err := c.ClipAsset(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleWarehouseClient_CreateAnnotation() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.CreateAnnotationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#CreateAnnotationRequest. } resp, err := c.CreateAnnotation(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleWarehouseClient_CreateAsset() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.CreateAssetRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#CreateAssetRequest. } resp, err := c.CreateAsset(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleWarehouseClient_CreateCollection() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.CreateCollectionRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#CreateCollectionRequest. } op, err := c.CreateCollection(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleWarehouseClient_CreateCorpus() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.CreateCorpusRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#CreateCorpusRequest. } op, err := c.CreateCorpus(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleWarehouseClient_CreateDataSchema() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.CreateDataSchemaRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#CreateDataSchemaRequest. } resp, err := c.CreateDataSchema(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleWarehouseClient_CreateIndex() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.CreateIndexRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#CreateIndexRequest. } op, err := c.CreateIndex(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleWarehouseClient_CreateIndexEndpoint() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.CreateIndexEndpointRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#CreateIndexEndpointRequest. } op, err := c.CreateIndexEndpoint(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleWarehouseClient_CreateSearchConfig() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.CreateSearchConfigRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#CreateSearchConfigRequest. } resp, err := c.CreateSearchConfig(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleWarehouseClient_CreateSearchHypernym() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.CreateSearchHypernymRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#CreateSearchHypernymRequest. } resp, err := c.CreateSearchHypernym(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleWarehouseClient_DeleteAnnotation() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.DeleteAnnotationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#DeleteAnnotationRequest. } err = c.DeleteAnnotation(ctx, req) if err != nil { // TODO: Handle error. } } func ExampleWarehouseClient_DeleteAsset() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.DeleteAssetRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#DeleteAssetRequest. } op, err := c.DeleteAsset(ctx, req) if err != nil { // TODO: Handle error. } err = op.Wait(ctx) if err != nil { // TODO: Handle error. } } func ExampleWarehouseClient_DeleteCollection() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.DeleteCollectionRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#DeleteCollectionRequest. } op, err := c.DeleteCollection(ctx, req) if err != nil { // TODO: Handle error. } err = op.Wait(ctx) if err != nil { // TODO: Handle error. } } func ExampleWarehouseClient_DeleteCorpus() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.DeleteCorpusRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#DeleteCorpusRequest. } err = c.DeleteCorpus(ctx, req) if err != nil { // TODO: Handle error. } } func ExampleWarehouseClient_DeleteDataSchema() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.DeleteDataSchemaRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#DeleteDataSchemaRequest. } err = c.DeleteDataSchema(ctx, req) if err != nil { // TODO: Handle error. } } func ExampleWarehouseClient_DeleteIndex() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.DeleteIndexRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#DeleteIndexRequest. } op, err := c.DeleteIndex(ctx, req) if err != nil { // TODO: Handle error. } err = op.Wait(ctx) if err != nil { // TODO: Handle error. } } func ExampleWarehouseClient_DeleteIndexEndpoint() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.DeleteIndexEndpointRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#DeleteIndexEndpointRequest. } op, err := c.DeleteIndexEndpoint(ctx, req) if err != nil { // TODO: Handle error. } err = op.Wait(ctx) if err != nil { // TODO: Handle error. } } func ExampleWarehouseClient_DeleteSearchConfig() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.DeleteSearchConfigRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#DeleteSearchConfigRequest. } err = c.DeleteSearchConfig(ctx, req) if err != nil { // TODO: Handle error. } } func ExampleWarehouseClient_DeleteSearchHypernym() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.DeleteSearchHypernymRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#DeleteSearchHypernymRequest. } err = c.DeleteSearchHypernym(ctx, req) if err != nil { // TODO: Handle error. } } func ExampleWarehouseClient_DeployIndex() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.DeployIndexRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#DeployIndexRequest. } op, err := c.DeployIndex(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleWarehouseClient_GenerateHlsUri() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.GenerateHlsUriRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#GenerateHlsUriRequest. } resp, err := c.GenerateHlsUri(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleWarehouseClient_GenerateRetrievalUrl() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.GenerateRetrievalUrlRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#GenerateRetrievalUrlRequest. } resp, err := c.GenerateRetrievalUrl(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleWarehouseClient_GetAnnotation() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.GetAnnotationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#GetAnnotationRequest. } resp, err := c.GetAnnotation(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleWarehouseClient_GetAsset() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.GetAssetRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#GetAssetRequest. } resp, err := c.GetAsset(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleWarehouseClient_GetCollection() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.GetCollectionRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#GetCollectionRequest. } resp, err := c.GetCollection(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleWarehouseClient_GetCorpus() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.GetCorpusRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#GetCorpusRequest. } resp, err := c.GetCorpus(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleWarehouseClient_GetDataSchema() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.GetDataSchemaRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#GetDataSchemaRequest. } resp, err := c.GetDataSchema(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleWarehouseClient_GetIndex() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.GetIndexRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#GetIndexRequest. } resp, err := c.GetIndex(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleWarehouseClient_GetIndexEndpoint() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.GetIndexEndpointRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#GetIndexEndpointRequest. } resp, err := c.GetIndexEndpoint(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleWarehouseClient_GetSearchConfig() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.GetSearchConfigRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#GetSearchConfigRequest. } resp, err := c.GetSearchConfig(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleWarehouseClient_GetSearchHypernym() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.GetSearchHypernymRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#GetSearchHypernymRequest. } resp, err := c.GetSearchHypernym(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleWarehouseClient_ImportAssets() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.ImportAssetsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ImportAssetsRequest. } op, err := c.ImportAssets(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleWarehouseClient_IndexAsset() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.IndexAssetRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#IndexAssetRequest. } op, err := c.IndexAsset(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleWarehouseClient_IngestAsset() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() stream, err := c.IngestAsset(ctx) if err != nil { // TODO: Handle error. } go func() { reqs := []*visionaipb.IngestAssetRequest{ // TODO: Create requests. } for _, req := range reqs { if err := stream.Send(req); err != nil { // TODO: Handle error. } } stream.CloseSend() }() for { resp, err := stream.Recv() if err == io.EOF { break } if err != nil { // TODO: handle error. } // TODO: Use resp. _ = resp } } func ExampleWarehouseClient_ListAnnotations() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.ListAnnotationsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListAnnotationsRequest. } it := c.ListAnnotations(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*visionaipb.ListAnnotationsResponse) } } func ExampleWarehouseClient_ListAssets() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.ListAssetsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListAssetsRequest. } it := c.ListAssets(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*visionaipb.ListAssetsResponse) } } func ExampleWarehouseClient_ListCollections() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.ListCollectionsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListCollectionsRequest. } it := c.ListCollections(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*visionaipb.ListCollectionsResponse) } } func ExampleWarehouseClient_ListCorpora() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.ListCorporaRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListCorporaRequest. } it := c.ListCorpora(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*visionaipb.ListCorporaResponse) } } func ExampleWarehouseClient_ListDataSchemas() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.ListDataSchemasRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListDataSchemasRequest. } it := c.ListDataSchemas(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*visionaipb.ListDataSchemasResponse) } } func ExampleWarehouseClient_ListIndexEndpoints() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.ListIndexEndpointsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListIndexEndpointsRequest. } it := c.ListIndexEndpoints(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*visionaipb.ListIndexEndpointsResponse) } } func ExampleWarehouseClient_ListIndexes() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.ListIndexesRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListIndexesRequest. } it := c.ListIndexes(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*visionaipb.ListIndexesResponse) } } func ExampleWarehouseClient_ListSearchConfigs() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.ListSearchConfigsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListSearchConfigsRequest. } it := c.ListSearchConfigs(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*visionaipb.ListSearchConfigsResponse) } } func ExampleWarehouseClient_ListSearchHypernyms() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.ListSearchHypernymsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListSearchHypernymsRequest. } it := c.ListSearchHypernyms(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*visionaipb.ListSearchHypernymsResponse) } } func ExampleWarehouseClient_RemoveCollectionItem() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.RemoveCollectionItemRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#RemoveCollectionItemRequest. } resp, err := c.RemoveCollectionItem(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleWarehouseClient_RemoveIndexAsset() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.RemoveIndexAssetRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#RemoveIndexAssetRequest. } op, err := c.RemoveIndexAsset(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleWarehouseClient_SearchAssets() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.SearchAssetsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#SearchAssetsRequest. } it := c.SearchAssets(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*visionaipb.SearchAssetsResponse) } } func ExampleWarehouseClient_SearchIndexEndpoint() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.SearchIndexEndpointRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#SearchIndexEndpointRequest. } it := c.SearchIndexEndpoint(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*visionaipb.SearchIndexEndpointResponse) } } func ExampleWarehouseClient_UndeployIndex() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.UndeployIndexRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#UndeployIndexRequest. } op, err := c.UndeployIndex(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleWarehouseClient_UpdateAnnotation() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.UpdateAnnotationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#UpdateAnnotationRequest. } resp, err := c.UpdateAnnotation(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleWarehouseClient_UpdateAsset() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.UpdateAssetRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#UpdateAssetRequest. } resp, err := c.UpdateAsset(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleWarehouseClient_UpdateCollection() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.UpdateCollectionRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#UpdateCollectionRequest. } resp, err := c.UpdateCollection(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleWarehouseClient_UpdateCorpus() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.UpdateCorpusRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#UpdateCorpusRequest. } resp, err := c.UpdateCorpus(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleWarehouseClient_UpdateDataSchema() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.UpdateDataSchemaRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#UpdateDataSchemaRequest. } resp, err := c.UpdateDataSchema(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleWarehouseClient_UpdateIndex() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.UpdateIndexRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#UpdateIndexRequest. } op, err := c.UpdateIndex(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleWarehouseClient_UpdateIndexEndpoint() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.UpdateIndexEndpointRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#UpdateIndexEndpointRequest. } op, err := c.UpdateIndexEndpoint(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleWarehouseClient_UpdateSearchConfig() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.UpdateSearchConfigRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#UpdateSearchConfigRequest. } resp, err := c.UpdateSearchConfig(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleWarehouseClient_UpdateSearchHypernym() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.UpdateSearchHypernymRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#UpdateSearchHypernymRequest. } resp, err := c.UpdateSearchHypernym(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleWarehouseClient_UploadAsset() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.UploadAssetRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#UploadAssetRequest. } op, err := c.UploadAsset(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleWarehouseClient_ViewCollectionItems() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.ViewCollectionItemsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ViewCollectionItemsRequest. } it := c.ViewCollectionItems(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*visionaipb.ViewCollectionItemsResponse) } } func ExampleWarehouseClient_ViewIndexedAssets() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.ViewIndexedAssetsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ViewIndexedAssetsRequest. } it := c.ViewIndexedAssets(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*visionaipb.ViewIndexedAssetsResponse) } } func ExampleWarehouseClient_CancelOperation() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.CancelOperationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest. } err = c.CancelOperation(ctx, req) if err != nil { // TODO: Handle error. } } func ExampleWarehouseClient_DeleteOperation() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.DeleteOperationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#DeleteOperationRequest. } err = c.DeleteOperation(ctx, req) if err != nil { // TODO: Handle error. } } func ExampleWarehouseClient_GetOperation() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.GetOperationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest. } resp, err := c.GetOperation(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleWarehouseClient_ListOperations() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.ListOperationsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest. } it := c.ListOperations(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*longrunningpb.ListOperationsResponse) } }