Class StorageInsightsClient

  • All Implemented Interfaces:
    com.google.api.gax.core.BackgroundResource, AutoCloseable

    @Generated("by gapic-generator-java")
    public class StorageInsightsClient
    extends Object
    implements com.google.api.gax.core.BackgroundResource
    Service Description: Service describing handlers for resources

    This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:

    
     // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) {
       ReportConfigName name = ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]");
       ReportConfig response = storageInsightsClient.getReportConfig(name);
     }
     

    Note: close() needs to be called on the StorageInsightsClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().

    The surface of this class includes several types of Java methods for each of the API's methods:

    1. A "flattened" method. With this type of method, the fields of the request type have been converted into function parameters. It may be the case that not all fields are available as parameters, and not every API method will have a flattened method entry point.
    2. A "request object" method. This type of method only takes one parameter, a request object, which must be constructed before the call. Not every API method will have a request object method.
    3. A "callable" method. This type of method takes no parameters and returns an immutable API callable object, which can be used to initiate calls to the service.

    See the individual methods for example code.

    Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.

    This class can be customized by passing in a custom instance of StorageInsightsSettings to create(). For example:

    To customize credentials:

    
     // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     StorageInsightsSettings storageInsightsSettings =
         StorageInsightsSettings.newBuilder()
             .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
             .build();
     StorageInsightsClient storageInsightsClient =
         StorageInsightsClient.create(storageInsightsSettings);
     

    To customize the endpoint:

    
     // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     StorageInsightsSettings storageInsightsSettings =
         StorageInsightsSettings.newBuilder().setEndpoint(myEndpoint).build();
     StorageInsightsClient storageInsightsClient =
         StorageInsightsClient.create(storageInsightsSettings);
     

    To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over the wire:

    
     // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     StorageInsightsSettings storageInsightsSettings =
         StorageInsightsSettings.newHttpJsonBuilder().build();
     StorageInsightsClient storageInsightsClient =
         StorageInsightsClient.create(storageInsightsSettings);
     

    Please refer to the GitHub repository's samples for more quickstart code snippets.

    • Constructor Detail

      • StorageInsightsClient

        protected StorageInsightsClient​(StorageInsightsSettings settings)
                                 throws IOException
        Constructs an instance of StorageInsightsClient, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.
        Throws:
        IOException
    • Method Detail

      • create

        public static final StorageInsightsClient create​(StorageInsightsStub stub)
        Constructs an instance of StorageInsightsClient, using the given stub for making calls. This is for advanced usage - prefer using create(StorageInsightsSettings).
      • listReportConfigs

        public final StorageInsightsClient.ListReportConfigsPagedResponse listReportConfigs​(LocationName parent)
        Lists ReportConfigs in a given project and location.

        Sample code:

        
         // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) {
           LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
           for (ReportConfig element : storageInsightsClient.listReportConfigs(parent).iterateAll()) {
             // doThingsWith(element);
           }
         }
         
        Parameters:
        parent - Required. Parent value for ListReportConfigsRequest
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • listReportConfigs

        public final StorageInsightsClient.ListReportConfigsPagedResponse listReportConfigs​(String parent)
        Lists ReportConfigs in a given project and location.

        Sample code:

        
         // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) {
           String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
           for (ReportConfig element : storageInsightsClient.listReportConfigs(parent).iterateAll()) {
             // doThingsWith(element);
           }
         }
         
        Parameters:
        parent - Required. Parent value for ListReportConfigsRequest
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • listReportConfigs

        public final StorageInsightsClient.ListReportConfigsPagedResponse listReportConfigs​(ListReportConfigsRequest request)
        Lists ReportConfigs in a given project and location.

        Sample code:

        
         // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) {
           ListReportConfigsRequest request =
               ListReportConfigsRequest.newBuilder()
                   .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .setFilter("filter-1274492040")
                   .setOrderBy("orderBy-1207110587")
                   .build();
           for (ReportConfig element : storageInsightsClient.listReportConfigs(request).iterateAll()) {
             // doThingsWith(element);
           }
         }
         
        Parameters:
        request - The request object containing all of the parameters for the API call.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • listReportConfigsPagedCallable

        public final com.google.api.gax.rpc.UnaryCallable<ListReportConfigsRequest,​StorageInsightsClient.ListReportConfigsPagedResponse> listReportConfigsPagedCallable()
        Lists ReportConfigs in a given project and location.

        Sample code:

        
         // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) {
           ListReportConfigsRequest request =
               ListReportConfigsRequest.newBuilder()
                   .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .setFilter("filter-1274492040")
                   .setOrderBy("orderBy-1207110587")
                   .build();
           ApiFuture<ReportConfig> future =
               storageInsightsClient.listReportConfigsPagedCallable().futureCall(request);
           // Do something.
           for (ReportConfig element : future.get().iterateAll()) {
             // doThingsWith(element);
           }
         }
         
      • listReportConfigsCallable

        public final com.google.api.gax.rpc.UnaryCallable<ListReportConfigsRequest,​ListReportConfigsResponse> listReportConfigsCallable()
        Lists ReportConfigs in a given project and location.

        Sample code:

        
         // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) {
           ListReportConfigsRequest request =
               ListReportConfigsRequest.newBuilder()
                   .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .setFilter("filter-1274492040")
                   .setOrderBy("orderBy-1207110587")
                   .build();
           while (true) {
             ListReportConfigsResponse response =
                 storageInsightsClient.listReportConfigsCallable().call(request);
             for (ReportConfig element : response.getReportConfigsList()) {
               // doThingsWith(element);
             }
             String nextPageToken = response.getNextPageToken();
             if (!Strings.isNullOrEmpty(nextPageToken)) {
               request = request.toBuilder().setPageToken(nextPageToken).build();
             } else {
               break;
             }
           }
         }
         
      • getReportConfig

        public final ReportConfig getReportConfig​(ReportConfigName name)
        Gets details of a single ReportConfig.

        Sample code:

        
         // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) {
           ReportConfigName name = ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]");
           ReportConfig response = storageInsightsClient.getReportConfig(name);
         }
         
        Parameters:
        name - Required. Name of the resource
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • getReportConfig

        public final ReportConfig getReportConfig​(String name)
        Gets details of a single ReportConfig.

        Sample code:

        
         // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) {
           String name = ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString();
           ReportConfig response = storageInsightsClient.getReportConfig(name);
         }
         
        Parameters:
        name - Required. Name of the resource
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • getReportConfig

        public final ReportConfig getReportConfig​(GetReportConfigRequest request)
        Gets details of a single ReportConfig.

        Sample code:

        
         // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) {
           GetReportConfigRequest request =
               GetReportConfigRequest.newBuilder()
                   .setName(ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString())
                   .build();
           ReportConfig response = storageInsightsClient.getReportConfig(request);
         }
         
        Parameters:
        request - The request object containing all of the parameters for the API call.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • getReportConfigCallable

        public final com.google.api.gax.rpc.UnaryCallable<GetReportConfigRequest,​ReportConfig> getReportConfigCallable()
        Gets details of a single ReportConfig.

        Sample code:

        
         // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) {
           GetReportConfigRequest request =
               GetReportConfigRequest.newBuilder()
                   .setName(ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString())
                   .build();
           ApiFuture<ReportConfig> future =
               storageInsightsClient.getReportConfigCallable().futureCall(request);
           // Do something.
           ReportConfig response = future.get();
         }
         
      • createReportConfig

        public final ReportConfig createReportConfig​(LocationName parent,
                                                     ReportConfig reportConfig)
        Creates a new ReportConfig in a given project and location.

        Sample code:

        
         // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) {
           LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
           ReportConfig reportConfig = ReportConfig.newBuilder().build();
           ReportConfig response = storageInsightsClient.createReportConfig(parent, reportConfig);
         }
         
        Parameters:
        parent - Required. Value for parent.
        reportConfig - Required. The resource being created
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • createReportConfig

        public final ReportConfig createReportConfig​(String parent,
                                                     ReportConfig reportConfig)
        Creates a new ReportConfig in a given project and location.

        Sample code:

        
         // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) {
           String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
           ReportConfig reportConfig = ReportConfig.newBuilder().build();
           ReportConfig response = storageInsightsClient.createReportConfig(parent, reportConfig);
         }
         
        Parameters:
        parent - Required. Value for parent.
        reportConfig - Required. The resource being created
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • createReportConfig

        public final ReportConfig createReportConfig​(CreateReportConfigRequest request)
        Creates a new ReportConfig in a given project and location.

        Sample code:

        
         // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) {
           CreateReportConfigRequest request =
               CreateReportConfigRequest.newBuilder()
                   .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                   .setReportConfig(ReportConfig.newBuilder().build())
                   .setRequestId("requestId693933066")
                   .build();
           ReportConfig response = storageInsightsClient.createReportConfig(request);
         }
         
        Parameters:
        request - The request object containing all of the parameters for the API call.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • createReportConfigCallable

        public final com.google.api.gax.rpc.UnaryCallable<CreateReportConfigRequest,​ReportConfig> createReportConfigCallable()
        Creates a new ReportConfig in a given project and location.

        Sample code:

        
         // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) {
           CreateReportConfigRequest request =
               CreateReportConfigRequest.newBuilder()
                   .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                   .setReportConfig(ReportConfig.newBuilder().build())
                   .setRequestId("requestId693933066")
                   .build();
           ApiFuture<ReportConfig> future =
               storageInsightsClient.createReportConfigCallable().futureCall(request);
           // Do something.
           ReportConfig response = future.get();
         }
         
      • updateReportConfig

        public final ReportConfig updateReportConfig​(ReportConfig reportConfig,
                                                     com.google.protobuf.FieldMask updateMask)
        Updates the parameters of a single ReportConfig.

        Sample code:

        
         // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) {
           ReportConfig reportConfig = ReportConfig.newBuilder().build();
           FieldMask updateMask = FieldMask.newBuilder().build();
           ReportConfig response = storageInsightsClient.updateReportConfig(reportConfig, updateMask);
         }
         
        Parameters:
        reportConfig - Required. The resource being updated
        updateMask - Required. Field mask is used to specify the fields to be overwritten in the ReportConfig resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • updateReportConfig

        public final ReportConfig updateReportConfig​(UpdateReportConfigRequest request)
        Updates the parameters of a single ReportConfig.

        Sample code:

        
         // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) {
           UpdateReportConfigRequest request =
               UpdateReportConfigRequest.newBuilder()
                   .setUpdateMask(FieldMask.newBuilder().build())
                   .setReportConfig(ReportConfig.newBuilder().build())
                   .setRequestId("requestId693933066")
                   .build();
           ReportConfig response = storageInsightsClient.updateReportConfig(request);
         }
         
        Parameters:
        request - The request object containing all of the parameters for the API call.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • updateReportConfigCallable

        public final com.google.api.gax.rpc.UnaryCallable<UpdateReportConfigRequest,​ReportConfig> updateReportConfigCallable()
        Updates the parameters of a single ReportConfig.

        Sample code:

        
         // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) {
           UpdateReportConfigRequest request =
               UpdateReportConfigRequest.newBuilder()
                   .setUpdateMask(FieldMask.newBuilder().build())
                   .setReportConfig(ReportConfig.newBuilder().build())
                   .setRequestId("requestId693933066")
                   .build();
           ApiFuture<ReportConfig> future =
               storageInsightsClient.updateReportConfigCallable().futureCall(request);
           // Do something.
           ReportConfig response = future.get();
         }
         
      • deleteReportConfig

        public final void deleteReportConfig​(ReportConfigName name)
        Deletes a single ReportConfig.

        Sample code:

        
         // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) {
           ReportConfigName name = ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]");
           storageInsightsClient.deleteReportConfig(name);
         }
         
        Parameters:
        name - Required. Name of the resource
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • deleteReportConfig

        public final void deleteReportConfig​(String name)
        Deletes a single ReportConfig.

        Sample code:

        
         // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) {
           String name = ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString();
           storageInsightsClient.deleteReportConfig(name);
         }
         
        Parameters:
        name - Required. Name of the resource
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • deleteReportConfig

        public final void deleteReportConfig​(DeleteReportConfigRequest request)
        Deletes a single ReportConfig.

        Sample code:

        
         // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) {
           DeleteReportConfigRequest request =
               DeleteReportConfigRequest.newBuilder()
                   .setName(ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString())
                   .setForce(true)
                   .setRequestId("requestId693933066")
                   .build();
           storageInsightsClient.deleteReportConfig(request);
         }
         
        Parameters:
        request - The request object containing all of the parameters for the API call.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • deleteReportConfigCallable

        public final com.google.api.gax.rpc.UnaryCallable<DeleteReportConfigRequest,​com.google.protobuf.Empty> deleteReportConfigCallable()
        Deletes a single ReportConfig.

        Sample code:

        
         // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) {
           DeleteReportConfigRequest request =
               DeleteReportConfigRequest.newBuilder()
                   .setName(ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString())
                   .setForce(true)
                   .setRequestId("requestId693933066")
                   .build();
           ApiFuture<Empty> future =
               storageInsightsClient.deleteReportConfigCallable().futureCall(request);
           // Do something.
           future.get();
         }
         
      • listReportDetails

        public final StorageInsightsClient.ListReportDetailsPagedResponse listReportDetails​(ReportConfigName parent)
        Lists ReportDetails in a given project and location.

        Sample code:

        
         // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) {
           ReportConfigName parent = ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]");
           for (ReportDetail element : storageInsightsClient.listReportDetails(parent).iterateAll()) {
             // doThingsWith(element);
           }
         }
         
        Parameters:
        parent - Required. Parent value for ListReportDetailsRequest
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • listReportDetails

        public final StorageInsightsClient.ListReportDetailsPagedResponse listReportDetails​(String parent)
        Lists ReportDetails in a given project and location.

        Sample code:

        
         // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) {
           String parent = ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString();
           for (ReportDetail element : storageInsightsClient.listReportDetails(parent).iterateAll()) {
             // doThingsWith(element);
           }
         }
         
        Parameters:
        parent - Required. Parent value for ListReportDetailsRequest
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • listReportDetails

        public final StorageInsightsClient.ListReportDetailsPagedResponse listReportDetails​(ListReportDetailsRequest request)
        Lists ReportDetails in a given project and location.

        Sample code:

        
         // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) {
           ListReportDetailsRequest request =
               ListReportDetailsRequest.newBuilder()
                   .setParent(
                       ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString())
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .setFilter("filter-1274492040")
                   .setOrderBy("orderBy-1207110587")
                   .build();
           for (ReportDetail element : storageInsightsClient.listReportDetails(request).iterateAll()) {
             // doThingsWith(element);
           }
         }
         
        Parameters:
        request - The request object containing all of the parameters for the API call.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • listReportDetailsPagedCallable

        public final com.google.api.gax.rpc.UnaryCallable<ListReportDetailsRequest,​StorageInsightsClient.ListReportDetailsPagedResponse> listReportDetailsPagedCallable()
        Lists ReportDetails in a given project and location.

        Sample code:

        
         // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) {
           ListReportDetailsRequest request =
               ListReportDetailsRequest.newBuilder()
                   .setParent(
                       ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString())
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .setFilter("filter-1274492040")
                   .setOrderBy("orderBy-1207110587")
                   .build();
           ApiFuture<ReportDetail> future =
               storageInsightsClient.listReportDetailsPagedCallable().futureCall(request);
           // Do something.
           for (ReportDetail element : future.get().iterateAll()) {
             // doThingsWith(element);
           }
         }
         
      • listReportDetailsCallable

        public final com.google.api.gax.rpc.UnaryCallable<ListReportDetailsRequest,​ListReportDetailsResponse> listReportDetailsCallable()
        Lists ReportDetails in a given project and location.

        Sample code:

        
         // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) {
           ListReportDetailsRequest request =
               ListReportDetailsRequest.newBuilder()
                   .setParent(
                       ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString())
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .setFilter("filter-1274492040")
                   .setOrderBy("orderBy-1207110587")
                   .build();
           while (true) {
             ListReportDetailsResponse response =
                 storageInsightsClient.listReportDetailsCallable().call(request);
             for (ReportDetail element : response.getReportDetailsList()) {
               // doThingsWith(element);
             }
             String nextPageToken = response.getNextPageToken();
             if (!Strings.isNullOrEmpty(nextPageToken)) {
               request = request.toBuilder().setPageToken(nextPageToken).build();
             } else {
               break;
             }
           }
         }
         
      • getReportDetail

        public final ReportDetail getReportDetail​(ReportDetailName name)
        Gets details of a single ReportDetail.

        Sample code:

        
         // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) {
           ReportDetailName name =
               ReportDetailName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]", "[REPORT_DETAIL]");
           ReportDetail response = storageInsightsClient.getReportDetail(name);
         }
         
        Parameters:
        name - Required. Name of the resource
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • getReportDetail

        public final ReportDetail getReportDetail​(String name)
        Gets details of a single ReportDetail.

        Sample code:

        
         // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) {
           String name =
               ReportDetailName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]", "[REPORT_DETAIL]")
                   .toString();
           ReportDetail response = storageInsightsClient.getReportDetail(name);
         }
         
        Parameters:
        name - Required. Name of the resource
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • getReportDetail

        public final ReportDetail getReportDetail​(GetReportDetailRequest request)
        Gets details of a single ReportDetail.

        Sample code:

        
         // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) {
           GetReportDetailRequest request =
               GetReportDetailRequest.newBuilder()
                   .setName(
                       ReportDetailName.of(
                               "[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]", "[REPORT_DETAIL]")
                           .toString())
                   .build();
           ReportDetail response = storageInsightsClient.getReportDetail(request);
         }
         
        Parameters:
        request - The request object containing all of the parameters for the API call.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • getReportDetailCallable

        public final com.google.api.gax.rpc.UnaryCallable<GetReportDetailRequest,​ReportDetail> getReportDetailCallable()
        Gets details of a single ReportDetail.

        Sample code:

        
         // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) {
           GetReportDetailRequest request =
               GetReportDetailRequest.newBuilder()
                   .setName(
                       ReportDetailName.of(
                               "[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]", "[REPORT_DETAIL]")
                           .toString())
                   .build();
           ApiFuture<ReportDetail> future =
               storageInsightsClient.getReportDetailCallable().futureCall(request);
           // Do something.
           ReportDetail response = future.get();
         }
         
      • listLocations

        public final StorageInsightsClient.ListLocationsPagedResponse listLocations​(com.google.cloud.location.ListLocationsRequest request)
        Lists information about the supported locations for this service.

        Sample code:

        
         // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) {
           ListLocationsRequest request =
               ListLocationsRequest.newBuilder()
                   .setName("name3373707")
                   .setFilter("filter-1274492040")
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .build();
           for (Location element : storageInsightsClient.listLocations(request).iterateAll()) {
             // doThingsWith(element);
           }
         }
         
        Parameters:
        request - The request object containing all of the parameters for the API call.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • listLocationsPagedCallable

        public final com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.ListLocationsRequest,​StorageInsightsClient.ListLocationsPagedResponse> listLocationsPagedCallable()
        Lists information about the supported locations for this service.

        Sample code:

        
         // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) {
           ListLocationsRequest request =
               ListLocationsRequest.newBuilder()
                   .setName("name3373707")
                   .setFilter("filter-1274492040")
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .build();
           ApiFuture<Location> future =
               storageInsightsClient.listLocationsPagedCallable().futureCall(request);
           // Do something.
           for (Location element : future.get().iterateAll()) {
             // doThingsWith(element);
           }
         }
         
      • listLocationsCallable

        public final com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.ListLocationsRequest,​com.google.cloud.location.ListLocationsResponse> listLocationsCallable()
        Lists information about the supported locations for this service.

        Sample code:

        
         // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) {
           ListLocationsRequest request =
               ListLocationsRequest.newBuilder()
                   .setName("name3373707")
                   .setFilter("filter-1274492040")
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .build();
           while (true) {
             ListLocationsResponse response =
                 storageInsightsClient.listLocationsCallable().call(request);
             for (Location element : response.getLocationsList()) {
               // doThingsWith(element);
             }
             String nextPageToken = response.getNextPageToken();
             if (!Strings.isNullOrEmpty(nextPageToken)) {
               request = request.toBuilder().setPageToken(nextPageToken).build();
             } else {
               break;
             }
           }
         }
         
      • getLocation

        public final com.google.cloud.location.Location getLocation​(com.google.cloud.location.GetLocationRequest request)
        Gets information about a location.

        Sample code:

        
         // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) {
           GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
           Location response = storageInsightsClient.getLocation(request);
         }
         
        Parameters:
        request - The request object containing all of the parameters for the API call.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • getLocationCallable

        public final com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.GetLocationRequest,​com.google.cloud.location.Location> getLocationCallable()
        Gets information about a location.

        Sample code:

        
         // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) {
           GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
           ApiFuture<Location> future = storageInsightsClient.getLocationCallable().futureCall(request);
           // Do something.
           Location response = future.get();
         }
         
      • shutdown

        public void shutdown()
        Specified by:
        shutdown in interface com.google.api.gax.core.BackgroundResource
      • isShutdown

        public boolean isShutdown()
        Specified by:
        isShutdown in interface com.google.api.gax.core.BackgroundResource
      • isTerminated

        public boolean isTerminated()
        Specified by:
        isTerminated in interface com.google.api.gax.core.BackgroundResource
      • shutdownNow

        public void shutdownNow()
        Specified by:
        shutdownNow in interface com.google.api.gax.core.BackgroundResource