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