cloud.google.com/go/aiplatform@v1.106.0/apiv1beta1/feature_online_store_admin_client_example_test.go (about)

     1  // Copyright 2025 Google LLC
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //     https://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  // Code generated by protoc-gen-go_gapic. DO NOT EDIT.
    16  
    17  package aiplatform_test
    18  
    19  import (
    20  	"context"
    21  
    22  	aiplatform "cloud.google.com/go/aiplatform/apiv1beta1"
    23  	aiplatformpb "cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb"
    24  	iampb "cloud.google.com/go/iam/apiv1/iampb"
    25  	longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
    26  	"google.golang.org/api/iterator"
    27  	locationpb "google.golang.org/genproto/googleapis/cloud/location"
    28  )
    29  
    30  func ExampleNewFeatureOnlineStoreAdminClient() {
    31  	ctx := context.Background()
    32  	// This snippet has been automatically generated and should be regarded as a code template only.
    33  	// It will require modifications to work:
    34  	// - It may require correct/in-range values for request initialization.
    35  	// - It may require specifying regional endpoints when creating the service client as shown in:
    36  	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
    37  	c, err := aiplatform.NewFeatureOnlineStoreAdminClient(ctx)
    38  	if err != nil {
    39  		// TODO: Handle error.
    40  	}
    41  	defer c.Close()
    42  
    43  	// TODO: Use client.
    44  	_ = c
    45  }
    46  
    47  func ExampleNewFeatureOnlineStoreAdminRESTClient() {
    48  	ctx := context.Background()
    49  	// This snippet has been automatically generated and should be regarded as a code template only.
    50  	// It will require modifications to work:
    51  	// - It may require correct/in-range values for request initialization.
    52  	// - It may require specifying regional endpoints when creating the service client as shown in:
    53  	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
    54  	c, err := aiplatform.NewFeatureOnlineStoreAdminRESTClient(ctx)
    55  	if err != nil {
    56  		// TODO: Handle error.
    57  	}
    58  	defer c.Close()
    59  
    60  	// TODO: Use client.
    61  	_ = c
    62  }
    63  
    64  func ExampleFeatureOnlineStoreAdminClient_CreateFeatureOnlineStore() {
    65  	ctx := context.Background()
    66  	// This snippet has been automatically generated and should be regarded as a code template only.
    67  	// It will require modifications to work:
    68  	// - It may require correct/in-range values for request initialization.
    69  	// - It may require specifying regional endpoints when creating the service client as shown in:
    70  	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
    71  	c, err := aiplatform.NewFeatureOnlineStoreAdminClient(ctx)
    72  	if err != nil {
    73  		// TODO: Handle error.
    74  	}
    75  	defer c.Close()
    76  
    77  	req := &aiplatformpb.CreateFeatureOnlineStoreRequest{
    78  		// TODO: Fill request struct fields.
    79  		// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb#CreateFeatureOnlineStoreRequest.
    80  	}
    81  	op, err := c.CreateFeatureOnlineStore(ctx, req)
    82  	if err != nil {
    83  		// TODO: Handle error.
    84  	}
    85  
    86  	resp, err := op.Wait(ctx)
    87  	if err != nil {
    88  		// TODO: Handle error.
    89  	}
    90  	// TODO: Use resp.
    91  	_ = resp
    92  }
    93  
    94  func ExampleFeatureOnlineStoreAdminClient_CreateFeatureView() {
    95  	ctx := context.Background()
    96  	// This snippet has been automatically generated and should be regarded as a code template only.
    97  	// It will require modifications to work:
    98  	// - It may require correct/in-range values for request initialization.
    99  	// - It may require specifying regional endpoints when creating the service client as shown in:
   100  	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
   101  	c, err := aiplatform.NewFeatureOnlineStoreAdminClient(ctx)
   102  	if err != nil {
   103  		// TODO: Handle error.
   104  	}
   105  	defer c.Close()
   106  
   107  	req := &aiplatformpb.CreateFeatureViewRequest{
   108  		// TODO: Fill request struct fields.
   109  		// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb#CreateFeatureViewRequest.
   110  	}
   111  	op, err := c.CreateFeatureView(ctx, req)
   112  	if err != nil {
   113  		// TODO: Handle error.
   114  	}
   115  
   116  	resp, err := op.Wait(ctx)
   117  	if err != nil {
   118  		// TODO: Handle error.
   119  	}
   120  	// TODO: Use resp.
   121  	_ = resp
   122  }
   123  
   124  func ExampleFeatureOnlineStoreAdminClient_DeleteFeatureOnlineStore() {
   125  	ctx := context.Background()
   126  	// This snippet has been automatically generated and should be regarded as a code template only.
   127  	// It will require modifications to work:
   128  	// - It may require correct/in-range values for request initialization.
   129  	// - It may require specifying regional endpoints when creating the service client as shown in:
   130  	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
   131  	c, err := aiplatform.NewFeatureOnlineStoreAdminClient(ctx)
   132  	if err != nil {
   133  		// TODO: Handle error.
   134  	}
   135  	defer c.Close()
   136  
   137  	req := &aiplatformpb.DeleteFeatureOnlineStoreRequest{
   138  		// TODO: Fill request struct fields.
   139  		// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb#DeleteFeatureOnlineStoreRequest.
   140  	}
   141  	op, err := c.DeleteFeatureOnlineStore(ctx, req)
   142  	if err != nil {
   143  		// TODO: Handle error.
   144  	}
   145  
   146  	err = op.Wait(ctx)
   147  	if err != nil {
   148  		// TODO: Handle error.
   149  	}
   150  }
   151  
   152  func ExampleFeatureOnlineStoreAdminClient_DeleteFeatureView() {
   153  	ctx := context.Background()
   154  	// This snippet has been automatically generated and should be regarded as a code template only.
   155  	// It will require modifications to work:
   156  	// - It may require correct/in-range values for request initialization.
   157  	// - It may require specifying regional endpoints when creating the service client as shown in:
   158  	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
   159  	c, err := aiplatform.NewFeatureOnlineStoreAdminClient(ctx)
   160  	if err != nil {
   161  		// TODO: Handle error.
   162  	}
   163  	defer c.Close()
   164  
   165  	req := &aiplatformpb.DeleteFeatureViewRequest{
   166  		// TODO: Fill request struct fields.
   167  		// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb#DeleteFeatureViewRequest.
   168  	}
   169  	op, err := c.DeleteFeatureView(ctx, req)
   170  	if err != nil {
   171  		// TODO: Handle error.
   172  	}
   173  
   174  	err = op.Wait(ctx)
   175  	if err != nil {
   176  		// TODO: Handle error.
   177  	}
   178  }
   179  
   180  func ExampleFeatureOnlineStoreAdminClient_GetFeatureOnlineStore() {
   181  	ctx := context.Background()
   182  	// This snippet has been automatically generated and should be regarded as a code template only.
   183  	// It will require modifications to work:
   184  	// - It may require correct/in-range values for request initialization.
   185  	// - It may require specifying regional endpoints when creating the service client as shown in:
   186  	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
   187  	c, err := aiplatform.NewFeatureOnlineStoreAdminClient(ctx)
   188  	if err != nil {
   189  		// TODO: Handle error.
   190  	}
   191  	defer c.Close()
   192  
   193  	req := &aiplatformpb.GetFeatureOnlineStoreRequest{
   194  		// TODO: Fill request struct fields.
   195  		// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb#GetFeatureOnlineStoreRequest.
   196  	}
   197  	resp, err := c.GetFeatureOnlineStore(ctx, req)
   198  	if err != nil {
   199  		// TODO: Handle error.
   200  	}
   201  	// TODO: Use resp.
   202  	_ = resp
   203  }
   204  
   205  func ExampleFeatureOnlineStoreAdminClient_GetFeatureView() {
   206  	ctx := context.Background()
   207  	// This snippet has been automatically generated and should be regarded as a code template only.
   208  	// It will require modifications to work:
   209  	// - It may require correct/in-range values for request initialization.
   210  	// - It may require specifying regional endpoints when creating the service client as shown in:
   211  	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
   212  	c, err := aiplatform.NewFeatureOnlineStoreAdminClient(ctx)
   213  	if err != nil {
   214  		// TODO: Handle error.
   215  	}
   216  	defer c.Close()
   217  
   218  	req := &aiplatformpb.GetFeatureViewRequest{
   219  		// TODO: Fill request struct fields.
   220  		// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb#GetFeatureViewRequest.
   221  	}
   222  	resp, err := c.GetFeatureView(ctx, req)
   223  	if err != nil {
   224  		// TODO: Handle error.
   225  	}
   226  	// TODO: Use resp.
   227  	_ = resp
   228  }
   229  
   230  func ExampleFeatureOnlineStoreAdminClient_GetFeatureViewSync() {
   231  	ctx := context.Background()
   232  	// This snippet has been automatically generated and should be regarded as a code template only.
   233  	// It will require modifications to work:
   234  	// - It may require correct/in-range values for request initialization.
   235  	// - It may require specifying regional endpoints when creating the service client as shown in:
   236  	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
   237  	c, err := aiplatform.NewFeatureOnlineStoreAdminClient(ctx)
   238  	if err != nil {
   239  		// TODO: Handle error.
   240  	}
   241  	defer c.Close()
   242  
   243  	req := &aiplatformpb.GetFeatureViewSyncRequest{
   244  		// TODO: Fill request struct fields.
   245  		// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb#GetFeatureViewSyncRequest.
   246  	}
   247  	resp, err := c.GetFeatureViewSync(ctx, req)
   248  	if err != nil {
   249  		// TODO: Handle error.
   250  	}
   251  	// TODO: Use resp.
   252  	_ = resp
   253  }
   254  
   255  func ExampleFeatureOnlineStoreAdminClient_ListFeatureOnlineStores() {
   256  	ctx := context.Background()
   257  	// This snippet has been automatically generated and should be regarded as a code template only.
   258  	// It will require modifications to work:
   259  	// - It may require correct/in-range values for request initialization.
   260  	// - It may require specifying regional endpoints when creating the service client as shown in:
   261  	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
   262  	c, err := aiplatform.NewFeatureOnlineStoreAdminClient(ctx)
   263  	if err != nil {
   264  		// TODO: Handle error.
   265  	}
   266  	defer c.Close()
   267  
   268  	req := &aiplatformpb.ListFeatureOnlineStoresRequest{
   269  		// TODO: Fill request struct fields.
   270  		// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb#ListFeatureOnlineStoresRequest.
   271  	}
   272  	it := c.ListFeatureOnlineStores(ctx, req)
   273  	for {
   274  		resp, err := it.Next()
   275  		if err == iterator.Done {
   276  			break
   277  		}
   278  		if err != nil {
   279  			// TODO: Handle error.
   280  		}
   281  		// TODO: Use resp.
   282  		_ = resp
   283  
   284  		// If you need to access the underlying RPC response,
   285  		// you can do so by casting the `Response` as below.
   286  		// Otherwise, remove this line. Only populated after
   287  		// first call to Next(). Not safe for concurrent access.
   288  		_ = it.Response.(*aiplatformpb.ListFeatureOnlineStoresResponse)
   289  	}
   290  }
   291  
   292  func ExampleFeatureOnlineStoreAdminClient_ListFeatureViewSyncs() {
   293  	ctx := context.Background()
   294  	// This snippet has been automatically generated and should be regarded as a code template only.
   295  	// It will require modifications to work:
   296  	// - It may require correct/in-range values for request initialization.
   297  	// - It may require specifying regional endpoints when creating the service client as shown in:
   298  	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
   299  	c, err := aiplatform.NewFeatureOnlineStoreAdminClient(ctx)
   300  	if err != nil {
   301  		// TODO: Handle error.
   302  	}
   303  	defer c.Close()
   304  
   305  	req := &aiplatformpb.ListFeatureViewSyncsRequest{
   306  		// TODO: Fill request struct fields.
   307  		// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb#ListFeatureViewSyncsRequest.
   308  	}
   309  	it := c.ListFeatureViewSyncs(ctx, req)
   310  	for {
   311  		resp, err := it.Next()
   312  		if err == iterator.Done {
   313  			break
   314  		}
   315  		if err != nil {
   316  			// TODO: Handle error.
   317  		}
   318  		// TODO: Use resp.
   319  		_ = resp
   320  
   321  		// If you need to access the underlying RPC response,
   322  		// you can do so by casting the `Response` as below.
   323  		// Otherwise, remove this line. Only populated after
   324  		// first call to Next(). Not safe for concurrent access.
   325  		_ = it.Response.(*aiplatformpb.ListFeatureViewSyncsResponse)
   326  	}
   327  }
   328  
   329  func ExampleFeatureOnlineStoreAdminClient_ListFeatureViews() {
   330  	ctx := context.Background()
   331  	// This snippet has been automatically generated and should be regarded as a code template only.
   332  	// It will require modifications to work:
   333  	// - It may require correct/in-range values for request initialization.
   334  	// - It may require specifying regional endpoints when creating the service client as shown in:
   335  	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
   336  	c, err := aiplatform.NewFeatureOnlineStoreAdminClient(ctx)
   337  	if err != nil {
   338  		// TODO: Handle error.
   339  	}
   340  	defer c.Close()
   341  
   342  	req := &aiplatformpb.ListFeatureViewsRequest{
   343  		// TODO: Fill request struct fields.
   344  		// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb#ListFeatureViewsRequest.
   345  	}
   346  	it := c.ListFeatureViews(ctx, req)
   347  	for {
   348  		resp, err := it.Next()
   349  		if err == iterator.Done {
   350  			break
   351  		}
   352  		if err != nil {
   353  			// TODO: Handle error.
   354  		}
   355  		// TODO: Use resp.
   356  		_ = resp
   357  
   358  		// If you need to access the underlying RPC response,
   359  		// you can do so by casting the `Response` as below.
   360  		// Otherwise, remove this line. Only populated after
   361  		// first call to Next(). Not safe for concurrent access.
   362  		_ = it.Response.(*aiplatformpb.ListFeatureViewsResponse)
   363  	}
   364  }
   365  
   366  func ExampleFeatureOnlineStoreAdminClient_SyncFeatureView() {
   367  	ctx := context.Background()
   368  	// This snippet has been automatically generated and should be regarded as a code template only.
   369  	// It will require modifications to work:
   370  	// - It may require correct/in-range values for request initialization.
   371  	// - It may require specifying regional endpoints when creating the service client as shown in:
   372  	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
   373  	c, err := aiplatform.NewFeatureOnlineStoreAdminClient(ctx)
   374  	if err != nil {
   375  		// TODO: Handle error.
   376  	}
   377  	defer c.Close()
   378  
   379  	req := &aiplatformpb.SyncFeatureViewRequest{
   380  		// TODO: Fill request struct fields.
   381  		// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb#SyncFeatureViewRequest.
   382  	}
   383  	resp, err := c.SyncFeatureView(ctx, req)
   384  	if err != nil {
   385  		// TODO: Handle error.
   386  	}
   387  	// TODO: Use resp.
   388  	_ = resp
   389  }
   390  
   391  func ExampleFeatureOnlineStoreAdminClient_UpdateFeatureOnlineStore() {
   392  	ctx := context.Background()
   393  	// This snippet has been automatically generated and should be regarded as a code template only.
   394  	// It will require modifications to work:
   395  	// - It may require correct/in-range values for request initialization.
   396  	// - It may require specifying regional endpoints when creating the service client as shown in:
   397  	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
   398  	c, err := aiplatform.NewFeatureOnlineStoreAdminClient(ctx)
   399  	if err != nil {
   400  		// TODO: Handle error.
   401  	}
   402  	defer c.Close()
   403  
   404  	req := &aiplatformpb.UpdateFeatureOnlineStoreRequest{
   405  		// TODO: Fill request struct fields.
   406  		// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb#UpdateFeatureOnlineStoreRequest.
   407  	}
   408  	op, err := c.UpdateFeatureOnlineStore(ctx, req)
   409  	if err != nil {
   410  		// TODO: Handle error.
   411  	}
   412  
   413  	resp, err := op.Wait(ctx)
   414  	if err != nil {
   415  		// TODO: Handle error.
   416  	}
   417  	// TODO: Use resp.
   418  	_ = resp
   419  }
   420  
   421  func ExampleFeatureOnlineStoreAdminClient_UpdateFeatureView() {
   422  	ctx := context.Background()
   423  	// This snippet has been automatically generated and should be regarded as a code template only.
   424  	// It will require modifications to work:
   425  	// - It may require correct/in-range values for request initialization.
   426  	// - It may require specifying regional endpoints when creating the service client as shown in:
   427  	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
   428  	c, err := aiplatform.NewFeatureOnlineStoreAdminClient(ctx)
   429  	if err != nil {
   430  		// TODO: Handle error.
   431  	}
   432  	defer c.Close()
   433  
   434  	req := &aiplatformpb.UpdateFeatureViewRequest{
   435  		// TODO: Fill request struct fields.
   436  		// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb#UpdateFeatureViewRequest.
   437  	}
   438  	op, err := c.UpdateFeatureView(ctx, req)
   439  	if err != nil {
   440  		// TODO: Handle error.
   441  	}
   442  
   443  	resp, err := op.Wait(ctx)
   444  	if err != nil {
   445  		// TODO: Handle error.
   446  	}
   447  	// TODO: Use resp.
   448  	_ = resp
   449  }
   450  
   451  func ExampleFeatureOnlineStoreAdminClient_GetLocation() {
   452  	ctx := context.Background()
   453  	// This snippet has been automatically generated and should be regarded as a code template only.
   454  	// It will require modifications to work:
   455  	// - It may require correct/in-range values for request initialization.
   456  	// - It may require specifying regional endpoints when creating the service client as shown in:
   457  	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
   458  	c, err := aiplatform.NewFeatureOnlineStoreAdminClient(ctx)
   459  	if err != nil {
   460  		// TODO: Handle error.
   461  	}
   462  	defer c.Close()
   463  
   464  	req := &locationpb.GetLocationRequest{
   465  		// TODO: Fill request struct fields.
   466  		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest.
   467  	}
   468  	resp, err := c.GetLocation(ctx, req)
   469  	if err != nil {
   470  		// TODO: Handle error.
   471  	}
   472  	// TODO: Use resp.
   473  	_ = resp
   474  }
   475  
   476  func ExampleFeatureOnlineStoreAdminClient_ListLocations() {
   477  	ctx := context.Background()
   478  	// This snippet has been automatically generated and should be regarded as a code template only.
   479  	// It will require modifications to work:
   480  	// - It may require correct/in-range values for request initialization.
   481  	// - It may require specifying regional endpoints when creating the service client as shown in:
   482  	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
   483  	c, err := aiplatform.NewFeatureOnlineStoreAdminClient(ctx)
   484  	if err != nil {
   485  		// TODO: Handle error.
   486  	}
   487  	defer c.Close()
   488  
   489  	req := &locationpb.ListLocationsRequest{
   490  		// TODO: Fill request struct fields.
   491  		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.
   492  	}
   493  	it := c.ListLocations(ctx, req)
   494  	for {
   495  		resp, err := it.Next()
   496  		if err == iterator.Done {
   497  			break
   498  		}
   499  		if err != nil {
   500  			// TODO: Handle error.
   501  		}
   502  		// TODO: Use resp.
   503  		_ = resp
   504  
   505  		// If you need to access the underlying RPC response,
   506  		// you can do so by casting the `Response` as below.
   507  		// Otherwise, remove this line. Only populated after
   508  		// first call to Next(). Not safe for concurrent access.
   509  		_ = it.Response.(*locationpb.ListLocationsResponse)
   510  	}
   511  }
   512  
   513  func ExampleFeatureOnlineStoreAdminClient_GetIamPolicy() {
   514  	ctx := context.Background()
   515  	// This snippet has been automatically generated and should be regarded as a code template only.
   516  	// It will require modifications to work:
   517  	// - It may require correct/in-range values for request initialization.
   518  	// - It may require specifying regional endpoints when creating the service client as shown in:
   519  	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
   520  	c, err := aiplatform.NewFeatureOnlineStoreAdminClient(ctx)
   521  	if err != nil {
   522  		// TODO: Handle error.
   523  	}
   524  	defer c.Close()
   525  
   526  	req := &iampb.GetIamPolicyRequest{
   527  		// TODO: Fill request struct fields.
   528  		// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#GetIamPolicyRequest.
   529  	}
   530  	resp, err := c.GetIamPolicy(ctx, req)
   531  	if err != nil {
   532  		// TODO: Handle error.
   533  	}
   534  	// TODO: Use resp.
   535  	_ = resp
   536  }
   537  
   538  func ExampleFeatureOnlineStoreAdminClient_SetIamPolicy() {
   539  	ctx := context.Background()
   540  	// This snippet has been automatically generated and should be regarded as a code template only.
   541  	// It will require modifications to work:
   542  	// - It may require correct/in-range values for request initialization.
   543  	// - It may require specifying regional endpoints when creating the service client as shown in:
   544  	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
   545  	c, err := aiplatform.NewFeatureOnlineStoreAdminClient(ctx)
   546  	if err != nil {
   547  		// TODO: Handle error.
   548  	}
   549  	defer c.Close()
   550  
   551  	req := &iampb.SetIamPolicyRequest{
   552  		// TODO: Fill request struct fields.
   553  		// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#SetIamPolicyRequest.
   554  	}
   555  	resp, err := c.SetIamPolicy(ctx, req)
   556  	if err != nil {
   557  		// TODO: Handle error.
   558  	}
   559  	// TODO: Use resp.
   560  	_ = resp
   561  }
   562  
   563  func ExampleFeatureOnlineStoreAdminClient_TestIamPermissions() {
   564  	ctx := context.Background()
   565  	// This snippet has been automatically generated and should be regarded as a code template only.
   566  	// It will require modifications to work:
   567  	// - It may require correct/in-range values for request initialization.
   568  	// - It may require specifying regional endpoints when creating the service client as shown in:
   569  	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
   570  	c, err := aiplatform.NewFeatureOnlineStoreAdminClient(ctx)
   571  	if err != nil {
   572  		// TODO: Handle error.
   573  	}
   574  	defer c.Close()
   575  
   576  	req := &iampb.TestIamPermissionsRequest{
   577  		// TODO: Fill request struct fields.
   578  		// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#TestIamPermissionsRequest.
   579  	}
   580  	resp, err := c.TestIamPermissions(ctx, req)
   581  	if err != nil {
   582  		// TODO: Handle error.
   583  	}
   584  	// TODO: Use resp.
   585  	_ = resp
   586  }
   587  
   588  func ExampleFeatureOnlineStoreAdminClient_CancelOperation() {
   589  	ctx := context.Background()
   590  	// This snippet has been automatically generated and should be regarded as a code template only.
   591  	// It will require modifications to work:
   592  	// - It may require correct/in-range values for request initialization.
   593  	// - It may require specifying regional endpoints when creating the service client as shown in:
   594  	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
   595  	c, err := aiplatform.NewFeatureOnlineStoreAdminClient(ctx)
   596  	if err != nil {
   597  		// TODO: Handle error.
   598  	}
   599  	defer c.Close()
   600  
   601  	req := &longrunningpb.CancelOperationRequest{
   602  		// TODO: Fill request struct fields.
   603  		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest.
   604  	}
   605  	err = c.CancelOperation(ctx, req)
   606  	if err != nil {
   607  		// TODO: Handle error.
   608  	}
   609  }
   610  
   611  func ExampleFeatureOnlineStoreAdminClient_DeleteOperation() {
   612  	ctx := context.Background()
   613  	// This snippet has been automatically generated and should be regarded as a code template only.
   614  	// It will require modifications to work:
   615  	// - It may require correct/in-range values for request initialization.
   616  	// - It may require specifying regional endpoints when creating the service client as shown in:
   617  	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
   618  	c, err := aiplatform.NewFeatureOnlineStoreAdminClient(ctx)
   619  	if err != nil {
   620  		// TODO: Handle error.
   621  	}
   622  	defer c.Close()
   623  
   624  	req := &longrunningpb.DeleteOperationRequest{
   625  		// TODO: Fill request struct fields.
   626  		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#DeleteOperationRequest.
   627  	}
   628  	err = c.DeleteOperation(ctx, req)
   629  	if err != nil {
   630  		// TODO: Handle error.
   631  	}
   632  }
   633  
   634  func ExampleFeatureOnlineStoreAdminClient_GetOperation() {
   635  	ctx := context.Background()
   636  	// This snippet has been automatically generated and should be regarded as a code template only.
   637  	// It will require modifications to work:
   638  	// - It may require correct/in-range values for request initialization.
   639  	// - It may require specifying regional endpoints when creating the service client as shown in:
   640  	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
   641  	c, err := aiplatform.NewFeatureOnlineStoreAdminClient(ctx)
   642  	if err != nil {
   643  		// TODO: Handle error.
   644  	}
   645  	defer c.Close()
   646  
   647  	req := &longrunningpb.GetOperationRequest{
   648  		// TODO: Fill request struct fields.
   649  		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest.
   650  	}
   651  	resp, err := c.GetOperation(ctx, req)
   652  	if err != nil {
   653  		// TODO: Handle error.
   654  	}
   655  	// TODO: Use resp.
   656  	_ = resp
   657  }
   658  
   659  func ExampleFeatureOnlineStoreAdminClient_ListOperations() {
   660  	ctx := context.Background()
   661  	// This snippet has been automatically generated and should be regarded as a code template only.
   662  	// It will require modifications to work:
   663  	// - It may require correct/in-range values for request initialization.
   664  	// - It may require specifying regional endpoints when creating the service client as shown in:
   665  	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
   666  	c, err := aiplatform.NewFeatureOnlineStoreAdminClient(ctx)
   667  	if err != nil {
   668  		// TODO: Handle error.
   669  	}
   670  	defer c.Close()
   671  
   672  	req := &longrunningpb.ListOperationsRequest{
   673  		// TODO: Fill request struct fields.
   674  		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
   675  	}
   676  	it := c.ListOperations(ctx, req)
   677  	for {
   678  		resp, err := it.Next()
   679  		if err == iterator.Done {
   680  			break
   681  		}
   682  		if err != nil {
   683  			// TODO: Handle error.
   684  		}
   685  		// TODO: Use resp.
   686  		_ = resp
   687  
   688  		// If you need to access the underlying RPC response,
   689  		// you can do so by casting the `Response` as below.
   690  		// Otherwise, remove this line. Only populated after
   691  		// first call to Next(). Not safe for concurrent access.
   692  		_ = it.Response.(*longrunningpb.ListOperationsResponse)
   693  	}
   694  }
   695  
   696  func ExampleFeatureOnlineStoreAdminClient_WaitOperation() {
   697  	ctx := context.Background()
   698  	// This snippet has been automatically generated and should be regarded as a code template only.
   699  	// It will require modifications to work:
   700  	// - It may require correct/in-range values for request initialization.
   701  	// - It may require specifying regional endpoints when creating the service client as shown in:
   702  	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
   703  	c, err := aiplatform.NewFeatureOnlineStoreAdminClient(ctx)
   704  	if err != nil {
   705  		// TODO: Handle error.
   706  	}
   707  	defer c.Close()
   708  
   709  	req := &longrunningpb.WaitOperationRequest{
   710  		// TODO: Fill request struct fields.
   711  		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#WaitOperationRequest.
   712  	}
   713  	resp, err := c.WaitOperation(ctx, req)
   714  	if err != nil {
   715  		// TODO: Handle error.
   716  	}
   717  	// TODO: Use resp.
   718  	_ = resp
   719  }