diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/Binding.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/Binding.java index 45444e594589..e210c6d808a8 100644 --- a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/Binding.java +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/Binding.java @@ -3179,11 +3179,11 @@ public com.google.protobuf.ByteString getDescriptionBytes() { * * *
-   * Required. The target Agent of the Binding.
+   * Optional. The source Agent of the Binding.
    * 
* * - * .google.cloud.agentregistry.v1.Binding.Source source = 4 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.agentregistry.v1.Binding.Source source = 4 [(.google.api.field_behavior) = OPTIONAL]; * * * @return Whether the source field is set. @@ -3197,11 +3197,11 @@ public boolean hasSource() { * * *
-   * Required. The target Agent of the Binding.
+   * Optional. The source Agent of the Binding.
    * 
* * - * .google.cloud.agentregistry.v1.Binding.Source source = 4 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.agentregistry.v1.Binding.Source source = 4 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The source. @@ -3217,11 +3217,11 @@ public com.google.cloud.agentregistry.v1.Binding.Source getSource() { * * *
-   * Required. The target Agent of the Binding.
+   * Optional. The source Agent of the Binding.
    * 
* * - * .google.cloud.agentregistry.v1.Binding.Source source = 4 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.agentregistry.v1.Binding.Source source = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override @@ -4569,11 +4569,11 @@ public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { * * *
-     * Required. The target Agent of the Binding.
+     * Optional. The source Agent of the Binding.
      * 
* * - * .google.cloud.agentregistry.v1.Binding.Source source = 4 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.agentregistry.v1.Binding.Source source = 4 [(.google.api.field_behavior) = OPTIONAL]; * * * @return Whether the source field is set. @@ -4586,11 +4586,11 @@ public boolean hasSource() { * * *
-     * Required. The target Agent of the Binding.
+     * Optional. The source Agent of the Binding.
      * 
* * - * .google.cloud.agentregistry.v1.Binding.Source source = 4 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.agentregistry.v1.Binding.Source source = 4 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The source. @@ -4609,11 +4609,11 @@ public com.google.cloud.agentregistry.v1.Binding.Source getSource() { * * *
-     * Required. The target Agent of the Binding.
+     * Optional. The source Agent of the Binding.
      * 
* * - * .google.cloud.agentregistry.v1.Binding.Source source = 4 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.agentregistry.v1.Binding.Source source = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder setSource(com.google.cloud.agentregistry.v1.Binding.Source value) { @@ -4634,11 +4634,11 @@ public Builder setSource(com.google.cloud.agentregistry.v1.Binding.Source value) * * *
-     * Required. The target Agent of the Binding.
+     * Optional. The source Agent of the Binding.
      * 
* * - * .google.cloud.agentregistry.v1.Binding.Source source = 4 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.agentregistry.v1.Binding.Source source = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder setSource( @@ -4657,11 +4657,11 @@ public Builder setSource( * * *
-     * Required. The target Agent of the Binding.
+     * Optional. The source Agent of the Binding.
      * 
* * - * .google.cloud.agentregistry.v1.Binding.Source source = 4 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.agentregistry.v1.Binding.Source source = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder mergeSource(com.google.cloud.agentregistry.v1.Binding.Source value) { @@ -4687,11 +4687,11 @@ public Builder mergeSource(com.google.cloud.agentregistry.v1.Binding.Source valu * * *
-     * Required. The target Agent of the Binding.
+     * Optional. The source Agent of the Binding.
      * 
* * - * .google.cloud.agentregistry.v1.Binding.Source source = 4 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.agentregistry.v1.Binding.Source source = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder clearSource() { @@ -4709,11 +4709,11 @@ public Builder clearSource() { * * *
-     * Required. The target Agent of the Binding.
+     * Optional. The source Agent of the Binding.
      * 
* * - * .google.cloud.agentregistry.v1.Binding.Source source = 4 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.agentregistry.v1.Binding.Source source = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.cloud.agentregistry.v1.Binding.Source.Builder getSourceBuilder() { @@ -4726,11 +4726,11 @@ public com.google.cloud.agentregistry.v1.Binding.Source.Builder getSourceBuilder * * *
-     * Required. The target Agent of the Binding.
+     * Optional. The source Agent of the Binding.
      * 
* * - * .google.cloud.agentregistry.v1.Binding.Source source = 4 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.agentregistry.v1.Binding.Source source = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.cloud.agentregistry.v1.Binding.SourceOrBuilder getSourceOrBuilder() { @@ -4747,11 +4747,11 @@ public com.google.cloud.agentregistry.v1.Binding.SourceOrBuilder getSourceOrBuil * * *
-     * Required. The target Agent of the Binding.
+     * Optional. The source Agent of the Binding.
      * 
* * - * .google.cloud.agentregistry.v1.Binding.Source source = 4 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.agentregistry.v1.Binding.Source source = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ private com.google.protobuf.SingleFieldBuilder< diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/BindingOrBuilder.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/BindingOrBuilder.java index f70379dd797a..687e392e972a 100644 --- a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/BindingOrBuilder.java +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/BindingOrBuilder.java @@ -159,11 +159,11 @@ public interface BindingOrBuilder * * *
-   * Required. The target Agent of the Binding.
+   * Optional. The source Agent of the Binding.
    * 
* * - * .google.cloud.agentregistry.v1.Binding.Source source = 4 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.agentregistry.v1.Binding.Source source = 4 [(.google.api.field_behavior) = OPTIONAL]; * * * @return Whether the source field is set. @@ -174,11 +174,11 @@ public interface BindingOrBuilder * * *
-   * Required. The target Agent of the Binding.
+   * Optional. The source Agent of the Binding.
    * 
* * - * .google.cloud.agentregistry.v1.Binding.Source source = 4 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.agentregistry.v1.Binding.Source source = 4 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The source. @@ -189,11 +189,11 @@ public interface BindingOrBuilder * * *
-   * Required. The target Agent of the Binding.
+   * Optional. The source Agent of the Binding.
    * 
* * - * .google.cloud.agentregistry.v1.Binding.Source source = 4 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.agentregistry.v1.Binding.Source source = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ com.google.cloud.agentregistry.v1.Binding.SourceOrBuilder getSourceOrBuilder(); diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/BindingProto.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/BindingProto.java index 315780f52670..43d76a78c5b6 100644 --- a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/BindingProto.java +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/BindingProto.java @@ -77,7 +77,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\014display_name\030\002 \001(\tB\003\340A\001\022\030\n" + "\013description\030\003 \001(\tB\003\340A\001\022B\n" + "\006source\030\004" - + " \001(\0132-.google.cloud.agentregistry.v1.Binding.SourceB\003\340A\002\022B\n" + + " \001(\0132-.google.cloud.agentregistry.v1.Binding.SourceB\003\340A\001\022B\n" + "\006target\030\005 \001(\0132-.goog" + "le.cloud.agentregistry.v1.Binding.TargetB\003\340A\002\0224\n" + "\013create_time\030\007 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/proto/google/cloud/agentregistry/v1/agentregistry_service.proto b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/proto/google/cloud/agentregistry/v1/agentregistry_service.proto index 682a95bf32a1..e78849890b7d 100644 --- a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/proto/google/cloud/agentregistry/v1/agentregistry_service.proto +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/proto/google/cloud/agentregistry/v1/agentregistry_service.proto @@ -635,7 +635,7 @@ message CreateServiceRequest { // Message for fetching available Bindings. message FetchAvailableBindingsRequest { - // The reference of the source Agent. + // Required. The reference of the source Agent Registry resource. oneof source { // The identifier of the source Agent. // Format: diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/proto/google/cloud/agentregistry/v1/binding.proto b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/proto/google/cloud/agentregistry/v1/binding.proto index 6a9ce81c3313..4fc1427d9ad4 100644 --- a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/proto/google/cloud/agentregistry/v1/binding.proto +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/proto/google/cloud/agentregistry/v1/binding.proto @@ -104,8 +104,8 @@ message Binding { // Can have a maximum length of `2048` characters. string description = 3 [(google.api.field_behavior) = OPTIONAL]; - // Required. The target Agent of the Binding. - Source source = 4 [(google.api.field_behavior) = REQUIRED]; + // Optional. The source Agent of the Binding. + Source source = 4 [(google.api.field_behavior) = OPTIONAL]; // Required. The target Agent Registry Resource of the Binding. Target target = 5 [(google.api.field_behavior) = REQUIRED]; diff --git a/java-analytics-data/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/AlphaAnalyticsDataClient.java b/java-analytics-data/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/AlphaAnalyticsDataClient.java index 37eea0c0fe3a..89d6f27df011 100644 --- a/java-analytics-data/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/AlphaAnalyticsDataClient.java +++ b/java-analytics-data/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/AlphaAnalyticsDataClient.java @@ -345,6 +345,21 @@ * * * + *

Chat + *

Provides a chat interface for interacting with Google Analytics data through the API. + *

This product uses AI and may display inaccurate info. Your chat activity may be used to improve the product and your use is subject to Google's [Terms](https://policies.google.com/terms), [AI Use Policy](https://policies.google.com/terms/generative-ai/use-policy), and [Privacy Policy](https://policies.google.com/privacy). [Learn more about Chat AI Privacy](https://support.google.com/helpguide/answer/14185196). + * + *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ * + *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ * + * + * + * *

RunReport *

Returns a customized report of your Google Analytics event data. Reports contain statistics derived from data collected by the Google Analytics tracking code. The data returned from the API is as a table with columns for the requested dimensions and metrics. Metrics are individual measurements of user activity on your property, such as active users or event count. Dimensions break down metrics across some common criteria, such as country or event name. * @@ -2627,6 +2642,81 @@ public final ListReportTasksPagedResponse listReportTasks(ListReportTasksRequest return stub.listReportTasksCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Provides a chat interface for interacting with Google Analytics data through the API. + * + *

This product uses AI and may display inaccurate info. Your chat activity may be used to + * improve the product and your use is subject to Google's + * [Terms](https://policies.google.com/terms), [AI Use + * Policy](https://policies.google.com/terms/generative-ai/use-policy), and [Privacy + * Policy](https://policies.google.com/privacy). [Learn more about Chat AI + * Privacy](https://support.google.com/helpguide/answer/14185196). + * + *

Sample code: + * + *

{@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 (AlphaAnalyticsDataClient alphaAnalyticsDataClient = AlphaAnalyticsDataClient.create()) {
+   *   ChatRequest request =
+   *       ChatRequest.newBuilder()
+   *           .setProperty(PropertyName.of("[PROPERTY]").toString())
+   *           .setUserQuery("userQuery326624189")
+   *           .setSessionId("sessionId607796817")
+   *           .setReturnPropertyQuota(true)
+   *           .build();
+   *   ChatResponse response = alphaAnalyticsDataClient.chat(request);
+   * }
+   * }
+ * + * @param 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 + */ + public final ChatResponse chat(ChatRequest request) { + return chatCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Provides a chat interface for interacting with Google Analytics data through the API. + * + *

This product uses AI and may display inaccurate info. Your chat activity may be used to + * improve the product and your use is subject to Google's + * [Terms](https://policies.google.com/terms), [AI Use + * Policy](https://policies.google.com/terms/generative-ai/use-policy), and [Privacy + * Policy](https://policies.google.com/privacy). [Learn more about Chat AI + * Privacy](https://support.google.com/helpguide/answer/14185196). + * + *

Sample code: + * + *

{@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 (AlphaAnalyticsDataClient alphaAnalyticsDataClient = AlphaAnalyticsDataClient.create()) {
+   *   ChatRequest request =
+   *       ChatRequest.newBuilder()
+   *           .setProperty(PropertyName.of("[PROPERTY]").toString())
+   *           .setUserQuery("userQuery326624189")
+   *           .setSessionId("sessionId607796817")
+   *           .setReturnPropertyQuota(true)
+   *           .build();
+   *   ApiFuture future = alphaAnalyticsDataClient.chatCallable().futureCall(request);
+   *   // Do something.
+   *   ChatResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable chatCallable() { + return stub.chatCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Returns a customized report of your Google Analytics event data. Reports contain statistics diff --git a/java-analytics-data/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/AlphaAnalyticsDataSettings.java b/java-analytics-data/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/AlphaAnalyticsDataSettings.java index 820cf19b987b..c32cdc149332 100644 --- a/java-analytics-data/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/AlphaAnalyticsDataSettings.java +++ b/java-analytics-data/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/AlphaAnalyticsDataSettings.java @@ -217,6 +217,11 @@ public UnaryCallSettings getReportTaskSettings return ((AlphaAnalyticsDataStubSettings) getStubSettings()).listReportTasksSettings(); } + /** Returns the object with the settings used for calls to chat. */ + public UnaryCallSettings chatSettings() { + return ((AlphaAnalyticsDataStubSettings) getStubSettings()).chatSettings(); + } + /** Returns the object with the settings used for calls to runReport. */ public UnaryCallSettings runReportSettings() { return ((AlphaAnalyticsDataStubSettings) getStubSettings()).runReportSettings(); @@ -434,6 +439,11 @@ public UnaryCallSettings.Builder getReportTask return getStubSettingsBuilder().listReportTasksSettings(); } + /** Returns the builder for the settings used for calls to chat. */ + public UnaryCallSettings.Builder chatSettings() { + return getStubSettingsBuilder().chatSettings(); + } + /** Returns the builder for the settings used for calls to runReport. */ public UnaryCallSettings.Builder runReportSettings() { return getStubSettingsBuilder().runReportSettings(); diff --git a/java-analytics-data/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/gapic_metadata.json b/java-analytics-data/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/gapic_metadata.json index 139c1f3163b5..91d2c6218942 100644 --- a/java-analytics-data/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/gapic_metadata.json +++ b/java-analytics-data/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/gapic_metadata.json @@ -10,6 +10,9 @@ "grpc": { "libraryClient": "AlphaAnalyticsDataClient", "rpcs": { + "Chat": { + "methods": ["chat", "chatCallable"] + }, "CreateAudienceList": { "methods": ["createAudienceListAsync", "createAudienceListAsync", "createAudienceListAsync", "createAudienceListOperationCallable", "createAudienceListCallable"] }, diff --git a/java-analytics-data/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/stub/AlphaAnalyticsDataStub.java b/java-analytics-data/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/stub/AlphaAnalyticsDataStub.java index aeb6a63943c5..01c11506b160 100644 --- a/java-analytics-data/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/stub/AlphaAnalyticsDataStub.java +++ b/java-analytics-data/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/stub/AlphaAnalyticsDataStub.java @@ -22,6 +22,8 @@ import com.google.analytics.data.v1alpha.AudienceList; import com.google.analytics.data.v1alpha.AudienceListMetadata; +import com.google.analytics.data.v1alpha.ChatRequest; +import com.google.analytics.data.v1alpha.ChatResponse; import com.google.analytics.data.v1alpha.CreateAudienceListRequest; import com.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest; import com.google.analytics.data.v1alpha.CreateReportTaskRequest; @@ -166,6 +168,10 @@ public UnaryCallable listReport throw new UnsupportedOperationException("Not implemented: listReportTasksCallable()"); } + public UnaryCallable chatCallable() { + throw new UnsupportedOperationException("Not implemented: chatCallable()"); + } + public UnaryCallable runReportCallable() { throw new UnsupportedOperationException("Not implemented: runReportCallable()"); } diff --git a/java-analytics-data/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/stub/AlphaAnalyticsDataStubSettings.java b/java-analytics-data/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/stub/AlphaAnalyticsDataStubSettings.java index 956aa2f25341..df2b6e326353 100644 --- a/java-analytics-data/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/stub/AlphaAnalyticsDataStubSettings.java +++ b/java-analytics-data/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/stub/AlphaAnalyticsDataStubSettings.java @@ -22,6 +22,8 @@ import com.google.analytics.data.v1alpha.AudienceList; import com.google.analytics.data.v1alpha.AudienceListMetadata; +import com.google.analytics.data.v1alpha.ChatRequest; +import com.google.analytics.data.v1alpha.ChatResponse; import com.google.analytics.data.v1alpha.CreateAudienceListRequest; import com.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest; import com.google.analytics.data.v1alpha.CreateReportTaskRequest; @@ -178,6 +180,7 @@ public class AlphaAnalyticsDataStubSettings extends StubSettings DEFAULT_SERVICE_SCOPES = ImmutableList.builder() .add("https://www.googleapis.com/auth/analytics") + .add("https://www.googleapis.com/auth/analytics.chatbot.read") .add("https://www.googleapis.com/auth/analytics.readonly") .build(); @@ -212,6 +215,7 @@ public class AlphaAnalyticsDataStubSettings extends StubSettings listReportTasksSettings; + private final UnaryCallSettings chatSettings; private final UnaryCallSettings runReportSettings; private final UnaryCallSettings getMetadataSettings; @@ -494,6 +498,11 @@ public UnaryCallSettings getReportTaskSettings return listReportTasksSettings; } + /** Returns the object with the settings used for calls to chat. */ + public UnaryCallSettings chatSettings() { + return chatSettings; + } + /** Returns the object with the settings used for calls to runReport. */ public UnaryCallSettings runReportSettings() { return runReportSettings; @@ -633,6 +642,7 @@ protected AlphaAnalyticsDataStubSettings(Builder settingsBuilder) throws IOExcep queryReportTaskSettings = settingsBuilder.queryReportTaskSettings().build(); getReportTaskSettings = settingsBuilder.getReportTaskSettings().build(); listReportTasksSettings = settingsBuilder.listReportTasksSettings().build(); + chatSettings = settingsBuilder.chatSettings().build(); runReportSettings = settingsBuilder.runReportSettings().build(); getMetadataSettings = settingsBuilder.getMetadataSettings().build(); } @@ -688,6 +698,7 @@ public static class Builder private final PagedCallSettings.Builder< ListReportTasksRequest, ListReportTasksResponse, ListReportTasksPagedResponse> listReportTasksSettings; + private final UnaryCallSettings.Builder chatSettings; private final UnaryCallSettings.Builder runReportSettings; private final UnaryCallSettings.Builder getMetadataSettings; private static final ImmutableMap> @@ -754,6 +765,7 @@ protected Builder(@Nullable ClientContext clientContext) { queryReportTaskSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); getReportTaskSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); listReportTasksSettings = PagedCallSettings.newBuilder(LIST_REPORT_TASKS_PAGE_STR_FACT); + chatSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); runReportSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); getMetadataSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); @@ -772,6 +784,7 @@ protected Builder(@Nullable ClientContext clientContext) { queryReportTaskSettings, getReportTaskSettings, listReportTasksSettings, + chatSettings, runReportSettings, getMetadataSettings); initDefaults(this); @@ -797,6 +810,7 @@ protected Builder(AlphaAnalyticsDataStubSettings settings) { queryReportTaskSettings = settings.queryReportTaskSettings.toBuilder(); getReportTaskSettings = settings.getReportTaskSettings.toBuilder(); listReportTasksSettings = settings.listReportTasksSettings.toBuilder(); + chatSettings = settings.chatSettings.toBuilder(); runReportSettings = settings.runReportSettings.toBuilder(); getMetadataSettings = settings.getMetadataSettings.toBuilder(); @@ -815,6 +829,7 @@ protected Builder(AlphaAnalyticsDataStubSettings settings) { queryReportTaskSettings, getReportTaskSettings, listReportTasksSettings, + chatSettings, runReportSettings, getMetadataSettings); } @@ -909,6 +924,11 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + builder + .chatSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + builder .runReportSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) @@ -1080,6 +1100,11 @@ public UnaryCallSettings.Builder getReportTask return listReportTasksSettings; } + /** Returns the builder for the settings used for calls to chat. */ + public UnaryCallSettings.Builder chatSettings() { + return chatSettings; + } + /** Returns the builder for the settings used for calls to runReport. */ public UnaryCallSettings.Builder runReportSettings() { return runReportSettings; diff --git a/java-analytics-data/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/stub/GrpcAlphaAnalyticsDataStub.java b/java-analytics-data/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/stub/GrpcAlphaAnalyticsDataStub.java index b85a3fcb2180..16560e613d17 100644 --- a/java-analytics-data/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/stub/GrpcAlphaAnalyticsDataStub.java +++ b/java-analytics-data/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/stub/GrpcAlphaAnalyticsDataStub.java @@ -22,6 +22,8 @@ import com.google.analytics.data.v1alpha.AudienceList; import com.google.analytics.data.v1alpha.AudienceListMetadata; +import com.google.analytics.data.v1alpha.ChatRequest; +import com.google.analytics.data.v1alpha.ChatResponse; import com.google.analytics.data.v1alpha.CreateAudienceListRequest; import com.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest; import com.google.analytics.data.v1alpha.CreateReportTaskRequest; @@ -239,6 +241,15 @@ public class GrpcAlphaAnalyticsDataStub extends AlphaAnalyticsDataStub { .setSampledToLocalTracing(true) .build(); + private static final MethodDescriptor chatMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.analytics.data.v1alpha.AlphaAnalyticsData/Chat") + .setRequestMarshaller(ProtoUtils.marshaller(ChatRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ChatResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + private static final MethodDescriptor runReportMethodDescriptor = MethodDescriptor.newBuilder() @@ -291,6 +302,7 @@ public class GrpcAlphaAnalyticsDataStub extends AlphaAnalyticsDataStub { listReportTasksCallable; private final UnaryCallable listReportTasksPagedCallable; + private final UnaryCallable chatCallable; private final UnaryCallable runReportCallable; private final UnaryCallable getMetadataCallable; @@ -488,6 +500,17 @@ protected GrpcAlphaAnalyticsDataStub( }) .setResourceNameExtractor(request -> request.getParent()) .build(); + GrpcCallSettings chatTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(chatMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("property", String.valueOf(request.getProperty())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getProperty()) + .build(); GrpcCallSettings runReportTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(runReportMethodDescriptor) @@ -588,6 +611,9 @@ protected GrpcAlphaAnalyticsDataStub( this.listReportTasksPagedCallable = callableFactory.createPagedCallable( listReportTasksTransportSettings, settings.listReportTasksSettings(), clientContext); + this.chatCallable = + callableFactory.createUnaryCallable( + chatTransportSettings, settings.chatSettings(), clientContext); this.runReportCallable = callableFactory.createUnaryCallable( runReportTransportSettings, settings.runReportSettings(), clientContext); @@ -704,6 +730,11 @@ public UnaryCallable listReport return listReportTasksPagedCallable; } + @Override + public UnaryCallable chatCallable() { + return chatCallable; + } + @Override public UnaryCallable runReportCallable() { return runReportCallable; diff --git a/java-analytics-data/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/stub/HttpJsonAlphaAnalyticsDataStub.java b/java-analytics-data/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/stub/HttpJsonAlphaAnalyticsDataStub.java index 00dd5e555b04..8f4a7c298f7e 100644 --- a/java-analytics-data/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/stub/HttpJsonAlphaAnalyticsDataStub.java +++ b/java-analytics-data/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/stub/HttpJsonAlphaAnalyticsDataStub.java @@ -22,6 +22,8 @@ import com.google.analytics.data.v1alpha.AudienceList; import com.google.analytics.data.v1alpha.AudienceListMetadata; +import com.google.analytics.data.v1alpha.ChatRequest; +import com.google.analytics.data.v1alpha.ChatResponse; import com.google.analytics.data.v1alpha.CreateAudienceListRequest; import com.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest; import com.google.analytics.data.v1alpha.CreateReportTaskRequest; @@ -581,6 +583,40 @@ public class HttpJsonAlphaAnalyticsDataStub extends AlphaAnalyticsDataStub { .build()) .build(); + private static final ApiMethodDescriptor chatMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.analytics.data.v1alpha.AlphaAnalyticsData/Chat") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{property=properties/*}:chat", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = ProtoRestSerializer.create(); + serializer.putPathParam(fields, "property", request.getProperty()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearProperty().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ChatResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + private static final ApiMethodDescriptor runReportMethodDescriptor = ApiMethodDescriptor.newBuilder() @@ -685,6 +721,7 @@ public class HttpJsonAlphaAnalyticsDataStub extends AlphaAnalyticsDataStub { listReportTasksCallable; private final UnaryCallable listReportTasksPagedCallable; + private final UnaryCallable chatCallable; private final UnaryCallable runReportCallable; private final UnaryCallable getMetadataCallable; @@ -901,6 +938,18 @@ protected HttpJsonAlphaAnalyticsDataStub( }) .setResourceNameExtractor(request -> request.getParent()) .build(); + HttpJsonCallSettings chatTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(chatMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("property", String.valueOf(request.getProperty())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getProperty()) + .build(); HttpJsonCallSettings runReportTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(runReportMethodDescriptor) @@ -1003,6 +1052,9 @@ protected HttpJsonAlphaAnalyticsDataStub( this.listReportTasksPagedCallable = callableFactory.createPagedCallable( listReportTasksTransportSettings, settings.listReportTasksSettings(), clientContext); + this.chatCallable = + callableFactory.createUnaryCallable( + chatTransportSettings, settings.chatSettings(), clientContext); this.runReportCallable = callableFactory.createUnaryCallable( runReportTransportSettings, settings.runReportSettings(), clientContext); @@ -1030,6 +1082,7 @@ public static List getMethodDescriptors() { methodDescriptors.add(queryReportTaskMethodDescriptor); methodDescriptors.add(getReportTaskMethodDescriptor); methodDescriptors.add(listReportTasksMethodDescriptor); + methodDescriptors.add(chatMethodDescriptor); methodDescriptors.add(runReportMethodDescriptor); methodDescriptors.add(getMetadataMethodDescriptor); return methodDescriptors; @@ -1140,6 +1193,11 @@ public UnaryCallable listReport return listReportTasksPagedCallable; } + @Override + public UnaryCallable chatCallable() { + return chatCallable; + } + @Override public UnaryCallable runReportCallable() { return runReportCallable; diff --git a/java-analytics-data/google-analytics-data/src/main/resources/META-INF/native-image/com.google.analytics.data.v1alpha/reflect-config.json b/java-analytics-data/google-analytics-data/src/main/resources/META-INF/native-image/com.google.analytics.data.v1alpha/reflect-config.json index d7abe0dc7d28..d2af80dcc840 100644 --- a/java-analytics-data/google-analytics-data/src/main/resources/META-INF/native-image/com.google.analytics.data.v1alpha/reflect-config.json +++ b/java-analytics-data/google-analytics-data/src/main/resources/META-INF/native-image/com.google.analytics.data.v1alpha/reflect-config.json @@ -116,6 +116,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.analytics.data.v1alpha.ChatRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.analytics.data.v1alpha.ChatRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.analytics.data.v1alpha.ChatResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.analytics.data.v1alpha.ChatResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.analytics.data.v1alpha.Cohort", "queryAllDeclaredConstructors": true, @@ -1313,6 +1349,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.analytics.data.v1alpha.PropertyChatQuota", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.analytics.data.v1alpha.PropertyChatQuota$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.analytics.data.v1alpha.PropertyQuota", "queryAllDeclaredConstructors": true, @@ -1538,6 +1592,96 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.analytics.data.v1alpha.ResponseBlock", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.analytics.data.v1alpha.ResponseBlock$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.analytics.data.v1alpha.ResponseBlock$DataTable", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.analytics.data.v1alpha.ResponseBlock$DataTable$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.analytics.data.v1alpha.ResponseBlock$DataTableCell", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.analytics.data.v1alpha.ResponseBlock$DataTableCell$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.analytics.data.v1alpha.ResponseBlock$DataTableHeader", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.analytics.data.v1alpha.ResponseBlock$DataTableHeader$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.analytics.data.v1alpha.ResponseBlock$DataTableRow", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.analytics.data.v1alpha.ResponseBlock$DataTableRow$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.analytics.data.v1alpha.ResponseMetaData", "queryAllDeclaredConstructors": true, @@ -1556,6 +1700,51 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.analytics.data.v1alpha.ResponseMetaData$DataTruncationReason", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.analytics.data.v1alpha.ResponseMetaData$DataTruncationReason$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.analytics.data.v1alpha.ResponseMetaData$DataTruncationReason$DataTruncationDateRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.analytics.data.v1alpha.ResponseMetaData$DataTruncationReason$DataTruncationDateRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.analytics.data.v1alpha.ResponseMetaData$DataTruncationReason$DataTruncationType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.analytics.data.v1alpha.ResponseMetaData$SchemaRestrictionResponse", "queryAllDeclaredConstructors": true, diff --git a/java-analytics-data/google-analytics-data/src/test/java/com/google/analytics/data/v1alpha/AlphaAnalyticsDataClientHttpJsonTest.java b/java-analytics-data/google-analytics-data/src/test/java/com/google/analytics/data/v1alpha/AlphaAnalyticsDataClientHttpJsonTest.java index 0098e8b5ad91..1a7b27e47ea1 100644 --- a/java-analytics-data/google-analytics-data/src/test/java/com/google/analytics/data/v1alpha/AlphaAnalyticsDataClientHttpJsonTest.java +++ b/java-analytics-data/google-analytics-data/src/test/java/com/google/analytics/data/v1alpha/AlphaAnalyticsDataClientHttpJsonTest.java @@ -1284,6 +1284,64 @@ public void listReportTasksExceptionTest2() throws Exception { } } + @Test + public void chatTest() throws Exception { + ChatResponse expectedResponse = + ChatResponse.newBuilder() + .setSessionId("sessionId607796817") + .addAllBlocks(new ArrayList()) + .setPropertyQuota(PropertyChatQuota.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + ChatRequest request = + ChatRequest.newBuilder() + .setProperty(PropertyName.of("[PROPERTY]").toString()) + .setUserQuery("userQuery326624189") + .setSessionId("sessionId607796817") + .setReturnPropertyQuota(true) + .build(); + + ChatResponse actualResponse = client.chat(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void chatExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ChatRequest request = + ChatRequest.newBuilder() + .setProperty(PropertyName.of("[PROPERTY]").toString()) + .setUserQuery("userQuery326624189") + .setSessionId("sessionId607796817") + .setReturnPropertyQuota(true) + .build(); + client.chat(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void runReportTest() throws Exception { RunReportResponse expectedResponse = diff --git a/java-analytics-data/google-analytics-data/src/test/java/com/google/analytics/data/v1alpha/AlphaAnalyticsDataClientTest.java b/java-analytics-data/google-analytics-data/src/test/java/com/google/analytics/data/v1alpha/AlphaAnalyticsDataClientTest.java index 777e49a02e54..6024c95e82f3 100644 --- a/java-analytics-data/google-analytics-data/src/test/java/com/google/analytics/data/v1alpha/AlphaAnalyticsDataClientTest.java +++ b/java-analytics-data/google-analytics-data/src/test/java/com/google/analytics/data/v1alpha/AlphaAnalyticsDataClientTest.java @@ -1186,6 +1186,61 @@ public void listReportTasksExceptionTest2() throws Exception { } } + @Test + public void chatTest() throws Exception { + ChatResponse expectedResponse = + ChatResponse.newBuilder() + .setSessionId("sessionId607796817") + .addAllBlocks(new ArrayList()) + .setPropertyQuota(PropertyChatQuota.newBuilder().build()) + .build(); + mockAlphaAnalyticsData.addResponse(expectedResponse); + + ChatRequest request = + ChatRequest.newBuilder() + .setProperty(PropertyName.of("[PROPERTY]").toString()) + .setUserQuery("userQuery326624189") + .setSessionId("sessionId607796817") + .setReturnPropertyQuota(true) + .build(); + + ChatResponse actualResponse = client.chat(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAlphaAnalyticsData.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ChatRequest actualRequest = ((ChatRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getProperty(), actualRequest.getProperty()); + Assert.assertEquals(request.getUserQuery(), actualRequest.getUserQuery()); + Assert.assertEquals(request.getSessionId(), actualRequest.getSessionId()); + Assert.assertEquals(request.getReturnPropertyQuota(), actualRequest.getReturnPropertyQuota()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void chatExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAlphaAnalyticsData.addException(exception); + + try { + ChatRequest request = + ChatRequest.newBuilder() + .setProperty(PropertyName.of("[PROPERTY]").toString()) + .setUserQuery("userQuery326624189") + .setSessionId("sessionId607796817") + .setReturnPropertyQuota(true) + .build(); + client.chat(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void runReportTest() throws Exception { RunReportResponse expectedResponse = diff --git a/java-analytics-data/google-analytics-data/src/test/java/com/google/analytics/data/v1alpha/MockAlphaAnalyticsDataImpl.java b/java-analytics-data/google-analytics-data/src/test/java/com/google/analytics/data/v1alpha/MockAlphaAnalyticsDataImpl.java index 0a8e5073c749..0f041952efa0 100644 --- a/java-analytics-data/google-analytics-data/src/test/java/com/google/analytics/data/v1alpha/MockAlphaAnalyticsDataImpl.java +++ b/java-analytics-data/google-analytics-data/src/test/java/com/google/analytics/data/v1alpha/MockAlphaAnalyticsDataImpl.java @@ -342,6 +342,26 @@ public void listReportTasks( } } + @Override + public void chat(ChatRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ChatResponse) { + requests.add(request); + responseObserver.onNext(((ChatResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method Chat, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ChatResponse.class.getName(), + Exception.class.getName()))); + } + } + @Override public void runReport( RunReportRequest request, StreamObserver responseObserver) { diff --git a/java-analytics-data/grpc-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/AlphaAnalyticsDataGrpc.java b/java-analytics-data/grpc-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/AlphaAnalyticsDataGrpc.java index d5d05e88c5ce..f56b05ae5f3a 100644 --- a/java-analytics-data/grpc-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/AlphaAnalyticsDataGrpc.java +++ b/java-analytics-data/grpc-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/AlphaAnalyticsDataGrpc.java @@ -669,6 +669,50 @@ private AlphaAnalyticsDataGrpc() {} return getListReportTasksMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.data.v1alpha.ChatRequest, + com.google.analytics.data.v1alpha.ChatResponse> + getChatMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "Chat", + requestType = com.google.analytics.data.v1alpha.ChatRequest.class, + responseType = com.google.analytics.data.v1alpha.ChatResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.data.v1alpha.ChatRequest, + com.google.analytics.data.v1alpha.ChatResponse> + getChatMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.data.v1alpha.ChatRequest, + com.google.analytics.data.v1alpha.ChatResponse> + getChatMethod; + if ((getChatMethod = AlphaAnalyticsDataGrpc.getChatMethod) == null) { + synchronized (AlphaAnalyticsDataGrpc.class) { + if ((getChatMethod = AlphaAnalyticsDataGrpc.getChatMethod) == null) { + AlphaAnalyticsDataGrpc.getChatMethod = + getChatMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Chat")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.data.v1alpha.ChatRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.data.v1alpha.ChatResponse.getDefaultInstance())) + .setSchemaDescriptor(new AlphaAnalyticsDataMethodDescriptorSupplier("Chat")) + .build(); + } + } + } + return getChatMethod; + } + private static volatile io.grpc.MethodDescriptor< com.google.analytics.data.v1alpha.RunReportRequest, com.google.analytics.data.v1alpha.RunReportResponse> @@ -1133,6 +1177,29 @@ default void listReportTasks( getListReportTasksMethod(), responseObserver); } + /** + * + * + *
+     * Provides a chat interface for interacting with Google Analytics data
+     * through the API.
+     * This product uses AI and may display inaccurate info. Your chat activity
+     * may be used to improve the product and your use is subject to Google's
+     * [Terms](https://policies.google.com/terms),
+     * [AI Use
+     * Policy](https://policies.google.com/terms/generative-ai/use-policy), and
+     * [Privacy Policy](https://policies.google.com/privacy).
+     * [Learn more about Chat AI
+     * Privacy](https://support.google.com/helpguide/answer/14185196).
+     * 
+ */ + default void chat( + com.google.analytics.data.v1alpha.ChatRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getChatMethod(), responseObserver); + } + /** * * @@ -1545,6 +1612,30 @@ public void listReportTasks( responseObserver); } + /** + * + * + *
+     * Provides a chat interface for interacting with Google Analytics data
+     * through the API.
+     * This product uses AI and may display inaccurate info. Your chat activity
+     * may be used to improve the product and your use is subject to Google's
+     * [Terms](https://policies.google.com/terms),
+     * [AI Use
+     * Policy](https://policies.google.com/terms/generative-ai/use-policy), and
+     * [Privacy Policy](https://policies.google.com/privacy).
+     * [Learn more about Chat AI
+     * Privacy](https://support.google.com/helpguide/answer/14185196).
+     * 
+ */ + public void chat( + com.google.analytics.data.v1alpha.ChatRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getChatMethod(), getCallOptions()), request, responseObserver); + } + /** * * @@ -1908,6 +1999,28 @@ public com.google.analytics.data.v1alpha.ListReportTasksResponse listReportTasks getChannel(), getListReportTasksMethod(), getCallOptions(), request); } + /** + * + * + *
+     * Provides a chat interface for interacting with Google Analytics data
+     * through the API.
+     * This product uses AI and may display inaccurate info. Your chat activity
+     * may be used to improve the product and your use is subject to Google's
+     * [Terms](https://policies.google.com/terms),
+     * [AI Use
+     * Policy](https://policies.google.com/terms/generative-ai/use-policy), and
+     * [Privacy Policy](https://policies.google.com/privacy).
+     * [Learn more about Chat AI
+     * Privacy](https://support.google.com/helpguide/answer/14185196).
+     * 
+ */ + public com.google.analytics.data.v1alpha.ChatResponse chat( + com.google.analytics.data.v1alpha.ChatRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getChatMethod(), getCallOptions(), request); + } + /** * * @@ -2254,6 +2367,28 @@ public com.google.analytics.data.v1alpha.ListReportTasksResponse listReportTasks getChannel(), getListReportTasksMethod(), getCallOptions(), request); } + /** + * + * + *
+     * Provides a chat interface for interacting with Google Analytics data
+     * through the API.
+     * This product uses AI and may display inaccurate info. Your chat activity
+     * may be used to improve the product and your use is subject to Google's
+     * [Terms](https://policies.google.com/terms),
+     * [AI Use
+     * Policy](https://policies.google.com/terms/generative-ai/use-policy), and
+     * [Privacy Policy](https://policies.google.com/privacy).
+     * [Learn more about Chat AI
+     * Privacy](https://support.google.com/helpguide/answer/14185196).
+     * 
+ */ + public com.google.analytics.data.v1alpha.ChatResponse chat( + com.google.analytics.data.v1alpha.ChatRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getChatMethod(), getCallOptions(), request); + } + /** * * @@ -2612,6 +2747,29 @@ protected AlphaAnalyticsDataFutureStub build( getChannel().newCall(getListReportTasksMethod(), getCallOptions()), request); } + /** + * + * + *
+     * Provides a chat interface for interacting with Google Analytics data
+     * through the API.
+     * This product uses AI and may display inaccurate info. Your chat activity
+     * may be used to improve the product and your use is subject to Google's
+     * [Terms](https://policies.google.com/terms),
+     * [AI Use
+     * Policy](https://policies.google.com/terms/generative-ai/use-policy), and
+     * [Privacy Policy](https://policies.google.com/privacy).
+     * [Learn more about Chat AI
+     * Privacy](https://support.google.com/helpguide/answer/14185196).
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.analytics.data.v1alpha.ChatResponse> + chat(com.google.analytics.data.v1alpha.ChatRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getChatMethod(), getCallOptions()), request); + } + /** * * @@ -2668,8 +2826,9 @@ protected AlphaAnalyticsDataFutureStub build( private static final int METHODID_QUERY_REPORT_TASK = 10; private static final int METHODID_GET_REPORT_TASK = 11; private static final int METHODID_LIST_REPORT_TASKS = 12; - private static final int METHODID_RUN_REPORT = 13; - private static final int METHODID_GET_METADATA = 14; + private static final int METHODID_CHAT = 13; + private static final int METHODID_RUN_REPORT = 14; + private static final int METHODID_GET_METADATA = 15; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -2771,6 +2930,12 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv com.google.analytics.data.v1alpha.ListReportTasksResponse>) responseObserver); break; + case METHODID_CHAT: + serviceImpl.chat( + (com.google.analytics.data.v1alpha.ChatRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; case METHODID_RUN_REPORT: serviceImpl.runReport( (com.google.analytics.data.v1alpha.RunReportRequest) request, @@ -2890,6 +3055,12 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser com.google.analytics.data.v1alpha.ListReportTasksRequest, com.google.analytics.data.v1alpha.ListReportTasksResponse>( service, METHODID_LIST_REPORT_TASKS))) + .addMethod( + getChatMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.analytics.data.v1alpha.ChatRequest, + com.google.analytics.data.v1alpha.ChatResponse>(service, METHODID_CHAT))) .addMethod( getRunReportMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -2967,6 +3138,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getQueryReportTaskMethod()) .addMethod(getGetReportTaskMethod()) .addMethod(getListReportTasksMethod()) + .addMethod(getChatMethod()) .addMethod(getRunReportMethod()) .addMethod(getGetMetadataMethod()) .build(); diff --git a/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/AnalyticsDataApiProto.java b/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/AnalyticsDataApiProto.java index 5747ca11e2bf..8f4a35dbf871 100644 --- a/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/AnalyticsDataApiProto.java +++ b/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/AnalyticsDataApiProto.java @@ -164,6 +164,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_analytics_data_v1alpha_ListReportTasksResponse_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_analytics_data_v1alpha_ListReportTasksResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_data_v1alpha_ChatRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_analytics_data_v1alpha_ChatRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_data_v1alpha_ChatResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_analytics_data_v1alpha_ChatResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_analytics_data_v1alpha_RunReportRequest_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable @@ -434,23 +442,35 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\014report_tasks\030\001 \003" + "(\0132).google.analytics.data.v1alpha.ReportTask\022\034\n" + "\017next_page_token\030\002 \001(\tH\000\210\001\001B\022\n" - + "\020_next_page_token\"\374\006\n" + + "\020_next_page_token\"\271\001\n" + + "\013ChatRequest\022@\n" + + "\010property\030\001 \001(\tB.\340A\002\372A(\n" + + "&analyticsadmin.googleapis.com/Property\022\027\n\n" + + "user_query\030\002 \001(\tB\003\340A\002\022\034\n\n" + + "session_id\030\003 \001(\tB\003\340A\001H\000\210\001\001\022\"\n" + + "\025return_property_quota\030\004 \001(\010B\003\340A\001B\r\n" + + "\013_session_id\"\252\001\n" + + "\014ChatResponse\022\022\n\n" + + "session_id\030\001 \001(\t\022<\n" + + "\006blocks\030\002 \003(\0132,.google.analytics.data.v1alpha.ResponseBlock\022H\n" + + "\016property_quota\030\003" + + " \001(\01320.google.analytics.data.v1alpha.PropertyChatQuota\"\374\006\n" + "\020RunReportRequest\022\025\n" + "\010property\030\001 \001(\tB\003\340A\002\022A\n\n" - + "dimensions\030\002 \003(\0132" - + "(.google.analytics.data.v1alpha.DimensionB\003\340A\001\022;\n" + + "dimensions\030\002 \003(\013" + + "2(.google.analytics.data.v1alpha.DimensionB\003\340A\001\022;\n" + "\007metrics\030\003" + " \003(\0132%.google.analytics.data.v1alpha.MetricB\003\340A\001\022B\n" + "\013date_ranges\030\004" + " \003(\0132(.google.analytics.data.v1alpha.DateRangeB\003\340A\001\022N\n" - + "\020dimension_filter\030\005 \001(" - + "\0132/.google.analytics.data.v1alpha.FilterExpressionB\003\340A\001\022K\n\r" - + "metric_filter\030\006 \001(\0132/" - + ".google.analytics.data.v1alpha.FilterExpressionB\003\340A\001\022\023\n" + + "\020dimension_filter\030\005 \001" + + "(\0132/.google.analytics.data.v1alpha.FilterExpressionB\003\340A\001\022K\n\r" + + "metric_filter\030\006 \001(\0132" + + "/.google.analytics.data.v1alpha.FilterExpressionB\003\340A\001\022\023\n" + "\006offset\030\007 \001(\003B\003\340A\001\022\022\n" + "\005limit\030\010 \001(\003B\003\340A\001\022R\n" - + "\023metric_aggregations\030\t \003" - + "(\01620.google.analytics.data.v1alpha.MetricAggregationB\003\340A\001\022>\n" + + "\023metric_aggregations\030\t " + + "\003(\01620.google.analytics.data.v1alpha.MetricAggregationB\003\340A\001\022>\n" + "\torder_bys\030\n" + " \003(\0132&.google.analytics.data.v1alpha.OrderByB\003\340A\001\022\032\n\r" + "currency_code\030\013 \001(\tB\003\340A\001\022C\n" @@ -464,8 +484,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\017conversion_spec\030\020" + " \001(\0132-.google.analytics.data.v1alpha.ConversionSpecB\003\340A\001\"\321\004\n" + "\021RunReportResponse\022I\n" - + "\021dimension_headers\030\001 \003(\0132" - + "..google.analytics.data.v1alpha.DimensionHeader\022C\n" + + "\021dimension_headers\030\001 \003(\013" + + "2..google.analytics.data.v1alpha.DimensionHeader\022C\n" + "\016metric_headers\030\002" + " \003(\0132+.google.analytics.data.v1alpha.MetricHeader\0220\n" + "\004rows\030\003 \003(\0132\".google.analytics.data.v1alpha.Row\0222\n" @@ -474,8 +494,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\010minimums\030\006 \003(\0132\".google.analytics.data.v1alpha.Row\022\021\n" + "\trow_count\030\007 \001(\005\022A\n" + "\010metadata\030\010 \001(\0132/.google.analytics.data.v1alpha.ResponseMetaData\022D\n" - + "\016property_quota\030\t \001(\0132,.g" - + "oogle.analytics.data.v1alpha.PropertyQuota\022\014\n" + + "\016property_quota\030\t \001(\0132,." + + "google.analytics.data.v1alpha.PropertyQuota\022\014\n" + "\004kind\030\n" + " \001(\t\022\034\n" + "\017next_page_token\030\013 \001(\tH\000\210\001\001B\022\n" @@ -489,73 +509,77 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\007metrics\030\002 \003(\0132-.google.analytics.data.v1alpha.MetricMetadata\022F\n" + "\013comparisons\030\004" + " \003(\01321.google.analytics.data.v1alpha.ComparisonMetadata\022F\n" - + "\013conversions\030\005 " - + "\003(\01321.google.analytics.data.v1alpha.ConversionMetadata:J\352AG\n" - + "%analyticsdata.googl" - + "eapis.com/Metadata\022\036properties/{property}/metadata2\250\031\n" + + "\013conversions\030\005" + + " \003(\01321.google.analytics.data.v1alpha.ConversionMetadata:J\352AG\n" + + "%analyticsdata.goog" + + "leapis.com/Metadata\022\036properties/{property}/metadata2\365\032\n" + "\022AlphaAnalyticsData\022\275\001\n" - + "\017RunFunnelReport\0225.google.analytics.data.v1" - + "alpha.RunFunnelReportRequest\0326.google.analytics.data.v1alpha.RunFunnelReportResp" - + "onse\";\202\323\344\223\0025\"0/v1alpha/{property=properties/*}:runFunnelReport:\001*\022\361\001\n" - + "\022CreateAudienceList\0228.google.analytics.data.v1alpha" - + ".CreateAudienceListRequest\032\035.google.longrunning.Operation\"\201\001\312A$\n" - + "\014AudienceList\022\024AudienceListMetadata\332A\024parent,audience_li" - + "st\202\323\344\223\002=\",/v1alpha/{parent=properties/*}/audienceLists:\r" + + "\017RunFunnelReport\0225.google.analytics.data.v" + + "1alpha.RunFunnelReportRequest\0326.google.analytics.data.v1alpha.RunFunnelReportRes" + + "ponse\";\202\323\344\223\0025\"0/v1alpha/{property=properties/*}:runFunnelReport:\001*\022\361\001\n" + + "\022CreateAudienceList\0228.google.analytics.data.v1alph" + + "a.CreateAudienceListRequest\032\035.google.longrunning.Operation\"\201\001\312A$\n" + + "\014AudienceList\022\024AudienceListMetadata\332A\024parent,audience_l" + + "ist\202\323\344\223\002=\",/v1alpha/{parent=properties/*}/audienceLists:\r" + "audience_list\022\314\001\n" - + "\021QueryAudienceList\0227.google.analytics.data.v1al" - + "pha.QueryAudienceListRequest\0328.google.analytics.data.v1alpha.QueryAudienceListRe" - + "sponse\"D\332A\004name\202\323\344\223\0027\"2/v1alpha/{name=properties/*/audienceLists/*}:query:\001*\022\262\001\n" - + "\017GetAudienceList\0225.google.analytics.data" - + ".v1alpha.GetAudienceListRequest\032+.google" - + ".analytics.data.v1alpha.AudienceList\";\332A" - + "\004name\202\323\344\223\002.\022,/v1alpha/{name=properties/*/audienceLists/*}\022\305\001\n" - + "\021ListAudienceLists\0227.google.analytics.data.v1alpha.ListAudi" - + "enceListsRequest\0328.google.analytics.data" - + ".v1alpha.ListAudienceListsResponse\"=\332A\006p" - + "arent\202\323\344\223\002.\022,/v1alpha/{parent=properties/*}/audienceLists\022\217\002\n" - + "\033CreateRecurringAudienceList\022A.google.analytics.data.v1alph" - + "a.CreateRecurringAudienceListRequest\0324.google.analytics.data.v1alpha.RecurringAu" - + "dienceList\"w\332A\036parent,recurring_audience" - + "_list\202\323\344\223\002P\"5/v1alpha/{parent=properties" - + "/*}/recurringAudienceLists:\027recurring_audience_list\022\326\001\n" - + "\030GetRecurringAudienceList\022>.google.analytics.data.v1alpha.GetRecu" - + "rringAudienceListRequest\0324.google.analytics.data.v1alpha.RecurringAudienceList\"D" - + "\332A\004name\202\323\344\223\0027\0225/v1alpha/{name=properties/*/recurringAudienceLists/*}\022\351\001\n" - + "\032ListRecurringAudienceLists\022@.google.analytics.d" - + "ata.v1alpha.ListRecurringAudienceListsRequest\032A.google.analytics.data.v1alpha.Li" - + "stRecurringAudienceListsResponse\"F\332A\006par" - + "ent\202\323\344\223\0027\0225/v1alpha/{parent=properties/*}/recurringAudienceLists\022\327\001\n" - + "\031GetPropertyQuotasSnapshot\022?.google.analytics.data.v" - + "1alpha.GetPropertyQuotasSnapshotRequest\0325.google.analytics.data.v1alpha.Property" - + "QuotasSnapshot\"B\332A\004name\202\323\344\223\0025\0223/v1alpha/" - + "{name=properties/*/propertyQuotasSnapshot}\022\342\001\n" - + "\020CreateReportTask\0226.google.analyti" - + "cs.data.v1alpha.CreateReportTaskRequest\032\035.google.longrunning.Operation\"w\312A" + + "\021QueryAudienceList\0227.google.analytics.data.v1a" + + "lpha.QueryAudienceListRequest\0328.google.analytics.data.v1alpha.QueryAudienceListR" + + "esponse\"D\332A\004name\202\323\344\223\0027\"2/v1alpha/{name=p" + + "roperties/*/audienceLists/*}:query:\001*\022\262\001\n" + + "\017GetAudienceList\0225.google.analytics.dat" + + "a.v1alpha.GetAudienceListRequest\032+.googl" + + "e.analytics.data.v1alpha.AudienceList\";\332" + + "A\004name\202\323\344\223\002.\022,/v1alpha/{name=properties/*/audienceLists/*}\022\305\001\n" + + "\021ListAudienceLists\0227.google.analytics.data.v1alpha.ListAud" + + "ienceListsRequest\0328.google.analytics.dat" + + "a.v1alpha.ListAudienceListsResponse\"=\332A\006" + + "parent\202\323\344\223\002.\022,/v1alpha/{parent=properties/*}/audienceLists\022\217\002\n" + + "\033CreateRecurringAudienceList\022A.google.analytics.data.v1alp" + + "ha.CreateRecurringAudienceListRequest\0324.google.analytics.data.v1alpha.RecurringA" + + "udienceList\"w\332A\036parent,recurring_audienc" + + "e_list\202\323\344\223\002P\"5/v1alpha/{parent=propertie" + + "s/*}/recurringAudienceLists:\027recurring_audience_list\022\326\001\n" + + "\030GetRecurringAudienceList\022>.google.analytics.data.v1alpha.GetRec" + + "urringAudienceListRequest\0324.google.analytics.data.v1alpha.RecurringAudienceList\"" + + "D\332A\004name\202\323\344\223\0027\0225/v1alpha/{name=properties/*/recurringAudienceLists/*}\022\351\001\n" + + "\032ListRecurringAudienceLists\022@.google.analytics." + + "data.v1alpha.ListRecurringAudienceListsRequest\032A.google.analytics.data.v1alpha.L" + + "istRecurringAudienceListsResponse\"F\332A\006pa" + + "rent\202\323\344\223\0027\0225/v1alpha/{parent=properties/*}/recurringAudienceLists\022\327\001\n" + + "\031GetPropertyQuotasSnapshot\022?.google.analytics.data." + + "v1alpha.GetPropertyQuotasSnapshotRequest\0325.google.analytics.data.v1alpha.Propert" + + "yQuotasSnapshot\"B\332A\004name\202\323\344\223\0025\0223/v1alpha" + + "/{name=properties/*/propertyQuotasSnapshot}\022\342\001\n" + + "\020CreateReportTask\0226.google.analyt" + + "ics.data.v1alpha.CreateReportTaskRequest\032\035.google.longrunning.Operation\"w\312A" + " \n\n" - + "ReportTask\022\022ReportTaskMetadata\332A\022parent,rep" - + "ort_task\202\323\344\223\0029\"*/v1alpha/{parent=properties/*}/reportTasks:\013report_task\022\304\001\n" - + "\017QueryReportTask\0225.google.analytics.data.v1al" - + "pha.QueryReportTaskRequest\0326.google.analytics.data.v1alpha.QueryReportTaskRespon" - + "se\"B\332A\004name\202\323\344\223\0025\"0/v1alpha/{name=properties/*/reportTasks/*}:query:\001*\022\252\001\n\r" - + "GetReportTask\0223.google.analytics.data.v1alpha" - + ".GetReportTaskRequest\032).google.analytics" - + ".data.v1alpha.ReportTask\"9\332A\004name\202\323\344\223\002,\022" - + "*/v1alpha/{name=properties/*/reportTasks/*}\022\275\001\n" - + "\017ListReportTasks\0225.google.analytics.data.v1alpha.ListReportTasksRequest\0326" - + ".google.analytics.data.v1alpha.ListRepor" - + "tTasksResponse\";\332A\006parent\202\323\344\223\002,\022*/v1alpha/{parent=properties/*}/reportTasks\022\245\001\n" - + "\tRunReport\022/.google.analytics.data.v1alph" - + "a.RunReportRequest\0320.google.analytics.da" - + "ta.v1alpha.RunReportResponse\"5\202\323\344\223\002/\"*/v" - + "1alpha/{property=properties/*}:runReport:\001*\022\237\001\n" - + "\013GetMetadata\0221.google.analytics.data.v1alpha.GetMetadataRequest\032\'.google." - + "analytics.data.v1alpha.Metadata\"4\332A\004name" - + "\202\323\344\223\002\'\022%/v1alpha/{name=properties/*/meta" - + "data}\032~\312A\034analyticsdata.googleapis.com\322A" - + "\\https://www.googleapis.com/auth/analyti" - + "cs,https://www.googleapis.com/auth/analytics.readonlyB\301\001\n" - + "!com.google.analytics.data.v1alphaB\025AnalyticsDataApiProtoP\001ZAgo" - + "ogle.golang.org/genproto/googleapis/analytics/data/v1alpha;data\352A?\n" + + "ReportTask\022\022ReportTaskMetadata\332A\022parent,re" + + "port_task\202\323\344\223\0029\"*/v1alpha/{parent=properties/*}/reportTasks:\013report_task\022\304\001\n" + + "\017QueryReportTask\0225.google.analytics.data.v1a" + + "lpha.QueryReportTaskRequest\0326.google.analytics.data.v1alpha.QueryReportTaskRespo" + + "nse\"B\332A\004name\202\323\344\223\0025\"0/v1alpha/{name=properties/*/reportTasks/*}:query:\001*\022\252\001\n\r" + + "GetReportTask\0223.google.analytics.data.v1alph" + + "a.GetReportTaskRequest\032).google.analytic" + + "s.data.v1alpha.ReportTask\"9\332A\004name\202\323\344\223\002," + + "\022*/v1alpha/{name=properties/*/reportTasks/*}\022\275\001\n" + + "\017ListReportTasks\0225.google.analytics.data.v1alpha.ListReportTasksRequest\032" + + "6.google.analytics.data.v1alpha.ListRepo" + + "rtTasksResponse\";\332A\006parent\202\323\344\223\002,\022*/v1alpha/{parent=properties/*}/reportTasks\022\221\001\n" + + "\004Chat\022*.google.analytics.data.v1alpha.Ch" + + "atRequest\032+.google.analytics.data.v1alph" + + "a.ChatResponse\"0\202\323\344\223\002*\"%/v1alpha/{property=properties/*}:chat:\001*\022\245\001\n" + + "\tRunReport\022/.google.analytics.data.v1alpha.RunReport" + + "Request\0320.google.analytics.data.v1alpha." + + "RunReportResponse\"5\202\323\344\223\002/\"*/v1alpha/{property=properties/*}:runReport:\001*\022\237\001\n" + + "\013GetMetadata\0221.google.analytics.data.v1alpha" + + ".GetMetadataRequest\032\'.google.analytics.d" + + "ata.v1alpha.Metadata\"4\332A\004name\202\323\344\223\002\'\022%/v1" + + "alpha/{name=properties/*/metadata}\032\266\001\312A\034" + + "analyticsdata.googleapis.com\322A\223\001https://" + + "www.googleapis.com/auth/analytics,https://www.googleapis.com/auth/analytics.chat" + + "bot.read,https://www.googleapis.com/auth/analytics.readonlyB\301\001\n" + + "!com.google.analytics.data.v1alphaB\025AnalyticsDataApiProto" + + "P\001ZAgoogle.golang.org/genproto/googleapis/analytics/data/v1alpha;data\352A?\n" + "&analyticsadmin.googleapis.com/Property\022\025properties/{property}b\006proto3" }; descriptor = @@ -864,8 +888,24 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "ReportTasks", "NextPageToken", }); - internal_static_google_analytics_data_v1alpha_RunReportRequest_descriptor = + internal_static_google_analytics_data_v1alpha_ChatRequest_descriptor = getDescriptor().getMessageType(29); + internal_static_google_analytics_data_v1alpha_ChatRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_analytics_data_v1alpha_ChatRequest_descriptor, + new java.lang.String[] { + "Property", "UserQuery", "SessionId", "ReturnPropertyQuota", + }); + internal_static_google_analytics_data_v1alpha_ChatResponse_descriptor = + getDescriptor().getMessageType(30); + internal_static_google_analytics_data_v1alpha_ChatResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_analytics_data_v1alpha_ChatResponse_descriptor, + new java.lang.String[] { + "SessionId", "Blocks", "PropertyQuota", + }); + internal_static_google_analytics_data_v1alpha_RunReportRequest_descriptor = + getDescriptor().getMessageType(31); internal_static_google_analytics_data_v1alpha_RunReportRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_analytics_data_v1alpha_RunReportRequest_descriptor, @@ -888,7 +928,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ConversionSpec", }); internal_static_google_analytics_data_v1alpha_RunReportResponse_descriptor = - getDescriptor().getMessageType(30); + getDescriptor().getMessageType(32); internal_static_google_analytics_data_v1alpha_RunReportResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_analytics_data_v1alpha_RunReportResponse_descriptor, @@ -906,7 +946,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "NextPageToken", }); internal_static_google_analytics_data_v1alpha_GetMetadataRequest_descriptor = - getDescriptor().getMessageType(31); + getDescriptor().getMessageType(33); internal_static_google_analytics_data_v1alpha_GetMetadataRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_analytics_data_v1alpha_GetMetadataRequest_descriptor, @@ -914,7 +954,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_analytics_data_v1alpha_Metadata_descriptor = - getDescriptor().getMessageType(32); + getDescriptor().getMessageType(34); internal_static_google_analytics_data_v1alpha_Metadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_analytics_data_v1alpha_Metadata_descriptor, diff --git a/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/ChatRequest.java b/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/ChatRequest.java new file mode 100644 index 000000000000..3010f8028197 --- /dev/null +++ b/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/ChatRequest.java @@ -0,0 +1,1157 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/analytics/data/v1alpha/analytics_data_api.proto +// Protobuf Java Version: 4.33.6 + +package com.google.analytics.data.v1alpha; + +/** + * + * + *
+ * Request message for the Chat method.
+ * 
+ * + * Protobuf type {@code google.analytics.data.v1alpha.ChatRequest} + */ +@com.google.protobuf.Generated +public final class ChatRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.analytics.data.v1alpha.ChatRequest) + ChatRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ChatRequest"); + } + + // Use ChatRequest.newBuilder() to construct. + private ChatRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ChatRequest() { + property_ = ""; + userQuery_ = ""; + sessionId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1alpha.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1alpha_ChatRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1alpha.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1alpha_ChatRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1alpha.ChatRequest.class, + com.google.analytics.data.v1alpha.ChatRequest.Builder.class); + } + + private int bitField0_; + public static final int PROPERTY_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object property_ = ""; + + /** + * + * + *
+   * Required. The property to chat about.
+   * Format: properties/{property}
+   * 
+ * + * + * string property = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The property. + */ + @java.lang.Override + public java.lang.String getProperty() { + java.lang.Object ref = property_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + property_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The property to chat about.
+   * Format: properties/{property}
+   * 
+ * + * + * string property = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for property. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPropertyBytes() { + java.lang.Object ref = property_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + property_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_QUERY_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object userQuery_ = ""; + + /** + * + * + *
+   * Required. The user's query.
+   * 
+ * + * string user_query = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The userQuery. + */ + @java.lang.Override + public java.lang.String getUserQuery() { + java.lang.Object ref = userQuery_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userQuery_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The user's query.
+   * 
+ * + * string user_query = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for userQuery. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUserQueryBytes() { + java.lang.Object ref = userQuery_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userQuery_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SESSION_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object sessionId_ = ""; + + /** + * + * + *
+   * Optional. Provide this session ID to continue an existing conversation
+   * and maintain context. If this field is empty or unset, a new chat
+   * session is created. Invalid session IDs will result in an error.
+   * 
+ * + * optional string session_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the sessionId field is set. + */ + @java.lang.Override + public boolean hasSessionId() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. Provide this session ID to continue an existing conversation
+   * and maintain context. If this field is empty or unset, a new chat
+   * session is created. Invalid session IDs will result in an error.
+   * 
+ * + * optional string session_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The sessionId. + */ + @java.lang.Override + public java.lang.String getSessionId() { + java.lang.Object ref = sessionId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sessionId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Provide this session ID to continue an existing conversation
+   * and maintain context. If this field is empty or unset, a new chat
+   * session is created. Invalid session IDs will result in an error.
+   * 
+ * + * optional string session_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for sessionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSessionIdBytes() { + java.lang.Object ref = sessionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sessionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RETURN_PROPERTY_QUOTA_FIELD_NUMBER = 4; + private boolean returnPropertyQuota_ = false; + + /** + * + * + *
+   * Optional. If true, the response will include the current state of this
+   * Analytics Property's quota. Quota is returned in
+   * [PropertyChatQuota](#PropertyChatQuota).
+   * 
+ * + * bool return_property_quota = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The returnPropertyQuota. + */ + @java.lang.Override + public boolean getReturnPropertyQuota() { + return returnPropertyQuota_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(property_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, property_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(userQuery_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, userQuery_); + } + if (((bitField0_ & 0x00000001) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, sessionId_); + } + if (returnPropertyQuota_ != false) { + output.writeBool(4, returnPropertyQuota_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(property_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, property_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(userQuery_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, userQuery_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, sessionId_); + } + if (returnPropertyQuota_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, returnPropertyQuota_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.data.v1alpha.ChatRequest)) { + return super.equals(obj); + } + com.google.analytics.data.v1alpha.ChatRequest other = + (com.google.analytics.data.v1alpha.ChatRequest) obj; + + if (!getProperty().equals(other.getProperty())) return false; + if (!getUserQuery().equals(other.getUserQuery())) return false; + if (hasSessionId() != other.hasSessionId()) return false; + if (hasSessionId()) { + if (!getSessionId().equals(other.getSessionId())) return false; + } + if (getReturnPropertyQuota() != other.getReturnPropertyQuota()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PROPERTY_FIELD_NUMBER; + hash = (53 * hash) + getProperty().hashCode(); + hash = (37 * hash) + USER_QUERY_FIELD_NUMBER; + hash = (53 * hash) + getUserQuery().hashCode(); + if (hasSessionId()) { + hash = (37 * hash) + SESSION_ID_FIELD_NUMBER; + hash = (53 * hash) + getSessionId().hashCode(); + } + hash = (37 * hash) + RETURN_PROPERTY_QUOTA_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPropertyQuota()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.data.v1alpha.ChatRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1alpha.ChatRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1alpha.ChatRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1alpha.ChatRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1alpha.ChatRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1alpha.ChatRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1alpha.ChatRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1alpha.ChatRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1alpha.ChatRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1alpha.ChatRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1alpha.ChatRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1alpha.ChatRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.analytics.data.v1alpha.ChatRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for the Chat method.
+   * 
+ * + * Protobuf type {@code google.analytics.data.v1alpha.ChatRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.data.v1alpha.ChatRequest) + com.google.analytics.data.v1alpha.ChatRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1alpha.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1alpha_ChatRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1alpha.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1alpha_ChatRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1alpha.ChatRequest.class, + com.google.analytics.data.v1alpha.ChatRequest.Builder.class); + } + + // Construct using com.google.analytics.data.v1alpha.ChatRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + property_ = ""; + userQuery_ = ""; + sessionId_ = ""; + returnPropertyQuota_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.data.v1alpha.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1alpha_ChatRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.data.v1alpha.ChatRequest getDefaultInstanceForType() { + return com.google.analytics.data.v1alpha.ChatRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.data.v1alpha.ChatRequest build() { + com.google.analytics.data.v1alpha.ChatRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.data.v1alpha.ChatRequest buildPartial() { + com.google.analytics.data.v1alpha.ChatRequest result = + new com.google.analytics.data.v1alpha.ChatRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.analytics.data.v1alpha.ChatRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.property_ = property_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.userQuery_ = userQuery_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.sessionId_ = sessionId_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.returnPropertyQuota_ = returnPropertyQuota_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.data.v1alpha.ChatRequest) { + return mergeFrom((com.google.analytics.data.v1alpha.ChatRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.data.v1alpha.ChatRequest other) { + if (other == com.google.analytics.data.v1alpha.ChatRequest.getDefaultInstance()) return this; + if (!other.getProperty().isEmpty()) { + property_ = other.property_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getUserQuery().isEmpty()) { + userQuery_ = other.userQuery_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasSessionId()) { + sessionId_ = other.sessionId_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.getReturnPropertyQuota() != false) { + setReturnPropertyQuota(other.getReturnPropertyQuota()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + property_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + userQuery_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + sessionId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + returnPropertyQuota_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object property_ = ""; + + /** + * + * + *
+     * Required. The property to chat about.
+     * Format: properties/{property}
+     * 
+ * + * + * string property = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The property. + */ + public java.lang.String getProperty() { + java.lang.Object ref = property_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + property_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The property to chat about.
+     * Format: properties/{property}
+     * 
+ * + * + * string property = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for property. + */ + public com.google.protobuf.ByteString getPropertyBytes() { + java.lang.Object ref = property_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + property_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The property to chat about.
+     * Format: properties/{property}
+     * 
+ * + * + * string property = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The property to set. + * @return This builder for chaining. + */ + public Builder setProperty(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + property_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The property to chat about.
+     * Format: properties/{property}
+     * 
+ * + * + * string property = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearProperty() { + property_ = getDefaultInstance().getProperty(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The property to chat about.
+     * Format: properties/{property}
+     * 
+ * + * + * string property = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for property to set. + * @return This builder for chaining. + */ + public Builder setPropertyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + property_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object userQuery_ = ""; + + /** + * + * + *
+     * Required. The user's query.
+     * 
+ * + * string user_query = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The userQuery. + */ + public java.lang.String getUserQuery() { + java.lang.Object ref = userQuery_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userQuery_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The user's query.
+     * 
+ * + * string user_query = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for userQuery. + */ + public com.google.protobuf.ByteString getUserQueryBytes() { + java.lang.Object ref = userQuery_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userQuery_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The user's query.
+     * 
+ * + * string user_query = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The userQuery to set. + * @return This builder for chaining. + */ + public Builder setUserQuery(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + userQuery_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The user's query.
+     * 
+ * + * string user_query = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearUserQuery() { + userQuery_ = getDefaultInstance().getUserQuery(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The user's query.
+     * 
+ * + * string user_query = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for userQuery to set. + * @return This builder for chaining. + */ + public Builder setUserQueryBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + userQuery_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object sessionId_ = ""; + + /** + * + * + *
+     * Optional. Provide this session ID to continue an existing conversation
+     * and maintain context. If this field is empty or unset, a new chat
+     * session is created. Invalid session IDs will result in an error.
+     * 
+ * + * optional string session_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the sessionId field is set. + */ + public boolean hasSessionId() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Optional. Provide this session ID to continue an existing conversation
+     * and maintain context. If this field is empty or unset, a new chat
+     * session is created. Invalid session IDs will result in an error.
+     * 
+ * + * optional string session_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The sessionId. + */ + public java.lang.String getSessionId() { + java.lang.Object ref = sessionId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sessionId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Provide this session ID to continue an existing conversation
+     * and maintain context. If this field is empty or unset, a new chat
+     * session is created. Invalid session IDs will result in an error.
+     * 
+ * + * optional string session_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for sessionId. + */ + public com.google.protobuf.ByteString getSessionIdBytes() { + java.lang.Object ref = sessionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sessionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Provide this session ID to continue an existing conversation
+     * and maintain context. If this field is empty or unset, a new chat
+     * session is created. Invalid session IDs will result in an error.
+     * 
+ * + * optional string session_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The sessionId to set. + * @return This builder for chaining. + */ + public Builder setSessionId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + sessionId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Provide this session ID to continue an existing conversation
+     * and maintain context. If this field is empty or unset, a new chat
+     * session is created. Invalid session IDs will result in an error.
+     * 
+ * + * optional string session_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearSessionId() { + sessionId_ = getDefaultInstance().getSessionId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Provide this session ID to continue an existing conversation
+     * and maintain context. If this field is empty or unset, a new chat
+     * session is created. Invalid session IDs will result in an error.
+     * 
+ * + * optional string session_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for sessionId to set. + * @return This builder for chaining. + */ + public Builder setSessionIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + sessionId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private boolean returnPropertyQuota_; + + /** + * + * + *
+     * Optional. If true, the response will include the current state of this
+     * Analytics Property's quota. Quota is returned in
+     * [PropertyChatQuota](#PropertyChatQuota).
+     * 
+ * + * bool return_property_quota = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The returnPropertyQuota. + */ + @java.lang.Override + public boolean getReturnPropertyQuota() { + return returnPropertyQuota_; + } + + /** + * + * + *
+     * Optional. If true, the response will include the current state of this
+     * Analytics Property's quota. Quota is returned in
+     * [PropertyChatQuota](#PropertyChatQuota).
+     * 
+ * + * bool return_property_quota = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The returnPropertyQuota to set. + * @return This builder for chaining. + */ + public Builder setReturnPropertyQuota(boolean value) { + + returnPropertyQuota_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. If true, the response will include the current state of this
+     * Analytics Property's quota. Quota is returned in
+     * [PropertyChatQuota](#PropertyChatQuota).
+     * 
+ * + * bool return_property_quota = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearReturnPropertyQuota() { + bitField0_ = (bitField0_ & ~0x00000008); + returnPropertyQuota_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.analytics.data.v1alpha.ChatRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.data.v1alpha.ChatRequest) + private static final com.google.analytics.data.v1alpha.ChatRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.data.v1alpha.ChatRequest(); + } + + public static com.google.analytics.data.v1alpha.ChatRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ChatRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.data.v1alpha.ChatRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/ChatRequestOrBuilder.java b/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/ChatRequestOrBuilder.java new file mode 100644 index 000000000000..4547f60b9052 --- /dev/null +++ b/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/ChatRequestOrBuilder.java @@ -0,0 +1,146 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/analytics/data/v1alpha/analytics_data_api.proto +// Protobuf Java Version: 4.33.6 + +package com.google.analytics.data.v1alpha; + +@com.google.protobuf.Generated +public interface ChatRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.data.v1alpha.ChatRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The property to chat about.
+   * Format: properties/{property}
+   * 
+ * + * + * string property = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The property. + */ + java.lang.String getProperty(); + + /** + * + * + *
+   * Required. The property to chat about.
+   * Format: properties/{property}
+   * 
+ * + * + * string property = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for property. + */ + com.google.protobuf.ByteString getPropertyBytes(); + + /** + * + * + *
+   * Required. The user's query.
+   * 
+ * + * string user_query = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The userQuery. + */ + java.lang.String getUserQuery(); + + /** + * + * + *
+   * Required. The user's query.
+   * 
+ * + * string user_query = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for userQuery. + */ + com.google.protobuf.ByteString getUserQueryBytes(); + + /** + * + * + *
+   * Optional. Provide this session ID to continue an existing conversation
+   * and maintain context. If this field is empty or unset, a new chat
+   * session is created. Invalid session IDs will result in an error.
+   * 
+ * + * optional string session_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the sessionId field is set. + */ + boolean hasSessionId(); + + /** + * + * + *
+   * Optional. Provide this session ID to continue an existing conversation
+   * and maintain context. If this field is empty or unset, a new chat
+   * session is created. Invalid session IDs will result in an error.
+   * 
+ * + * optional string session_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The sessionId. + */ + java.lang.String getSessionId(); + + /** + * + * + *
+   * Optional. Provide this session ID to continue an existing conversation
+   * and maintain context. If this field is empty or unset, a new chat
+   * session is created. Invalid session IDs will result in an error.
+   * 
+ * + * optional string session_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for sessionId. + */ + com.google.protobuf.ByteString getSessionIdBytes(); + + /** + * + * + *
+   * Optional. If true, the response will include the current state of this
+   * Analytics Property's quota. Quota is returned in
+   * [PropertyChatQuota](#PropertyChatQuota).
+   * 
+ * + * bool return_property_quota = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The returnPropertyQuota. + */ + boolean getReturnPropertyQuota(); +} diff --git a/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/ChatResponse.java b/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/ChatResponse.java new file mode 100644 index 000000000000..47a6bfef3987 --- /dev/null +++ b/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/ChatResponse.java @@ -0,0 +1,1438 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/analytics/data/v1alpha/analytics_data_api.proto +// Protobuf Java Version: 4.33.6 + +package com.google.analytics.data.v1alpha; + +/** + * + * + *
+ * Response message for the Chat method.
+ * 
+ * + * Protobuf type {@code google.analytics.data.v1alpha.ChatResponse} + */ +@com.google.protobuf.Generated +public final class ChatResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.analytics.data.v1alpha.ChatResponse) + ChatResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ChatResponse"); + } + + // Use ChatResponse.newBuilder() to construct. + private ChatResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ChatResponse() { + sessionId_ = ""; + blocks_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1alpha.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1alpha_ChatResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1alpha.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1alpha_ChatResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1alpha.ChatResponse.class, + com.google.analytics.data.v1alpha.ChatResponse.Builder.class); + } + + private int bitField0_; + public static final int SESSION_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object sessionId_ = ""; + + /** + * + * + *
+   * The unique identifier for this chat session. Provide this ID in subsequent
+   * requests to maintain conversational context.
+   * 
+ * + * string session_id = 1; + * + * @return The sessionId. + */ + @java.lang.Override + public java.lang.String getSessionId() { + java.lang.Object ref = sessionId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sessionId_ = s; + return s; + } + } + + /** + * + * + *
+   * The unique identifier for this chat session. Provide this ID in subsequent
+   * requests to maintain conversational context.
+   * 
+ * + * string session_id = 1; + * + * @return The bytes for sessionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSessionIdBytes() { + java.lang.Object ref = sessionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sessionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BLOCKS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List blocks_; + + /** + * + * + *
+   * The response blocks that make up the chat response. This can include text,
+   * tables, and lists.
+   * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock blocks = 2; + */ + @java.lang.Override + public java.util.List getBlocksList() { + return blocks_; + } + + /** + * + * + *
+   * The response blocks that make up the chat response. This can include text,
+   * tables, and lists.
+   * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock blocks = 2; + */ + @java.lang.Override + public java.util.List + getBlocksOrBuilderList() { + return blocks_; + } + + /** + * + * + *
+   * The response blocks that make up the chat response. This can include text,
+   * tables, and lists.
+   * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock blocks = 2; + */ + @java.lang.Override + public int getBlocksCount() { + return blocks_.size(); + } + + /** + * + * + *
+   * The response blocks that make up the chat response. This can include text,
+   * tables, and lists.
+   * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock blocks = 2; + */ + @java.lang.Override + public com.google.analytics.data.v1alpha.ResponseBlock getBlocks(int index) { + return blocks_.get(index); + } + + /** + * + * + *
+   * The response blocks that make up the chat response. This can include text,
+   * tables, and lists.
+   * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock blocks = 2; + */ + @java.lang.Override + public com.google.analytics.data.v1alpha.ResponseBlockOrBuilder getBlocksOrBuilder(int index) { + return blocks_.get(index); + } + + public static final int PROPERTY_QUOTA_FIELD_NUMBER = 3; + private com.google.analytics.data.v1alpha.PropertyChatQuota propertyQuota_; + + /** + * + * + *
+   * This Analytics Property's quota state including this request.
+   * 
+ * + * .google.analytics.data.v1alpha.PropertyChatQuota property_quota = 3; + * + * @return Whether the propertyQuota field is set. + */ + @java.lang.Override + public boolean hasPropertyQuota() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * This Analytics Property's quota state including this request.
+   * 
+ * + * .google.analytics.data.v1alpha.PropertyChatQuota property_quota = 3; + * + * @return The propertyQuota. + */ + @java.lang.Override + public com.google.analytics.data.v1alpha.PropertyChatQuota getPropertyQuota() { + return propertyQuota_ == null + ? com.google.analytics.data.v1alpha.PropertyChatQuota.getDefaultInstance() + : propertyQuota_; + } + + /** + * + * + *
+   * This Analytics Property's quota state including this request.
+   * 
+ * + * .google.analytics.data.v1alpha.PropertyChatQuota property_quota = 3; + */ + @java.lang.Override + public com.google.analytics.data.v1alpha.PropertyChatQuotaOrBuilder getPropertyQuotaOrBuilder() { + return propertyQuota_ == null + ? com.google.analytics.data.v1alpha.PropertyChatQuota.getDefaultInstance() + : propertyQuota_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sessionId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, sessionId_); + } + for (int i = 0; i < blocks_.size(); i++) { + output.writeMessage(2, blocks_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getPropertyQuota()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sessionId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, sessionId_); + } + for (int i = 0; i < blocks_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, blocks_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getPropertyQuota()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.data.v1alpha.ChatResponse)) { + return super.equals(obj); + } + com.google.analytics.data.v1alpha.ChatResponse other = + (com.google.analytics.data.v1alpha.ChatResponse) obj; + + if (!getSessionId().equals(other.getSessionId())) return false; + if (!getBlocksList().equals(other.getBlocksList())) return false; + if (hasPropertyQuota() != other.hasPropertyQuota()) return false; + if (hasPropertyQuota()) { + if (!getPropertyQuota().equals(other.getPropertyQuota())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SESSION_ID_FIELD_NUMBER; + hash = (53 * hash) + getSessionId().hashCode(); + if (getBlocksCount() > 0) { + hash = (37 * hash) + BLOCKS_FIELD_NUMBER; + hash = (53 * hash) + getBlocksList().hashCode(); + } + if (hasPropertyQuota()) { + hash = (37 * hash) + PROPERTY_QUOTA_FIELD_NUMBER; + hash = (53 * hash) + getPropertyQuota().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.data.v1alpha.ChatResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1alpha.ChatResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1alpha.ChatResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1alpha.ChatResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1alpha.ChatResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1alpha.ChatResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1alpha.ChatResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1alpha.ChatResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1alpha.ChatResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1alpha.ChatResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1alpha.ChatResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1alpha.ChatResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.analytics.data.v1alpha.ChatResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response message for the Chat method.
+   * 
+ * + * Protobuf type {@code google.analytics.data.v1alpha.ChatResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.data.v1alpha.ChatResponse) + com.google.analytics.data.v1alpha.ChatResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1alpha.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1alpha_ChatResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1alpha.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1alpha_ChatResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1alpha.ChatResponse.class, + com.google.analytics.data.v1alpha.ChatResponse.Builder.class); + } + + // Construct using com.google.analytics.data.v1alpha.ChatResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetBlocksFieldBuilder(); + internalGetPropertyQuotaFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + sessionId_ = ""; + if (blocksBuilder_ == null) { + blocks_ = java.util.Collections.emptyList(); + } else { + blocks_ = null; + blocksBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + propertyQuota_ = null; + if (propertyQuotaBuilder_ != null) { + propertyQuotaBuilder_.dispose(); + propertyQuotaBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.data.v1alpha.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1alpha_ChatResponse_descriptor; + } + + @java.lang.Override + public com.google.analytics.data.v1alpha.ChatResponse getDefaultInstanceForType() { + return com.google.analytics.data.v1alpha.ChatResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.data.v1alpha.ChatResponse build() { + com.google.analytics.data.v1alpha.ChatResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.data.v1alpha.ChatResponse buildPartial() { + com.google.analytics.data.v1alpha.ChatResponse result = + new com.google.analytics.data.v1alpha.ChatResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.analytics.data.v1alpha.ChatResponse result) { + if (blocksBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + blocks_ = java.util.Collections.unmodifiableList(blocks_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.blocks_ = blocks_; + } else { + result.blocks_ = blocksBuilder_.build(); + } + } + + private void buildPartial0(com.google.analytics.data.v1alpha.ChatResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.sessionId_ = sessionId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.propertyQuota_ = + propertyQuotaBuilder_ == null ? propertyQuota_ : propertyQuotaBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.data.v1alpha.ChatResponse) { + return mergeFrom((com.google.analytics.data.v1alpha.ChatResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.data.v1alpha.ChatResponse other) { + if (other == com.google.analytics.data.v1alpha.ChatResponse.getDefaultInstance()) return this; + if (!other.getSessionId().isEmpty()) { + sessionId_ = other.sessionId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (blocksBuilder_ == null) { + if (!other.blocks_.isEmpty()) { + if (blocks_.isEmpty()) { + blocks_ = other.blocks_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureBlocksIsMutable(); + blocks_.addAll(other.blocks_); + } + onChanged(); + } + } else { + if (!other.blocks_.isEmpty()) { + if (blocksBuilder_.isEmpty()) { + blocksBuilder_.dispose(); + blocksBuilder_ = null; + blocks_ = other.blocks_; + bitField0_ = (bitField0_ & ~0x00000002); + blocksBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetBlocksFieldBuilder() + : null; + } else { + blocksBuilder_.addAllMessages(other.blocks_); + } + } + } + if (other.hasPropertyQuota()) { + mergePropertyQuota(other.getPropertyQuota()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + sessionId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.analytics.data.v1alpha.ResponseBlock m = + input.readMessage( + com.google.analytics.data.v1alpha.ResponseBlock.parser(), + extensionRegistry); + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + blocks_.add(m); + } else { + blocksBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetPropertyQuotaFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object sessionId_ = ""; + + /** + * + * + *
+     * The unique identifier for this chat session. Provide this ID in subsequent
+     * requests to maintain conversational context.
+     * 
+ * + * string session_id = 1; + * + * @return The sessionId. + */ + public java.lang.String getSessionId() { + java.lang.Object ref = sessionId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sessionId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The unique identifier for this chat session. Provide this ID in subsequent
+     * requests to maintain conversational context.
+     * 
+ * + * string session_id = 1; + * + * @return The bytes for sessionId. + */ + public com.google.protobuf.ByteString getSessionIdBytes() { + java.lang.Object ref = sessionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sessionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The unique identifier for this chat session. Provide this ID in subsequent
+     * requests to maintain conversational context.
+     * 
+ * + * string session_id = 1; + * + * @param value The sessionId to set. + * @return This builder for chaining. + */ + public Builder setSessionId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + sessionId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The unique identifier for this chat session. Provide this ID in subsequent
+     * requests to maintain conversational context.
+     * 
+ * + * string session_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearSessionId() { + sessionId_ = getDefaultInstance().getSessionId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * The unique identifier for this chat session. Provide this ID in subsequent
+     * requests to maintain conversational context.
+     * 
+ * + * string session_id = 1; + * + * @param value The bytes for sessionId to set. + * @return This builder for chaining. + */ + public Builder setSessionIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + sessionId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List blocks_ = + java.util.Collections.emptyList(); + + private void ensureBlocksIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + blocks_ = new java.util.ArrayList(blocks_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.analytics.data.v1alpha.ResponseBlock, + com.google.analytics.data.v1alpha.ResponseBlock.Builder, + com.google.analytics.data.v1alpha.ResponseBlockOrBuilder> + blocksBuilder_; + + /** + * + * + *
+     * The response blocks that make up the chat response. This can include text,
+     * tables, and lists.
+     * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock blocks = 2; + */ + public java.util.List getBlocksList() { + if (blocksBuilder_ == null) { + return java.util.Collections.unmodifiableList(blocks_); + } else { + return blocksBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The response blocks that make up the chat response. This can include text,
+     * tables, and lists.
+     * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock blocks = 2; + */ + public int getBlocksCount() { + if (blocksBuilder_ == null) { + return blocks_.size(); + } else { + return blocksBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The response blocks that make up the chat response. This can include text,
+     * tables, and lists.
+     * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock blocks = 2; + */ + public com.google.analytics.data.v1alpha.ResponseBlock getBlocks(int index) { + if (blocksBuilder_ == null) { + return blocks_.get(index); + } else { + return blocksBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The response blocks that make up the chat response. This can include text,
+     * tables, and lists.
+     * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock blocks = 2; + */ + public Builder setBlocks(int index, com.google.analytics.data.v1alpha.ResponseBlock value) { + if (blocksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBlocksIsMutable(); + blocks_.set(index, value); + onChanged(); + } else { + blocksBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The response blocks that make up the chat response. This can include text,
+     * tables, and lists.
+     * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock blocks = 2; + */ + public Builder setBlocks( + int index, com.google.analytics.data.v1alpha.ResponseBlock.Builder builderForValue) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + blocks_.set(index, builderForValue.build()); + onChanged(); + } else { + blocksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The response blocks that make up the chat response. This can include text,
+     * tables, and lists.
+     * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock blocks = 2; + */ + public Builder addBlocks(com.google.analytics.data.v1alpha.ResponseBlock value) { + if (blocksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBlocksIsMutable(); + blocks_.add(value); + onChanged(); + } else { + blocksBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The response blocks that make up the chat response. This can include text,
+     * tables, and lists.
+     * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock blocks = 2; + */ + public Builder addBlocks(int index, com.google.analytics.data.v1alpha.ResponseBlock value) { + if (blocksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBlocksIsMutable(); + blocks_.add(index, value); + onChanged(); + } else { + blocksBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The response blocks that make up the chat response. This can include text,
+     * tables, and lists.
+     * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock blocks = 2; + */ + public Builder addBlocks( + com.google.analytics.data.v1alpha.ResponseBlock.Builder builderForValue) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + blocks_.add(builderForValue.build()); + onChanged(); + } else { + blocksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The response blocks that make up the chat response. This can include text,
+     * tables, and lists.
+     * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock blocks = 2; + */ + public Builder addBlocks( + int index, com.google.analytics.data.v1alpha.ResponseBlock.Builder builderForValue) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + blocks_.add(index, builderForValue.build()); + onChanged(); + } else { + blocksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The response blocks that make up the chat response. This can include text,
+     * tables, and lists.
+     * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock blocks = 2; + */ + public Builder addAllBlocks( + java.lang.Iterable values) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, blocks_); + onChanged(); + } else { + blocksBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The response blocks that make up the chat response. This can include text,
+     * tables, and lists.
+     * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock blocks = 2; + */ + public Builder clearBlocks() { + if (blocksBuilder_ == null) { + blocks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + blocksBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The response blocks that make up the chat response. This can include text,
+     * tables, and lists.
+     * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock blocks = 2; + */ + public Builder removeBlocks(int index) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + blocks_.remove(index); + onChanged(); + } else { + blocksBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The response blocks that make up the chat response. This can include text,
+     * tables, and lists.
+     * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock blocks = 2; + */ + public com.google.analytics.data.v1alpha.ResponseBlock.Builder getBlocksBuilder(int index) { + return internalGetBlocksFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The response blocks that make up the chat response. This can include text,
+     * tables, and lists.
+     * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock blocks = 2; + */ + public com.google.analytics.data.v1alpha.ResponseBlockOrBuilder getBlocksOrBuilder(int index) { + if (blocksBuilder_ == null) { + return blocks_.get(index); + } else { + return blocksBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The response blocks that make up the chat response. This can include text,
+     * tables, and lists.
+     * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock blocks = 2; + */ + public java.util.List + getBlocksOrBuilderList() { + if (blocksBuilder_ != null) { + return blocksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(blocks_); + } + } + + /** + * + * + *
+     * The response blocks that make up the chat response. This can include text,
+     * tables, and lists.
+     * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock blocks = 2; + */ + public com.google.analytics.data.v1alpha.ResponseBlock.Builder addBlocksBuilder() { + return internalGetBlocksFieldBuilder() + .addBuilder(com.google.analytics.data.v1alpha.ResponseBlock.getDefaultInstance()); + } + + /** + * + * + *
+     * The response blocks that make up the chat response. This can include text,
+     * tables, and lists.
+     * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock blocks = 2; + */ + public com.google.analytics.data.v1alpha.ResponseBlock.Builder addBlocksBuilder(int index) { + return internalGetBlocksFieldBuilder() + .addBuilder(index, com.google.analytics.data.v1alpha.ResponseBlock.getDefaultInstance()); + } + + /** + * + * + *
+     * The response blocks that make up the chat response. This can include text,
+     * tables, and lists.
+     * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock blocks = 2; + */ + public java.util.List + getBlocksBuilderList() { + return internalGetBlocksFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.analytics.data.v1alpha.ResponseBlock, + com.google.analytics.data.v1alpha.ResponseBlock.Builder, + com.google.analytics.data.v1alpha.ResponseBlockOrBuilder> + internalGetBlocksFieldBuilder() { + if (blocksBuilder_ == null) { + blocksBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.analytics.data.v1alpha.ResponseBlock, + com.google.analytics.data.v1alpha.ResponseBlock.Builder, + com.google.analytics.data.v1alpha.ResponseBlockOrBuilder>( + blocks_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + blocks_ = null; + } + return blocksBuilder_; + } + + private com.google.analytics.data.v1alpha.PropertyChatQuota propertyQuota_; + private com.google.protobuf.SingleFieldBuilder< + com.google.analytics.data.v1alpha.PropertyChatQuota, + com.google.analytics.data.v1alpha.PropertyChatQuota.Builder, + com.google.analytics.data.v1alpha.PropertyChatQuotaOrBuilder> + propertyQuotaBuilder_; + + /** + * + * + *
+     * This Analytics Property's quota state including this request.
+     * 
+ * + * .google.analytics.data.v1alpha.PropertyChatQuota property_quota = 3; + * + * @return Whether the propertyQuota field is set. + */ + public boolean hasPropertyQuota() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * This Analytics Property's quota state including this request.
+     * 
+ * + * .google.analytics.data.v1alpha.PropertyChatQuota property_quota = 3; + * + * @return The propertyQuota. + */ + public com.google.analytics.data.v1alpha.PropertyChatQuota getPropertyQuota() { + if (propertyQuotaBuilder_ == null) { + return propertyQuota_ == null + ? com.google.analytics.data.v1alpha.PropertyChatQuota.getDefaultInstance() + : propertyQuota_; + } else { + return propertyQuotaBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * This Analytics Property's quota state including this request.
+     * 
+ * + * .google.analytics.data.v1alpha.PropertyChatQuota property_quota = 3; + */ + public Builder setPropertyQuota(com.google.analytics.data.v1alpha.PropertyChatQuota value) { + if (propertyQuotaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + propertyQuota_ = value; + } else { + propertyQuotaBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * This Analytics Property's quota state including this request.
+     * 
+ * + * .google.analytics.data.v1alpha.PropertyChatQuota property_quota = 3; + */ + public Builder setPropertyQuota( + com.google.analytics.data.v1alpha.PropertyChatQuota.Builder builderForValue) { + if (propertyQuotaBuilder_ == null) { + propertyQuota_ = builderForValue.build(); + } else { + propertyQuotaBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * This Analytics Property's quota state including this request.
+     * 
+ * + * .google.analytics.data.v1alpha.PropertyChatQuota property_quota = 3; + */ + public Builder mergePropertyQuota(com.google.analytics.data.v1alpha.PropertyChatQuota value) { + if (propertyQuotaBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && propertyQuota_ != null + && propertyQuota_ + != com.google.analytics.data.v1alpha.PropertyChatQuota.getDefaultInstance()) { + getPropertyQuotaBuilder().mergeFrom(value); + } else { + propertyQuota_ = value; + } + } else { + propertyQuotaBuilder_.mergeFrom(value); + } + if (propertyQuota_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * This Analytics Property's quota state including this request.
+     * 
+ * + * .google.analytics.data.v1alpha.PropertyChatQuota property_quota = 3; + */ + public Builder clearPropertyQuota() { + bitField0_ = (bitField0_ & ~0x00000004); + propertyQuota_ = null; + if (propertyQuotaBuilder_ != null) { + propertyQuotaBuilder_.dispose(); + propertyQuotaBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * This Analytics Property's quota state including this request.
+     * 
+ * + * .google.analytics.data.v1alpha.PropertyChatQuota property_quota = 3; + */ + public com.google.analytics.data.v1alpha.PropertyChatQuota.Builder getPropertyQuotaBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetPropertyQuotaFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * This Analytics Property's quota state including this request.
+     * 
+ * + * .google.analytics.data.v1alpha.PropertyChatQuota property_quota = 3; + */ + public com.google.analytics.data.v1alpha.PropertyChatQuotaOrBuilder + getPropertyQuotaOrBuilder() { + if (propertyQuotaBuilder_ != null) { + return propertyQuotaBuilder_.getMessageOrBuilder(); + } else { + return propertyQuota_ == null + ? com.google.analytics.data.v1alpha.PropertyChatQuota.getDefaultInstance() + : propertyQuota_; + } + } + + /** + * + * + *
+     * This Analytics Property's quota state including this request.
+     * 
+ * + * .google.analytics.data.v1alpha.PropertyChatQuota property_quota = 3; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.analytics.data.v1alpha.PropertyChatQuota, + com.google.analytics.data.v1alpha.PropertyChatQuota.Builder, + com.google.analytics.data.v1alpha.PropertyChatQuotaOrBuilder> + internalGetPropertyQuotaFieldBuilder() { + if (propertyQuotaBuilder_ == null) { + propertyQuotaBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.analytics.data.v1alpha.PropertyChatQuota, + com.google.analytics.data.v1alpha.PropertyChatQuota.Builder, + com.google.analytics.data.v1alpha.PropertyChatQuotaOrBuilder>( + getPropertyQuota(), getParentForChildren(), isClean()); + propertyQuota_ = null; + } + return propertyQuotaBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.analytics.data.v1alpha.ChatResponse) + } + + // @@protoc_insertion_point(class_scope:google.analytics.data.v1alpha.ChatResponse) + private static final com.google.analytics.data.v1alpha.ChatResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.data.v1alpha.ChatResponse(); + } + + public static com.google.analytics.data.v1alpha.ChatResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ChatResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.data.v1alpha.ChatResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/ChatResponseOrBuilder.java b/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/ChatResponseOrBuilder.java new file mode 100644 index 000000000000..19b2cac9db3f --- /dev/null +++ b/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/ChatResponseOrBuilder.java @@ -0,0 +1,154 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/analytics/data/v1alpha/analytics_data_api.proto +// Protobuf Java Version: 4.33.6 + +package com.google.analytics.data.v1alpha; + +@com.google.protobuf.Generated +public interface ChatResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.data.v1alpha.ChatResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The unique identifier for this chat session. Provide this ID in subsequent
+   * requests to maintain conversational context.
+   * 
+ * + * string session_id = 1; + * + * @return The sessionId. + */ + java.lang.String getSessionId(); + + /** + * + * + *
+   * The unique identifier for this chat session. Provide this ID in subsequent
+   * requests to maintain conversational context.
+   * 
+ * + * string session_id = 1; + * + * @return The bytes for sessionId. + */ + com.google.protobuf.ByteString getSessionIdBytes(); + + /** + * + * + *
+   * The response blocks that make up the chat response. This can include text,
+   * tables, and lists.
+   * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock blocks = 2; + */ + java.util.List getBlocksList(); + + /** + * + * + *
+   * The response blocks that make up the chat response. This can include text,
+   * tables, and lists.
+   * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock blocks = 2; + */ + com.google.analytics.data.v1alpha.ResponseBlock getBlocks(int index); + + /** + * + * + *
+   * The response blocks that make up the chat response. This can include text,
+   * tables, and lists.
+   * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock blocks = 2; + */ + int getBlocksCount(); + + /** + * + * + *
+   * The response blocks that make up the chat response. This can include text,
+   * tables, and lists.
+   * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock blocks = 2; + */ + java.util.List + getBlocksOrBuilderList(); + + /** + * + * + *
+   * The response blocks that make up the chat response. This can include text,
+   * tables, and lists.
+   * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock blocks = 2; + */ + com.google.analytics.data.v1alpha.ResponseBlockOrBuilder getBlocksOrBuilder(int index); + + /** + * + * + *
+   * This Analytics Property's quota state including this request.
+   * 
+ * + * .google.analytics.data.v1alpha.PropertyChatQuota property_quota = 3; + * + * @return Whether the propertyQuota field is set. + */ + boolean hasPropertyQuota(); + + /** + * + * + *
+   * This Analytics Property's quota state including this request.
+   * 
+ * + * .google.analytics.data.v1alpha.PropertyChatQuota property_quota = 3; + * + * @return The propertyQuota. + */ + com.google.analytics.data.v1alpha.PropertyChatQuota getPropertyQuota(); + + /** + * + * + *
+   * This Analytics Property's quota state including this request.
+   * 
+ * + * .google.analytics.data.v1alpha.PropertyChatQuota property_quota = 3; + */ + com.google.analytics.data.v1alpha.PropertyChatQuotaOrBuilder getPropertyQuotaOrBuilder(); +} diff --git a/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/PropertyChatQuota.java b/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/PropertyChatQuota.java new file mode 100644 index 000000000000..33f2f8519706 --- /dev/null +++ b/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/PropertyChatQuota.java @@ -0,0 +1,985 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/analytics/data/v1alpha/data.proto +// Protobuf Java Version: 4.33.6 + +package com.google.analytics.data.v1alpha; + +/** + * + * + *
+ * Property quota for chatbot specific fields.
+ * 
+ * + * Protobuf type {@code google.analytics.data.v1alpha.PropertyChatQuota} + */ +@com.google.protobuf.Generated +public final class PropertyChatQuota extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.analytics.data.v1alpha.PropertyChatQuota) + PropertyChatQuotaOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "PropertyChatQuota"); + } + + // Use PropertyChatQuota.newBuilder() to construct. + private PropertyChatQuota(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private PropertyChatQuota() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1alpha.ReportingApiProto + .internal_static_google_analytics_data_v1alpha_PropertyChatQuota_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1alpha.ReportingApiProto + .internal_static_google_analytics_data_v1alpha_PropertyChatQuota_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1alpha.PropertyChatQuota.class, + com.google.analytics.data.v1alpha.PropertyChatQuota.Builder.class); + } + + private int bitField0_; + public static final int TOKENS_PER_DAY_FIELD_NUMBER = 1; + private com.google.analytics.data.v1alpha.QuotaStatus tokensPerDay_; + + /** + * + * + *
+   * Chat tokens consumed per day.
+   * 
+ * + * .google.analytics.data.v1alpha.QuotaStatus tokens_per_day = 1; + * + * @return Whether the tokensPerDay field is set. + */ + @java.lang.Override + public boolean hasTokensPerDay() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Chat tokens consumed per day.
+   * 
+ * + * .google.analytics.data.v1alpha.QuotaStatus tokens_per_day = 1; + * + * @return The tokensPerDay. + */ + @java.lang.Override + public com.google.analytics.data.v1alpha.QuotaStatus getTokensPerDay() { + return tokensPerDay_ == null + ? com.google.analytics.data.v1alpha.QuotaStatus.getDefaultInstance() + : tokensPerDay_; + } + + /** + * + * + *
+   * Chat tokens consumed per day.
+   * 
+ * + * .google.analytics.data.v1alpha.QuotaStatus tokens_per_day = 1; + */ + @java.lang.Override + public com.google.analytics.data.v1alpha.QuotaStatusOrBuilder getTokensPerDayOrBuilder() { + return tokensPerDay_ == null + ? com.google.analytics.data.v1alpha.QuotaStatus.getDefaultInstance() + : tokensPerDay_; + } + + public static final int TOKENS_PER_HOUR_FIELD_NUMBER = 2; + private com.google.analytics.data.v1alpha.QuotaStatus tokensPerHour_; + + /** + * + * + *
+   * Chat tokens consumed per hour.
+   * 
+ * + * .google.analytics.data.v1alpha.QuotaStatus tokens_per_hour = 2; + * + * @return Whether the tokensPerHour field is set. + */ + @java.lang.Override + public boolean hasTokensPerHour() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Chat tokens consumed per hour.
+   * 
+ * + * .google.analytics.data.v1alpha.QuotaStatus tokens_per_hour = 2; + * + * @return The tokensPerHour. + */ + @java.lang.Override + public com.google.analytics.data.v1alpha.QuotaStatus getTokensPerHour() { + return tokensPerHour_ == null + ? com.google.analytics.data.v1alpha.QuotaStatus.getDefaultInstance() + : tokensPerHour_; + } + + /** + * + * + *
+   * Chat tokens consumed per hour.
+   * 
+ * + * .google.analytics.data.v1alpha.QuotaStatus tokens_per_hour = 2; + */ + @java.lang.Override + public com.google.analytics.data.v1alpha.QuotaStatusOrBuilder getTokensPerHourOrBuilder() { + return tokensPerHour_ == null + ? com.google.analytics.data.v1alpha.QuotaStatus.getDefaultInstance() + : tokensPerHour_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getTokensPerDay()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getTokensPerHour()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTokensPerDay()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTokensPerHour()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.data.v1alpha.PropertyChatQuota)) { + return super.equals(obj); + } + com.google.analytics.data.v1alpha.PropertyChatQuota other = + (com.google.analytics.data.v1alpha.PropertyChatQuota) obj; + + if (hasTokensPerDay() != other.hasTokensPerDay()) return false; + if (hasTokensPerDay()) { + if (!getTokensPerDay().equals(other.getTokensPerDay())) return false; + } + if (hasTokensPerHour() != other.hasTokensPerHour()) return false; + if (hasTokensPerHour()) { + if (!getTokensPerHour().equals(other.getTokensPerHour())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasTokensPerDay()) { + hash = (37 * hash) + TOKENS_PER_DAY_FIELD_NUMBER; + hash = (53 * hash) + getTokensPerDay().hashCode(); + } + if (hasTokensPerHour()) { + hash = (37 * hash) + TOKENS_PER_HOUR_FIELD_NUMBER; + hash = (53 * hash) + getTokensPerHour().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.data.v1alpha.PropertyChatQuota parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1alpha.PropertyChatQuota parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1alpha.PropertyChatQuota parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1alpha.PropertyChatQuota parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1alpha.PropertyChatQuota parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1alpha.PropertyChatQuota parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1alpha.PropertyChatQuota parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1alpha.PropertyChatQuota parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1alpha.PropertyChatQuota parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1alpha.PropertyChatQuota parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1alpha.PropertyChatQuota parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1alpha.PropertyChatQuota parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.analytics.data.v1alpha.PropertyChatQuota prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Property quota for chatbot specific fields.
+   * 
+ * + * Protobuf type {@code google.analytics.data.v1alpha.PropertyChatQuota} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.data.v1alpha.PropertyChatQuota) + com.google.analytics.data.v1alpha.PropertyChatQuotaOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1alpha.ReportingApiProto + .internal_static_google_analytics_data_v1alpha_PropertyChatQuota_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1alpha.ReportingApiProto + .internal_static_google_analytics_data_v1alpha_PropertyChatQuota_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1alpha.PropertyChatQuota.class, + com.google.analytics.data.v1alpha.PropertyChatQuota.Builder.class); + } + + // Construct using com.google.analytics.data.v1alpha.PropertyChatQuota.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetTokensPerDayFieldBuilder(); + internalGetTokensPerHourFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + tokensPerDay_ = null; + if (tokensPerDayBuilder_ != null) { + tokensPerDayBuilder_.dispose(); + tokensPerDayBuilder_ = null; + } + tokensPerHour_ = null; + if (tokensPerHourBuilder_ != null) { + tokensPerHourBuilder_.dispose(); + tokensPerHourBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.data.v1alpha.ReportingApiProto + .internal_static_google_analytics_data_v1alpha_PropertyChatQuota_descriptor; + } + + @java.lang.Override + public com.google.analytics.data.v1alpha.PropertyChatQuota getDefaultInstanceForType() { + return com.google.analytics.data.v1alpha.PropertyChatQuota.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.data.v1alpha.PropertyChatQuota build() { + com.google.analytics.data.v1alpha.PropertyChatQuota result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.data.v1alpha.PropertyChatQuota buildPartial() { + com.google.analytics.data.v1alpha.PropertyChatQuota result = + new com.google.analytics.data.v1alpha.PropertyChatQuota(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.analytics.data.v1alpha.PropertyChatQuota result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.tokensPerDay_ = + tokensPerDayBuilder_ == null ? tokensPerDay_ : tokensPerDayBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.tokensPerHour_ = + tokensPerHourBuilder_ == null ? tokensPerHour_ : tokensPerHourBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.data.v1alpha.PropertyChatQuota) { + return mergeFrom((com.google.analytics.data.v1alpha.PropertyChatQuota) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.data.v1alpha.PropertyChatQuota other) { + if (other == com.google.analytics.data.v1alpha.PropertyChatQuota.getDefaultInstance()) + return this; + if (other.hasTokensPerDay()) { + mergeTokensPerDay(other.getTokensPerDay()); + } + if (other.hasTokensPerHour()) { + mergeTokensPerHour(other.getTokensPerHour()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetTokensPerDayFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetTokensPerHourFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.analytics.data.v1alpha.QuotaStatus tokensPerDay_; + private com.google.protobuf.SingleFieldBuilder< + com.google.analytics.data.v1alpha.QuotaStatus, + com.google.analytics.data.v1alpha.QuotaStatus.Builder, + com.google.analytics.data.v1alpha.QuotaStatusOrBuilder> + tokensPerDayBuilder_; + + /** + * + * + *
+     * Chat tokens consumed per day.
+     * 
+ * + * .google.analytics.data.v1alpha.QuotaStatus tokens_per_day = 1; + * + * @return Whether the tokensPerDay field is set. + */ + public boolean hasTokensPerDay() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Chat tokens consumed per day.
+     * 
+ * + * .google.analytics.data.v1alpha.QuotaStatus tokens_per_day = 1; + * + * @return The tokensPerDay. + */ + public com.google.analytics.data.v1alpha.QuotaStatus getTokensPerDay() { + if (tokensPerDayBuilder_ == null) { + return tokensPerDay_ == null + ? com.google.analytics.data.v1alpha.QuotaStatus.getDefaultInstance() + : tokensPerDay_; + } else { + return tokensPerDayBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Chat tokens consumed per day.
+     * 
+ * + * .google.analytics.data.v1alpha.QuotaStatus tokens_per_day = 1; + */ + public Builder setTokensPerDay(com.google.analytics.data.v1alpha.QuotaStatus value) { + if (tokensPerDayBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tokensPerDay_ = value; + } else { + tokensPerDayBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Chat tokens consumed per day.
+     * 
+ * + * .google.analytics.data.v1alpha.QuotaStatus tokens_per_day = 1; + */ + public Builder setTokensPerDay( + com.google.analytics.data.v1alpha.QuotaStatus.Builder builderForValue) { + if (tokensPerDayBuilder_ == null) { + tokensPerDay_ = builderForValue.build(); + } else { + tokensPerDayBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Chat tokens consumed per day.
+     * 
+ * + * .google.analytics.data.v1alpha.QuotaStatus tokens_per_day = 1; + */ + public Builder mergeTokensPerDay(com.google.analytics.data.v1alpha.QuotaStatus value) { + if (tokensPerDayBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && tokensPerDay_ != null + && tokensPerDay_ + != com.google.analytics.data.v1alpha.QuotaStatus.getDefaultInstance()) { + getTokensPerDayBuilder().mergeFrom(value); + } else { + tokensPerDay_ = value; + } + } else { + tokensPerDayBuilder_.mergeFrom(value); + } + if (tokensPerDay_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Chat tokens consumed per day.
+     * 
+ * + * .google.analytics.data.v1alpha.QuotaStatus tokens_per_day = 1; + */ + public Builder clearTokensPerDay() { + bitField0_ = (bitField0_ & ~0x00000001); + tokensPerDay_ = null; + if (tokensPerDayBuilder_ != null) { + tokensPerDayBuilder_.dispose(); + tokensPerDayBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Chat tokens consumed per day.
+     * 
+ * + * .google.analytics.data.v1alpha.QuotaStatus tokens_per_day = 1; + */ + public com.google.analytics.data.v1alpha.QuotaStatus.Builder getTokensPerDayBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetTokensPerDayFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Chat tokens consumed per day.
+     * 
+ * + * .google.analytics.data.v1alpha.QuotaStatus tokens_per_day = 1; + */ + public com.google.analytics.data.v1alpha.QuotaStatusOrBuilder getTokensPerDayOrBuilder() { + if (tokensPerDayBuilder_ != null) { + return tokensPerDayBuilder_.getMessageOrBuilder(); + } else { + return tokensPerDay_ == null + ? com.google.analytics.data.v1alpha.QuotaStatus.getDefaultInstance() + : tokensPerDay_; + } + } + + /** + * + * + *
+     * Chat tokens consumed per day.
+     * 
+ * + * .google.analytics.data.v1alpha.QuotaStatus tokens_per_day = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.analytics.data.v1alpha.QuotaStatus, + com.google.analytics.data.v1alpha.QuotaStatus.Builder, + com.google.analytics.data.v1alpha.QuotaStatusOrBuilder> + internalGetTokensPerDayFieldBuilder() { + if (tokensPerDayBuilder_ == null) { + tokensPerDayBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.analytics.data.v1alpha.QuotaStatus, + com.google.analytics.data.v1alpha.QuotaStatus.Builder, + com.google.analytics.data.v1alpha.QuotaStatusOrBuilder>( + getTokensPerDay(), getParentForChildren(), isClean()); + tokensPerDay_ = null; + } + return tokensPerDayBuilder_; + } + + private com.google.analytics.data.v1alpha.QuotaStatus tokensPerHour_; + private com.google.protobuf.SingleFieldBuilder< + com.google.analytics.data.v1alpha.QuotaStatus, + com.google.analytics.data.v1alpha.QuotaStatus.Builder, + com.google.analytics.data.v1alpha.QuotaStatusOrBuilder> + tokensPerHourBuilder_; + + /** + * + * + *
+     * Chat tokens consumed per hour.
+     * 
+ * + * .google.analytics.data.v1alpha.QuotaStatus tokens_per_hour = 2; + * + * @return Whether the tokensPerHour field is set. + */ + public boolean hasTokensPerHour() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Chat tokens consumed per hour.
+     * 
+ * + * .google.analytics.data.v1alpha.QuotaStatus tokens_per_hour = 2; + * + * @return The tokensPerHour. + */ + public com.google.analytics.data.v1alpha.QuotaStatus getTokensPerHour() { + if (tokensPerHourBuilder_ == null) { + return tokensPerHour_ == null + ? com.google.analytics.data.v1alpha.QuotaStatus.getDefaultInstance() + : tokensPerHour_; + } else { + return tokensPerHourBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Chat tokens consumed per hour.
+     * 
+ * + * .google.analytics.data.v1alpha.QuotaStatus tokens_per_hour = 2; + */ + public Builder setTokensPerHour(com.google.analytics.data.v1alpha.QuotaStatus value) { + if (tokensPerHourBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tokensPerHour_ = value; + } else { + tokensPerHourBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Chat tokens consumed per hour.
+     * 
+ * + * .google.analytics.data.v1alpha.QuotaStatus tokens_per_hour = 2; + */ + public Builder setTokensPerHour( + com.google.analytics.data.v1alpha.QuotaStatus.Builder builderForValue) { + if (tokensPerHourBuilder_ == null) { + tokensPerHour_ = builderForValue.build(); + } else { + tokensPerHourBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Chat tokens consumed per hour.
+     * 
+ * + * .google.analytics.data.v1alpha.QuotaStatus tokens_per_hour = 2; + */ + public Builder mergeTokensPerHour(com.google.analytics.data.v1alpha.QuotaStatus value) { + if (tokensPerHourBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && tokensPerHour_ != null + && tokensPerHour_ + != com.google.analytics.data.v1alpha.QuotaStatus.getDefaultInstance()) { + getTokensPerHourBuilder().mergeFrom(value); + } else { + tokensPerHour_ = value; + } + } else { + tokensPerHourBuilder_.mergeFrom(value); + } + if (tokensPerHour_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Chat tokens consumed per hour.
+     * 
+ * + * .google.analytics.data.v1alpha.QuotaStatus tokens_per_hour = 2; + */ + public Builder clearTokensPerHour() { + bitField0_ = (bitField0_ & ~0x00000002); + tokensPerHour_ = null; + if (tokensPerHourBuilder_ != null) { + tokensPerHourBuilder_.dispose(); + tokensPerHourBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Chat tokens consumed per hour.
+     * 
+ * + * .google.analytics.data.v1alpha.QuotaStatus tokens_per_hour = 2; + */ + public com.google.analytics.data.v1alpha.QuotaStatus.Builder getTokensPerHourBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetTokensPerHourFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Chat tokens consumed per hour.
+     * 
+ * + * .google.analytics.data.v1alpha.QuotaStatus tokens_per_hour = 2; + */ + public com.google.analytics.data.v1alpha.QuotaStatusOrBuilder getTokensPerHourOrBuilder() { + if (tokensPerHourBuilder_ != null) { + return tokensPerHourBuilder_.getMessageOrBuilder(); + } else { + return tokensPerHour_ == null + ? com.google.analytics.data.v1alpha.QuotaStatus.getDefaultInstance() + : tokensPerHour_; + } + } + + /** + * + * + *
+     * Chat tokens consumed per hour.
+     * 
+ * + * .google.analytics.data.v1alpha.QuotaStatus tokens_per_hour = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.analytics.data.v1alpha.QuotaStatus, + com.google.analytics.data.v1alpha.QuotaStatus.Builder, + com.google.analytics.data.v1alpha.QuotaStatusOrBuilder> + internalGetTokensPerHourFieldBuilder() { + if (tokensPerHourBuilder_ == null) { + tokensPerHourBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.analytics.data.v1alpha.QuotaStatus, + com.google.analytics.data.v1alpha.QuotaStatus.Builder, + com.google.analytics.data.v1alpha.QuotaStatusOrBuilder>( + getTokensPerHour(), getParentForChildren(), isClean()); + tokensPerHour_ = null; + } + return tokensPerHourBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.analytics.data.v1alpha.PropertyChatQuota) + } + + // @@protoc_insertion_point(class_scope:google.analytics.data.v1alpha.PropertyChatQuota) + private static final com.google.analytics.data.v1alpha.PropertyChatQuota DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.data.v1alpha.PropertyChatQuota(); + } + + public static com.google.analytics.data.v1alpha.PropertyChatQuota getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PropertyChatQuota parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.data.v1alpha.PropertyChatQuota getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/PropertyChatQuotaOrBuilder.java b/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/PropertyChatQuotaOrBuilder.java new file mode 100644 index 000000000000..e8f116681a36 --- /dev/null +++ b/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/PropertyChatQuotaOrBuilder.java @@ -0,0 +1,102 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/analytics/data/v1alpha/data.proto +// Protobuf Java Version: 4.33.6 + +package com.google.analytics.data.v1alpha; + +@com.google.protobuf.Generated +public interface PropertyChatQuotaOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.data.v1alpha.PropertyChatQuota) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Chat tokens consumed per day.
+   * 
+ * + * .google.analytics.data.v1alpha.QuotaStatus tokens_per_day = 1; + * + * @return Whether the tokensPerDay field is set. + */ + boolean hasTokensPerDay(); + + /** + * + * + *
+   * Chat tokens consumed per day.
+   * 
+ * + * .google.analytics.data.v1alpha.QuotaStatus tokens_per_day = 1; + * + * @return The tokensPerDay. + */ + com.google.analytics.data.v1alpha.QuotaStatus getTokensPerDay(); + + /** + * + * + *
+   * Chat tokens consumed per day.
+   * 
+ * + * .google.analytics.data.v1alpha.QuotaStatus tokens_per_day = 1; + */ + com.google.analytics.data.v1alpha.QuotaStatusOrBuilder getTokensPerDayOrBuilder(); + + /** + * + * + *
+   * Chat tokens consumed per hour.
+   * 
+ * + * .google.analytics.data.v1alpha.QuotaStatus tokens_per_hour = 2; + * + * @return Whether the tokensPerHour field is set. + */ + boolean hasTokensPerHour(); + + /** + * + * + *
+   * Chat tokens consumed per hour.
+   * 
+ * + * .google.analytics.data.v1alpha.QuotaStatus tokens_per_hour = 2; + * + * @return The tokensPerHour. + */ + com.google.analytics.data.v1alpha.QuotaStatus getTokensPerHour(); + + /** + * + * + *
+   * Chat tokens consumed per hour.
+   * 
+ * + * .google.analytics.data.v1alpha.QuotaStatus tokens_per_hour = 2; + */ + com.google.analytics.data.v1alpha.QuotaStatusOrBuilder getTokensPerHourOrBuilder(); +} diff --git a/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/ReportingApiProto.java b/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/ReportingApiProto.java index 4e77478131af..e414dd5fc92d 100644 --- a/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/ReportingApiProto.java +++ b/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/ReportingApiProto.java @@ -144,6 +144,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_analytics_data_v1alpha_ResponseMetaData_SchemaRestrictionResponse_ActiveMetricRestriction_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_analytics_data_v1alpha_ResponseMetaData_SchemaRestrictionResponse_ActiveMetricRestriction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_data_v1alpha_ResponseMetaData_DataTruncationReason_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_analytics_data_v1alpha_ResponseMetaData_DataTruncationReason_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_data_v1alpha_ResponseMetaData_DataTruncationReason_DataTruncationDateRange_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_analytics_data_v1alpha_ResponseMetaData_DataTruncationReason_DataTruncationDateRange_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_analytics_data_v1alpha_DimensionHeader_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable @@ -192,6 +200,26 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_analytics_data_v1alpha_FunnelSubReport_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_analytics_data_v1alpha_FunnelSubReport_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_data_v1alpha_ResponseBlock_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_analytics_data_v1alpha_ResponseBlock_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_data_v1alpha_ResponseBlock_DataTableCell_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_analytics_data_v1alpha_ResponseBlock_DataTableCell_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_data_v1alpha_ResponseBlock_DataTableHeader_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_analytics_data_v1alpha_ResponseBlock_DataTableHeader_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_data_v1alpha_ResponseBlock_DataTableRow_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_analytics_data_v1alpha_ResponseBlock_DataTableRow_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_data_v1alpha_ResponseBlock_DataTable_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_analytics_data_v1alpha_ResponseBlock_DataTable_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_analytics_data_v1alpha_UserSegment_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable @@ -344,6 +372,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_analytics_data_v1alpha_ConversionMetadata_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_analytics_data_v1alpha_ConversionMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_data_v1alpha_PropertyChatQuota_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_analytics_data_v1alpha_PropertyChatQuota_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -486,7 +518,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\006WEEKLY\020\002\022\013\n" + "\007MONTHLY\020\003\"*\n" + "\024CohortReportSettings\022\022\n\n" - + "accumulate\030\001 \001(\010\"\323\006\n" + + "accumulate\030\001 \001(\010\"\261\017\n" + "\020ResponseMetaData\022 \n" + "\030data_loss_from_other_row\030\003 \001(\010\022s\n" + "\033schema_restriction_response\030\004 \001(\0132I.google.analytics.data.v1alp" @@ -498,15 +530,47 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\022sampling_metadatas\030\t \003(\0132/.go" + "ogle.analytics.data.v1alpha.SamplingMetadata\0227\n" + "\007section\030\n" - + " \001(\0162&.google.analytics.data.v1alpha.Section\032\277\002\n" + + " \001(\0162&.google.analytics.data.v1alpha.Section\022e\n" + + "\027data_truncation_reasons\030\013 \003(\0132D.google.analytics.data.v" + + "1alpha.ResponseMetaData.DataTruncationReason\032\277\002\n" + "\031SchemaRestrictionResponse\022\205\001\n" - + "\032active_metric_restrictions\030\001 \003(\0132a.google.analytics.data.v1alpha" - + ".ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction\032\231\001\n" + + "\032active_metric_restrictions\030\001 \003(\0132a.google" + + ".analytics.data.v1alpha.ResponseMetaData" + + ".SchemaRestrictionResponse.ActiveMetricRestriction\032\231\001\n" + "\027ActiveMetricRestriction\022\030\n" + "\013metric_name\030\001 \001(\tH\000\210\001\001\022T\n" - + "\027restricted_metric_types\030\002 \003(\01623.goo" - + "gle.analytics.data.v1alpha.RestrictedMetricTypeB\016\n" - + "\014_metric_nameB\036\n" + + "\027restricted_metric_types\030\002" + + " \003(\01623.google.analytics.data.v1alpha.RestrictedMetricTypeB\016\n" + + "\014_metric_name\032\364\007\n" + + "\024DataTruncationReason\022z\n" + + "\024data_truncation_type\030\001 \001(\0162W.google.analytics" + + ".data.v1alpha.ResponseMetaData.DataTruncationReason.DataTruncationTypeH\000\210\001\001\022$\n" + + "\027data_truncation_message\030\002 \001(\tH\001\210\001\001\022!\n" + + "\024data_truncation_date\030\003 \001(\tH\002\210\001\001\022\201\001\n" + + "\033data_truncation_date_ranges\030\004 \003(\0132\\.google.anal" + + "ytics.data.v1alpha.ResponseMetaData.Data" + + "TruncationReason.DataTruncationDateRange\032e\n" + + "\027DataTruncationDateRange\022\027\n\n" + + "start_date\030\001 \001(\tH\000\210\001\001\022\025\n" + + "\010end_date\030\002 \001(\tH\001\210\001\001B\r\n" + + "\013_start_dateB\013\n" + + "\t_end_date\"\335\003\n" + + "\022DataTruncationType\022$\n" + + " DATA_TRUNCATION_TYPE_UNSPECIFIED\020\000\022+\n" + + "\'DATA_TRUNCATION_TYPE_RULES_BASED_MODELS\020\001\0220\n" + + ",DATA_TRUNCATION_TYPE_DATA_DRIVEN_ATTRIBUTION\020\002\022\036\n" + + "\032DATA_TRUNCATION_TYPE_DV360\020\003\022\036\n" + + "\032DATA_TRUNCATION_TYPE_CM360\020\004\0226\n" + + "2DATA_TRUNCATION_TYPE_ITEM_SCOPED_ECOMMERCE_METRICS\020\005\0227\n" + + "3DATA_TRUNCATION_TYPE_EVENT_SCOPED_ECOMMERCE_METRICS\020\006\022#\n" + + "\037DATA_TRUNCATION_TYPE_DATE_RANGE\020\007\022!\n" + + "\035DATA_TRUNCATION_TYPE_PROPERTY\020\010\022$\n" + + " DATA_TRUNCATION_TYPE_CONVERSIONS\020\t\022#\n" + + "\037DATA_TRUNCATION_TYPE_GOOGLE_ADS\020\n" + + "B\027\n" + + "\025_data_truncation_typeB\032\n" + + "\030_data_truncation_messageB\027\n" + + "\025_data_truncation_dateB\036\n" + "\034_schema_restriction_responseB\020\n" + "\016_currency_codeB\014\n\n" + "_time_zoneB\017\n\r" @@ -530,12 +594,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "PropertyQuota\022B\n" + "\016tokens_per_day\030\001" + " \001(\0132*.google.analytics.data.v1alpha.QuotaStatus\022C\n" - + "\017tokens_per_hour\030\002" - + " \001(\0132*.google.analytics.data.v1alpha.QuotaStatus\022G\n" - + "\023concurrent_requests\030\003 \001(\0132*." - + "google.analytics.data.v1alpha.QuotaStatus\022V\n" - + "\"server_errors_per_project_per_hour\030\004" - + " \001(\0132*.google.analytics.data.v1alpha.QuotaStatus\022]\n" + + "\017tokens_per_hour\030\002 \001" + + "(\0132*.google.analytics.data.v1alpha.QuotaStatus\022G\n" + + "\023concurrent_requests\030\003 \001(\0132*.go" + + "ogle.analytics.data.v1alpha.QuotaStatus\022V\n" + + "\"server_errors_per_project_per_hour\030\004 " + + "\001(\0132*.google.analytics.data.v1alpha.QuotaStatus\022]\n" + ")potentially_thresholded_requests_per_hour\030\005" + " \001(\0132*.google.analytics.data.v1alpha.QuotaStatus\022O\n" + "\033tokens_per_project_per_hour\030\006" @@ -544,8 +608,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\010consumed\030\001 \001(\005\022\021\n" + "\tremaining\030\002 \001(\005\"v\n" + "\017FunnelBreakdown\022E\n" - + "\023breakdown_dimension\030\001" - + " \001(\0132(.google.analytics.data.v1alpha.Dimension\022\022\n" + + "\023breakdown_dimension\030\001 " + + "\001(\0132(.google.analytics.data.v1alpha.Dimension\022\022\n" + "\005limit\030\002 \001(\003H\000\210\001\001B\010\n" + "\006_limit\"y\n" + "\020FunnelNextAction\022G\n" @@ -565,227 +629,245 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + " \001(\01325.google.analytics.data.v1alpha.FunnelFilterExpressionB\"\n" + " _within_duration_from_prior_step\"\234\002\n" + "\017FunnelSubReport\022I\n" - + "\021dimension_headers\030\001 \003(\0132..googl" - + "e.analytics.data.v1alpha.DimensionHeader\022C\n" + + "\021dimension_headers\030\001 \003(\0132..google." + + "analytics.data.v1alpha.DimensionHeader\022C\n" + "\016metric_headers\030\002" + " \003(\0132+.google.analytics.data.v1alpha.MetricHeader\0220\n" + "\004rows\030\003 \003(\0132\".google.analytics.data.v1alpha.Row\022G\n" + "\010metadata\030\004" - + " \001(\01325.google.analytics.data.v1alpha.FunnelResponseMetadata\"\252\001\n" + + " \001(\01325.google.analytics.data.v1alpha.FunnelResponseMetadata\"\312\003\n\r" + + "ResponseBlock\022\016\n" + + "\004text\030\001 \001(\tH\000\022G\n" + + "\005table\030\002 \001(\0132" + + "6.google.analytics.data.v1alpha.ResponseBlock.DataTableH\000\032\036\n\r" + + "DataTableCell\022\r\n" + + "\005value\030\001 \001(\t\0324\n" + + "\017DataTableHeader\022\016\n" + + "\006header\030\001 \001(\t\022\021\n" + + "\tdata_type\030\002 \001(\t\032[\n" + + "\014DataTableRow\022K\n" + + "\007columns\030\001" + + " \003(\0132:.google.analytics.data.v1alpha.ResponseBlock.DataTableCell\032\243\001\n" + + "\tDataTable\022M\n" + + "\007headers\030\001 \003(\0132<.google.ana" + + "lytics.data.v1alpha.ResponseBlock.DataTableHeader\022G\n" + + "\004rows\030\002 \003(\01329.google.analyti" + + "cs.data.v1alpha.ResponseBlock.DataTableRowB\007\n" + + "\005block\"\252\001\n" + "\013UserSegment\022S\n" - + "\027user_inclusion_criteria\030\001 \001(" - + "\01322.google.analytics.data.v1alpha.UserSegmentCriteria\022F\n" - + "\texclusion\030\002 \001(\01323.googl" - + "e.analytics.data.v1alpha.UserSegmentExclusion\"\303\001\n" + + "\027user_inclusion_criteria\030\001" + + " \001(\01322.google.analytics.data.v1alpha.UserSegmentCriteria\022F\n" + + "\texclusion\030\002" + + " \001(\01323.google.analytics.data.v1alpha.UserSegmentExclusion\"\303\001\n" + "\023UserSegmentCriteria\022V\n" - + "\024and_condition_groups\030\001" - + " \003(\01328.google.analytics.data.v1alpha.UserSegmentConditionGroup\022T\n" - + "\023and_sequence_groups\030\002 \003(\01327.google.anal" - + "ytics.data.v1alpha.UserSegmentSequenceGroup\"\305\001\n" + + "\024and_condition_groups\030\001 \003(\01328" + + ".google.analytics.data.v1alpha.UserSegmentConditionGroup\022T\n" + + "\023and_sequence_groups\030\002" + + " \003(\01327.google.analytics.data.v1alpha.UserSegmentSequenceGroup\"\305\001\n" + "\031UserSegmentConditionGroup\022M\n" - + "\021condition_scoping\030\001" - + " \001(\01622.google.analytics.data.v1alpha.UserCriteriaScoping\022Y\n" - + "\031segment_filter_expression\030\002 \001(\01326.google.ana" - + "lytics.data.v1alpha.SegmentFilterExpression\"\364\001\n" + + "\021condition_scoping\030\001 \001(\0162" + + "2.google.analytics.data.v1alpha.UserCriteriaScoping\022Y\n" + + "\031segment_filter_expression\030\002" + + " \001(\01326.google.analytics.data.v1alpha.SegmentFilterExpression\"\364\001\n" + "\030UserSegmentSequenceGroup\022L\n" - + "\020sequence_scoping\030\001" - + " \001(\01622.google.analytics.data.v1alpha.UserCriteriaScoping\022<\n" + + "\020sequence_scoping\030\001 \001(\01622." + + "google.analytics.data.v1alpha.UserCriteriaScoping\022<\n" + "\031sequence_maximum_duration\030\002 \001(\0132\031.google.protobuf.Duration\022L\n" - + "\023user_sequence_steps\030\003 \003(" - + "\0132/.google.analytics.data.v1alpha.UserSequenceStep\"\330\001\n" + + "\023user_sequence_steps\030\003" + + " \003(\0132/.google.analytics.data.v1alpha.UserSequenceStep\"\330\001\n" + "\020UserSequenceStep\022\037\n" + "\027is_directly_followed_by\030\001 \001(\010\022H\n" + "\014step_scoping\030\002" + " \001(\01622.google.analytics.data.v1alpha.UserCriteriaScoping\022Y\n" - + "\031segment_filter_expression\030\003" - + " \001(\01326.google.analytics.data.v1alpha.SegmentFilterExpression\"\302\001\n" + + "\031segment_filter_expression\030\003 \001(\01326.googl" + + "e.analytics.data.v1alpha.SegmentFilterExpression\"\302\001\n" + "\024UserSegmentExclusion\022U\n" - + "\027user_exclusion_duration\030\001" - + " \001(\01624.google.analytics.data.v1alpha.UserExclusionDuration\022S\n" - + "\027user_exclusion_criteria\030\002" - + " \001(\01322.google.analytics.data.v1alpha.UserSegmentCriteria\"\266\001\n" + + "\027user_exclusion_duration\030\001 \001(\01624.google.anal" + + "ytics.data.v1alpha.UserExclusionDuration\022S\n" + + "\027user_exclusion_criteria\030\002 \001(\01322.goog" + + "le.analytics.data.v1alpha.UserSegmentCriteria\"\266\001\n" + "\016SessionSegment\022Y\n" - + "\032session_inclusion_criteria\030\001 \001(" - + "\01325.google.analytics.data.v1alpha.SessionSegmentCriteria\022I\n" - + "\texclusion\030\002 \001(\01326.go" - + "ogle.analytics.data.v1alpha.SessionSegmentExclusion\"s\n" + + "\032session_inclusion_criteria\030\001" + + " \001(\01325.google.analytics.data.v1alpha.SessionSegmentCriteria\022I\n" + + "\texclusion\030\002" + + " \001(\01326.google.analytics.data.v1alpha.SessionSegmentExclusion\"s\n" + "\026SessionSegmentCriteria\022Y\n" - + "\024and_condition_groups\030\001 \003(\0132;.google.ana" - + "lytics.data.v1alpha.SessionSegmentConditionGroup\"\313\001\n" + + "\024and_condition_groups\030\001" + + " \003(\0132;.google.analytics.data.v1alpha.SessionSegmentConditionGroup\"\313\001\n" + "\034SessionSegmentConditionGroup\022P\n" - + "\021condition_scoping\030\001 \001(\01625.google.an" - + "alytics.data.v1alpha.SessionCriteriaScoping\022Y\n" - + "\031segment_filter_expression\030\002 \001(\01326" - + ".google.analytics.data.v1alpha.SegmentFilterExpression\"\321\001\n" + + "\021condition_scoping\030\001" + + " \001(\01625.google.analytics.data.v1alpha.SessionCriteriaScoping\022Y\n" + + "\031segment_filter_expression\030\002" + + " \001(\01326.google.analytics.data.v1alpha.SegmentFilterExpression\"\321\001\n" + "\027SessionSegmentExclusion\022[\n" - + "\032session_exclusion_duration\030\001 \001(\01627" - + ".google.analytics.data.v1alpha.SessionExclusionDuration\022Y\n" - + "\032session_exclusion_criteria\030\002" - + " \001(\01325.google.analytics.data.v1alpha.SessionSegmentCriteria\"\256\001\n" + + "\032session_exclusion_duration\030\001" + + " \001(\01627.google.analytics.data.v1alpha.SessionExclusionDuration\022Y\n" + + "\032session_exclusion_criteria\030\002 \001(\01325.google." + + "analytics.data.v1alpha.SessionSegmentCriteria\"\256\001\n" + "\014EventSegment\022U\n" - + "\030event_inclusion_criteria\030\001 \001(\01323." - + "google.analytics.data.v1alpha.EventSegmentCriteria\022G\n" - + "\texclusion\030\002 \001(\01324.google.a" - + "nalytics.data.v1alpha.EventSegmentExclusion\"o\n" + + "\030event_inclusion_criteria\030\001" + + " \001(\01323.google.analytics.data.v1alpha.EventSegmentCriteria\022G\n" + + "\texclusion\030\002" + + " \001(\01324.google.analytics.data.v1alpha.EventSegmentExclusion\"o\n" + "\024EventSegmentCriteria\022W\n" - + "\024and_condition_groups\030\001" - + " \003(\01329.google.analytics.data.v1alpha.EventSegmentConditionGroup\"\307\001\n" + + "\024and_condition_groups\030\001 \003(\01329.g" + + "oogle.analytics.data.v1alpha.EventSegmentConditionGroup\"\307\001\n" + "\032EventSegmentConditionGroup\022N\n" - + "\021condition_scoping\030\001" - + " \001(\01623.google.analytics.data.v1alpha.EventCriteriaScoping\022Y\n" - + "\031segment_filter_expression\030\002 \001(\01326.google.analytic" - + "s.data.v1alpha.SegmentFilterExpression\"\307\001\n" + + "\021condition_scoping\030\001 \001(\01623.goog" + + "le.analytics.data.v1alpha.EventCriteriaScoping\022Y\n" + + "\031segment_filter_expression\030\002 \001(" + + "\01326.google.analytics.data.v1alpha.SegmentFilterExpression\"\307\001\n" + "\025EventSegmentExclusion\022W\n" - + "\030event_exclusion_duration\030\001" - + " \001(\01625.google.analytics.data.v1alpha.EventExclusionDuration\022U\n" - + "\030event_exclusion_criteria\030\002 \001(\01323.google.ana" - + "lytics.data.v1alpha.EventSegmentCriteria\"\200\002\n" + + "\030event_exclusion_duration\030\001 \001(\01625." + + "google.analytics.data.v1alpha.EventExclusionDuration\022U\n" + + "\030event_exclusion_criteria\030\002" + + " \001(\01323.google.analytics.data.v1alpha.EventSegmentCriteria\"\200\002\n" + "\007Segment\022\014\n" + "\004name\030\001 \001(\t\022B\n" + "\014user_segment\030\002" + " \001(\0132*.google.analytics.data.v1alpha.UserSegmentH\000\022H\n" - + "\017session_segment\030\003 \001(\0132" - + "-.google.analytics.data.v1alpha.SessionSegmentH\000\022D\n\r" - + "event_segment\030\004 \001(\0132+.google" - + ".analytics.data.v1alpha.EventSegmentH\000B\023\n" + + "\017session_segment\030\003" + + " \001(\0132-.google.analytics.data.v1alpha.SessionSegmentH\000\022D\n\r" + + "event_segment\030\004" + + " \001(\0132+.google.analytics.data.v1alpha.EventSegmentH\000B\023\n" + "\021one_segment_scope\"\257\003\n" + "\027SegmentFilterExpression\022O\n" - + "\tand_group\030\001 \001(\0132:.google.anal" - + "ytics.data.v1alpha.SegmentFilterExpressionListH\000\022N\n" - + "\010or_group\030\002 \001(\0132:.google.anal" - + "ytics.data.v1alpha.SegmentFilterExpressionListH\000\022P\n" - + "\016not_expression\030\003 \001(\01326.googl" - + "e.analytics.data.v1alpha.SegmentFilterExpressionH\000\022F\n" - + "\016segment_filter\030\004 \001(\0132,.goo" - + "gle.analytics.data.v1alpha.SegmentFilterH\000\022Q\n" - + "\024segment_event_filter\030\005 \001(\01321.googl" - + "e.analytics.data.v1alpha.SegmentEventFilterH\000B\006\n" + + "\tand_group\030\001" + + " \001(\0132:.google.analytics.data.v1alpha.SegmentFilterExpressionListH\000\022N\n" + + "\010or_group\030\002" + + " \001(\0132:.google.analytics.data.v1alpha.SegmentFilterExpressionListH\000\022P\n" + + "\016not_expression\030\003" + + " \001(\01326.google.analytics.data.v1alpha.SegmentFilterExpressionH\000\022F\n" + + "\016segment_filter\030\004" + + " \001(\0132,.google.analytics.data.v1alpha.SegmentFilterH\000\022Q\n" + + "\024segment_event_filter\030\005" + + " \001(\01321.google.analytics.data.v1alpha.SegmentEventFilterH\000B\006\n" + "\004expr\"j\n" + "\033SegmentFilterExpressionList\022K\n" - + "\013expressions\030\001 \003(\01326.google.analy" - + "tics.data.v1alpha.SegmentFilterExpression\"\233\003\n\r" + + "\013expressions\030\001" + + " \003(\01326.google.analytics.data.v1alpha.SegmentFilterExpression\"\233\003\n\r" + "SegmentFilter\022\022\n\n" + "field_name\030\001 \001(\t\022D\n\r" - + "string_filter\030\004" - + " \001(\0132+.google.analytics.data.v1alpha.StringFilterH\000\022E\n" - + "\016in_list_filter\030\005" - + " \001(\0132+.google.analytics.data.v1alpha.InListFilterH\000\022F\n" + + "string_filter\030\004 \001(" + + "\0132+.google.analytics.data.v1alpha.StringFilterH\000\022E\n" + + "\016in_list_filter\030\005 \001(\0132+.googl" + + "e.analytics.data.v1alpha.InListFilterH\000\022F\n" + "\016numeric_filter\030\006" + " \001(\0132,.google.analytics.data.v1alpha.NumericFilterH\000\022F\n" - + "\016between_filter\030\007 \001(\0132,.g" - + "oogle.analytics.data.v1alpha.BetweenFilterH\000\022K\n" - + "\016filter_scoping\030\010 \001(\01323.google.an" - + "alytics.data.v1alpha.SegmentFilterScopingB\014\n\n" + + "\016between_filter\030\007" + + " \001(\0132,.google.analytics.data.v1alpha.BetweenFilterH\000\022K\n" + + "\016filter_scoping\030\010" + + " \001(\01323.google.analytics.data.v1alpha.SegmentFilterScopingB\014\n\n" + "one_filter\"R\n" + "\024SegmentFilterScoping\022!\n" + "\024at_any_point_in_time\030\001 \001(\010H\000\210\001\001B\027\n" + "\025_at_any_point_in_time\"\327\001\n" + "\022SegmentEventFilter\022\027\n\n" + "event_name\030\001 \001(\tH\000\210\001\001\022q\n" - + "#segment_parameter_filter_expression\030\002 \001(\0132?.googl" - + "e.analytics.data.v1alpha.SegmentParameterFilterExpressionH\001\210\001\001B\r\n" + + "#segment_parameter_filter_expression\030\002 \001(\0132?.google.analytics.data.v1al" + + "pha.SegmentParameterFilterExpressionH\001\210\001\001B\r\n" + "\013_event_nameB&\n" + "$_segment_parameter_filter_expression\"\223\003\n" + " SegmentParameterFilterExpression\022X\n" - + "\tand_group\030\001 \001(\0132C.google.analytics.data.v1" - + "alpha.SegmentParameterFilterExpressionListH\000\022W\n" - + "\010or_group\030\002 \001(\0132C.google.analytic" - + "s.data.v1alpha.SegmentParameterFilterExpressionListH\000\022Y\n" - + "\016not_expression\030\003 \001(\0132?." - + "google.analytics.data.v1alpha.SegmentParameterFilterExpressionH\000\022Y\n" - + "\030segment_parameter_filter\030\004" - + " \001(\01325.google.analytics.data.v1alpha.SegmentParameterFilterH\000B\006\n" + + "\tand_group\030\001 \001(\0132C.googl" + + "e.analytics.data.v1alpha.SegmentParameterFilterExpressionListH\000\022W\n" + + "\010or_group\030\002 \001(" + + "\0132C.google.analytics.data.v1alpha.SegmentParameterFilterExpressionListH\000\022Y\n" + + "\016not_expression\030\003 \001(\0132?.google.analytics.data" + + ".v1alpha.SegmentParameterFilterExpressionH\000\022Y\n" + + "\030segment_parameter_filter\030\004 \001(\01325." + + "google.analytics.data.v1alpha.SegmentParameterFilterH\000B\006\n" + "\004expr\"|\n" + "$SegmentParameterFilterExpressionList\022T\n" - + "\013expressions\030\001 \003(\0132?.google.analyt" - + "ics.data.v1alpha.SegmentParameterFilterExpression\"\351\003\n" + + "\013expressions\030\001 " + + "\003(\0132?.google.analytics.data.v1alpha.SegmentParameterFilterExpression\"\351\003\n" + "\026SegmentParameterFilter\022\036\n" + "\024event_parameter_name\030\001 \001(\tH\000\022\035\n" + "\023item_parameter_name\030\002 \001(\tH\000\022D\n\r" - + "string_filter\030\004 \001" - + "(\0132+.google.analytics.data.v1alpha.StringFilterH\001\022E\n" - + "\016in_list_filter\030\005 \001(\0132+.goog" - + "le.analytics.data.v1alpha.InListFilterH\001\022F\n" - + "\016numeric_filter\030\006" - + " \001(\0132,.google.analytics.data.v1alpha.NumericFilterH\001\022F\n" - + "\016between_filter\030\007" - + " \001(\0132,.google.analytics.data.v1alpha.BetweenFilterH\001\022T\n" - + "\016filter_scoping\030\010" - + " \001(\0132<.google.analytics.data.v1alpha.SegmentParameterFilterScopingB\017\n\r" + + "string_filter\030\004" + + " \001(\0132+.google.analytics.data.v1alpha.StringFilterH\001\022E\n" + + "\016in_list_filter\030\005" + + " \001(\0132+.google.analytics.data.v1alpha.InListFilterH\001\022F\n" + + "\016numeric_filter\030\006 " + + "\001(\0132,.google.analytics.data.v1alpha.NumericFilterH\001\022F\n" + + "\016between_filter\030\007 \001(\0132,.go" + + "ogle.analytics.data.v1alpha.BetweenFilterH\001\022T\n" + + "\016filter_scoping\030\010 \001(\0132<.google.ana" + + "lytics.data.v1alpha.SegmentParameterFilterScopingB\017\n\r" + "one_parameterB\014\n\n" + "one_filter\"Y\n" + "\035SegmentParameterFilterScoping\022 \n" + "\023in_any_n_day_period\030\001 \001(\003H\000\210\001\001B\026\n" + "\024_in_any_n_day_period\"\262\003\n" + "\026FunnelFilterExpression\022N\n" - + "\tand_group\030\001 \001(\01329" - + ".google.analytics.data.v1alpha.FunnelFilterExpressionListH\000\022M\n" - + "\010or_group\030\002 \001(\01329." - + "google.analytics.data.v1alpha.FunnelFilterExpressionListH\000\022O\n" - + "\016not_expression\030\003 \001" - + "(\01325.google.analytics.data.v1alpha.FunnelFilterExpressionH\000\022O\n" - + "\023funnel_field_filter\030\004" - + " \001(\01320.google.analytics.data.v1alpha.FunnelFieldFilterH\000\022O\n" - + "\023funnel_event_filter\030\005" - + " \001(\01320.google.analytics.data.v1alpha.FunnelEventFilterH\000B\006\n" + + "\tand_group\030\001 \001(\01329.google.analytics.dat" + + "a.v1alpha.FunnelFilterExpressionListH\000\022M\n" + + "\010or_group\030\002" + + " \001(\01329.google.analytics.data.v1alpha.FunnelFilterExpressionListH\000\022O\n" + + "\016not_expression\030\003 \001(\01325.google.analytics" + + ".data.v1alpha.FunnelFilterExpressionH\000\022O\n" + + "\023funnel_field_filter\030\004 \001(\01320.google.ana" + + "lytics.data.v1alpha.FunnelFieldFilterH\000\022O\n" + + "\023funnel_event_filter\030\005 \001(\01320.google.an" + + "alytics.data.v1alpha.FunnelEventFilterH\000B\006\n" + "\004expr\"h\n" + "\032FunnelFilterExpressionList\022J\n" - + "\013expressions\030\001 \003(\013" - + "25.google.analytics.data.v1alpha.FunnelFilterExpression\"\322\002\n" - + "\021FunnelFieldFilter\022\022\n" - + "\n" + + "\013expressions\030\001" + + " \003(\01325.google.analytics.data.v1alpha.FunnelFilterExpression\"\322\002\n" + + "\021FunnelFieldFilter\022\022\n\n" + "field_name\030\001 \001(\t\022D\n\r" - + "string_filter\030\004 \001(\013" - + "2+.google.analytics.data.v1alpha.StringFilterH\000\022E\n" - + "\016in_list_filter\030\005 \001(\0132+.google" - + ".analytics.data.v1alpha.InListFilterH\000\022F\n" - + "\016numeric_filter\030\006" - + " \001(\0132,.google.analytics.data.v1alpha.NumericFilterH\000\022F\n" - + "\016between_filter\030\007" - + " \001(\0132,.google.analytics.data.v1alpha.BetweenFilterH\000B\014\n\n" + + "string_filter\030\004" + + " \001(\0132+.google.analytics.data.v1alpha.StringFilterH\000\022E\n" + + "\016in_list_filter\030\005" + + " \001(\0132+.google.analytics.data.v1alpha.InListFilterH\000\022F\n" + + "\016numeric_filter\030\006 \001(" + + "\0132,.google.analytics.data.v1alpha.NumericFilterH\000\022F\n" + + "\016between_filter\030\007 \001(\0132,.goog" + + "le.analytics.data.v1alpha.BetweenFilterH\000B\014\n\n" + "one_filter\"\323\001\n" - + "\021FunnelEventFilter\022\027\n\n" + + "\021FunnelEventFilter\022\027\n" + + "\n" + "event_name\030\001 \001(\tH\000\210\001\001\022o\n" - + "\"funnel_parameter_filter_expression\030\002" - + " \001(\0132>.google.analytics.data.v1alpha.FunnelParameterFilterExpressionH\001\210\001\001B\r\n" + + "\"funnel_parameter_filter_expression\030\002 \001(\0132>.google.anal" + + "ytics.data.v1alpha.FunnelParameterFilterExpressionH\001\210\001\001B\r\n" + "\013_event_nameB%\n" + "#_funnel_parameter_filter_expression\"\215\003\n" + "\037FunnelParameterFilterExpression\022W\n" - + "\tand_group\030\001 \001(\0132B.google.analy" - + "tics.data.v1alpha.FunnelParameterFilterExpressionListH\000\022V\n" - + "\010or_group\030\002 \001(\0132B.goog" - + "le.analytics.data.v1alpha.FunnelParameterFilterExpressionListH\000\022X\n" - + "\016not_expression\030\003" - + " \001(\0132>.google.analytics.data.v1alpha.FunnelParameterFilterExpressionH\000\022W\n" - + "\027funnel_parameter_filter\030\004 \001(\01324.google.anal" - + "ytics.data.v1alpha.FunnelParameterFilterH\000B\006\n" + + "\tand_group\030\001" + + " \001(\0132B.google.analytics.data.v1alpha.FunnelParameterFilterExpressionListH\000\022V\n" + + "\010or_group\030\002 \001(\0132B.google.analytics.data.v1a" + + "lpha.FunnelParameterFilterExpressionListH\000\022X\n" + + "\016not_expression\030\003 \001(\0132>.google.anal" + + "ytics.data.v1alpha.FunnelParameterFilterExpressionH\000\022W\n" + + "\027funnel_parameter_filter\030\004" + + " \001(\01324.google.analytics.data.v1alpha.FunnelParameterFilterH\000B\006\n" + "\004expr\"z\n" + "#FunnelParameterFilterExpressionList\022S\n" - + "\013expressions\030\001 \003(\0132>.google." - + "analytics.data.v1alpha.FunnelParameterFilterExpression\"\222\003\n" + + "\013expressions\030\001" + + " \003(\0132>.google.analytics.data.v1alpha.FunnelParameterFilterExpression\"\222\003\n" + "\025FunnelParameterFilter\022\036\n" + "\024event_parameter_name\030\001 \001(\tH\000\022\035\n" + "\023item_parameter_name\030\002 \001(\tH\000\022D\n\r" + "string_filter\030\004" + " \001(\0132+.google.analytics.data.v1alpha.StringFilterH\001\022E\n" - + "\016in_list_filter\030\005 \001(\0132+." - + "google.analytics.data.v1alpha.InListFilterH\001\022F\n" + + "\016in_list_filter\030\005" + + " \001(\0132+.google.analytics.data.v1alpha.InListFilterH\001\022F\n" + "\016numeric_filter\030\006" + " \001(\0132,.google.analytics.data.v1alpha.NumericFilterH\001\022F\n" - + "\016between_filter\030\007" - + " \001(\0132,.google.analytics.data.v1alpha.BetweenFilterH\001B\017\n\r" + + "\016between_filter\030\007 \001(\0132" + + ",.google.analytics.data.v1alpha.BetweenFilterH\001B\017\n\r" + "one_parameterB\014\n\n" + "one_filter\"e\n" + "\026FunnelResponseMetadata\022K\n" - + "\022sampling_metadatas\030\001 \003(\0132/.goog" - + "le.analytics.data.v1alpha.SamplingMetadata\"K\n" + + "\022sampling_metadatas\030\001" + + " \003(\0132/.google.analytics.data.v1alpha.SamplingMetadata\"K\n" + "\020SamplingMetadata\022\032\n" + "\022samples_read_count\030\001 \001(\003\022\033\n" + "\023sampling_space_size\030\002 \001(\003\"\337\001\n" + "\016ConversionSpec\022\032\n" + "\022conversion_actions\030\001 \003(\t\022Y\n" - + "\021attribution_model\030\002 \001(\0162>.goog" - + "le.analytics.data.v1alpha.ConversionSpec.AttributionModel\"V\n" + + "\021attribution_model\030\002" + + " \001(\0162>.google.analytics.data.v1alpha.ConversionSpec.AttributionModel\"V\n" + "\020AttributionModel\022!\n" + "\035ATTRIBUTION_MODEL_UNSPECIFIED\020\000\022\017\n" + "\013DATA_DRIVEN\020\001\022\016\n\n" @@ -806,8 +888,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\004type\030\005 \001(\0162).google.analytics.data.v1alpha.MetricType\022\022\n\n" + "expression\030\006 \001(\t\022\031\n" + "\021custom_definition\030\007 \001(\010\022T\n" - + "\017blocked_reasons\030\010 \003(\0162;.google." - + "analytics.data.v1alpha.MetricMetadata.BlockedReason\022\020\n" + + "\017blocked_reas", + "ons\030\010 \003(\0162;.google.analytics.data.v1alpha.MetricMetadata.BlockedReason\022\020\n" + "\010category\030\t \001(\t\0228\n" + "\010sections\030\n" + " \003(\0162&.google.analytics.data.v1alpha.Section\"\\\n\r" @@ -821,7 +903,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\013description\030\003 \001(\t\"E\n" + "\022ConversionMetadata\022\031\n" + "\021conversion_action\030\001 \001(\t\022\024\n" - + "\014display_name\030\002 \001(\t*O\n" + + "\014display_name\030\002 \001(\t\"\234\001\n" + + "\021PropertyChatQuota\022B\n" + + "\016tokens_per_day\030\001 \001(\0132*.go" + + "ogle.analytics.data.v1alpha.QuotaStatus\022C\n" + + "\017tokens_per_hour\030\002 \001(\0132*.google.analytics.data.v1alpha.QuotaStatus*O\n" + "\007Section\022\027\n" + "\023SECTION_UNSPECIFIED\020\000\022\022\n" + "\016SECTION_REPORT\020\001\022\027\n" @@ -866,17 +952,22 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "TYPE_STANDARD\020\010\022\021\n\r" + "TYPE_CURRENCY\020\t\022\r\n" + "\tTYPE_FEET\020\n" - + "\022\016\n", - "\nTYPE_MILES\020\013\022\017\n\013TYPE_METERS\020\014\022\023\n\017TYPE_K" - + "ILOMETERS\020\r*_\n\024RestrictedMetricType\022&\n\"R" - + "ESTRICTED_METRIC_TYPE_UNSPECIFIED\020\000\022\r\n\tC" - + "OST_DATA\020\001\022\020\n\014REVENUE_DATA\020\002*S\n\rSampling" - + "Level\022\036\n\032SAMPLING_LEVEL_UNSPECIFIED\020\000\022\007\n" - + "\003LOW\020\001\022\n\n\006MEDIUM\020\002\022\r\n\tUNSAMPLED\020\003B{\n!com" - + ".google.analytics.data.v1alphaB\021Reportin" - + "gApiProtoP\001ZAgoogle.golang.org/genproto/" - + "googleapis/analytics/data/v1alpha;datab\006" - + "proto3" + + "\022\016\n\n" + + "TYPE_MILES\020\013\022\017\n" + + "\013TYPE_METERS\020\014\022\023\n" + + "\017TYPE_KILOMETERS\020\r" + + "*_\n" + + "\024RestrictedMetricType\022&\n" + + "\"RESTRICTED_METRIC_TYPE_UNSPECIFIED\020\000\022\r\n" + + "\tCOST_DATA\020\001\022\020\n" + + "\014REVENUE_DATA\020\002*S\n\r" + + "SamplingLevel\022\036\n" + + "\032SAMPLING_LEVEL_UNSPECIFIED\020\000\022\007\n" + + "\003LOW\020\001\022\n\n" + + "\006MEDIUM\020\002\022\r\n" + + "\tUNSAMPLED\020\003B{\n" + + "!com.google.analytics.data.v1alphaB\021ReportingApiProtoP\001ZAgoogle.go" + + "lang.org/genproto/googleapis/analytics/data/v1alpha;datab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -1088,6 +1179,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "SubjectToThresholding", "SamplingMetadatas", "Section", + "DataTruncationReasons", }); internal_static_google_analytics_data_v1alpha_ResponseMetaData_SchemaRestrictionResponse_descriptor = internal_static_google_analytics_data_v1alpha_ResponseMetaData_descriptor.getNestedType(0); @@ -1106,6 +1198,26 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "MetricName", "RestrictedMetricTypes", }); + internal_static_google_analytics_data_v1alpha_ResponseMetaData_DataTruncationReason_descriptor = + internal_static_google_analytics_data_v1alpha_ResponseMetaData_descriptor.getNestedType(1); + internal_static_google_analytics_data_v1alpha_ResponseMetaData_DataTruncationReason_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_analytics_data_v1alpha_ResponseMetaData_DataTruncationReason_descriptor, + new java.lang.String[] { + "DataTruncationType", + "DataTruncationMessage", + "DataTruncationDate", + "DataTruncationDateRanges", + }); + internal_static_google_analytics_data_v1alpha_ResponseMetaData_DataTruncationReason_DataTruncationDateRange_descriptor = + internal_static_google_analytics_data_v1alpha_ResponseMetaData_DataTruncationReason_descriptor + .getNestedType(0); + internal_static_google_analytics_data_v1alpha_ResponseMetaData_DataTruncationReason_DataTruncationDateRange_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_analytics_data_v1alpha_ResponseMetaData_DataTruncationReason_DataTruncationDateRange_descriptor, + new java.lang.String[] { + "StartDate", "EndDate", + }); internal_static_google_analytics_data_v1alpha_DimensionHeader_descriptor = getDescriptor().getMessageType(20); internal_static_google_analytics_data_v1alpha_DimensionHeader_fieldAccessorTable = @@ -1207,8 +1319,48 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "DimensionHeaders", "MetricHeaders", "Rows", "Metadata", }); - internal_static_google_analytics_data_v1alpha_UserSegment_descriptor = + internal_static_google_analytics_data_v1alpha_ResponseBlock_descriptor = getDescriptor().getMessageType(32); + internal_static_google_analytics_data_v1alpha_ResponseBlock_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_analytics_data_v1alpha_ResponseBlock_descriptor, + new java.lang.String[] { + "Text", "Table", "Block", + }); + internal_static_google_analytics_data_v1alpha_ResponseBlock_DataTableCell_descriptor = + internal_static_google_analytics_data_v1alpha_ResponseBlock_descriptor.getNestedType(0); + internal_static_google_analytics_data_v1alpha_ResponseBlock_DataTableCell_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_analytics_data_v1alpha_ResponseBlock_DataTableCell_descriptor, + new java.lang.String[] { + "Value", + }); + internal_static_google_analytics_data_v1alpha_ResponseBlock_DataTableHeader_descriptor = + internal_static_google_analytics_data_v1alpha_ResponseBlock_descriptor.getNestedType(1); + internal_static_google_analytics_data_v1alpha_ResponseBlock_DataTableHeader_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_analytics_data_v1alpha_ResponseBlock_DataTableHeader_descriptor, + new java.lang.String[] { + "Header", "DataType", + }); + internal_static_google_analytics_data_v1alpha_ResponseBlock_DataTableRow_descriptor = + internal_static_google_analytics_data_v1alpha_ResponseBlock_descriptor.getNestedType(2); + internal_static_google_analytics_data_v1alpha_ResponseBlock_DataTableRow_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_analytics_data_v1alpha_ResponseBlock_DataTableRow_descriptor, + new java.lang.String[] { + "Columns", + }); + internal_static_google_analytics_data_v1alpha_ResponseBlock_DataTable_descriptor = + internal_static_google_analytics_data_v1alpha_ResponseBlock_descriptor.getNestedType(3); + internal_static_google_analytics_data_v1alpha_ResponseBlock_DataTable_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_analytics_data_v1alpha_ResponseBlock_DataTable_descriptor, + new java.lang.String[] { + "Headers", "Rows", + }); + internal_static_google_analytics_data_v1alpha_UserSegment_descriptor = + getDescriptor().getMessageType(33); internal_static_google_analytics_data_v1alpha_UserSegment_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_analytics_data_v1alpha_UserSegment_descriptor, @@ -1216,7 +1368,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "UserInclusionCriteria", "Exclusion", }); internal_static_google_analytics_data_v1alpha_UserSegmentCriteria_descriptor = - getDescriptor().getMessageType(33); + getDescriptor().getMessageType(34); internal_static_google_analytics_data_v1alpha_UserSegmentCriteria_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_analytics_data_v1alpha_UserSegmentCriteria_descriptor, @@ -1224,7 +1376,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "AndConditionGroups", "AndSequenceGroups", }); internal_static_google_analytics_data_v1alpha_UserSegmentConditionGroup_descriptor = - getDescriptor().getMessageType(34); + getDescriptor().getMessageType(35); internal_static_google_analytics_data_v1alpha_UserSegmentConditionGroup_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_analytics_data_v1alpha_UserSegmentConditionGroup_descriptor, @@ -1232,7 +1384,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ConditionScoping", "SegmentFilterExpression", }); internal_static_google_analytics_data_v1alpha_UserSegmentSequenceGroup_descriptor = - getDescriptor().getMessageType(35); + getDescriptor().getMessageType(36); internal_static_google_analytics_data_v1alpha_UserSegmentSequenceGroup_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_analytics_data_v1alpha_UserSegmentSequenceGroup_descriptor, @@ -1240,7 +1392,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "SequenceScoping", "SequenceMaximumDuration", "UserSequenceSteps", }); internal_static_google_analytics_data_v1alpha_UserSequenceStep_descriptor = - getDescriptor().getMessageType(36); + getDescriptor().getMessageType(37); internal_static_google_analytics_data_v1alpha_UserSequenceStep_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_analytics_data_v1alpha_UserSequenceStep_descriptor, @@ -1248,7 +1400,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "IsDirectlyFollowedBy", "StepScoping", "SegmentFilterExpression", }); internal_static_google_analytics_data_v1alpha_UserSegmentExclusion_descriptor = - getDescriptor().getMessageType(37); + getDescriptor().getMessageType(38); internal_static_google_analytics_data_v1alpha_UserSegmentExclusion_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_analytics_data_v1alpha_UserSegmentExclusion_descriptor, @@ -1256,7 +1408,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "UserExclusionDuration", "UserExclusionCriteria", }); internal_static_google_analytics_data_v1alpha_SessionSegment_descriptor = - getDescriptor().getMessageType(38); + getDescriptor().getMessageType(39); internal_static_google_analytics_data_v1alpha_SessionSegment_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_analytics_data_v1alpha_SessionSegment_descriptor, @@ -1264,7 +1416,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "SessionInclusionCriteria", "Exclusion", }); internal_static_google_analytics_data_v1alpha_SessionSegmentCriteria_descriptor = - getDescriptor().getMessageType(39); + getDescriptor().getMessageType(40); internal_static_google_analytics_data_v1alpha_SessionSegmentCriteria_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_analytics_data_v1alpha_SessionSegmentCriteria_descriptor, @@ -1272,7 +1424,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "AndConditionGroups", }); internal_static_google_analytics_data_v1alpha_SessionSegmentConditionGroup_descriptor = - getDescriptor().getMessageType(40); + getDescriptor().getMessageType(41); internal_static_google_analytics_data_v1alpha_SessionSegmentConditionGroup_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_analytics_data_v1alpha_SessionSegmentConditionGroup_descriptor, @@ -1280,7 +1432,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ConditionScoping", "SegmentFilterExpression", }); internal_static_google_analytics_data_v1alpha_SessionSegmentExclusion_descriptor = - getDescriptor().getMessageType(41); + getDescriptor().getMessageType(42); internal_static_google_analytics_data_v1alpha_SessionSegmentExclusion_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_analytics_data_v1alpha_SessionSegmentExclusion_descriptor, @@ -1288,7 +1440,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "SessionExclusionDuration", "SessionExclusionCriteria", }); internal_static_google_analytics_data_v1alpha_EventSegment_descriptor = - getDescriptor().getMessageType(42); + getDescriptor().getMessageType(43); internal_static_google_analytics_data_v1alpha_EventSegment_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_analytics_data_v1alpha_EventSegment_descriptor, @@ -1296,7 +1448,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "EventInclusionCriteria", "Exclusion", }); internal_static_google_analytics_data_v1alpha_EventSegmentCriteria_descriptor = - getDescriptor().getMessageType(43); + getDescriptor().getMessageType(44); internal_static_google_analytics_data_v1alpha_EventSegmentCriteria_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_analytics_data_v1alpha_EventSegmentCriteria_descriptor, @@ -1304,7 +1456,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "AndConditionGroups", }); internal_static_google_analytics_data_v1alpha_EventSegmentConditionGroup_descriptor = - getDescriptor().getMessageType(44); + getDescriptor().getMessageType(45); internal_static_google_analytics_data_v1alpha_EventSegmentConditionGroup_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_analytics_data_v1alpha_EventSegmentConditionGroup_descriptor, @@ -1312,7 +1464,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ConditionScoping", "SegmentFilterExpression", }); internal_static_google_analytics_data_v1alpha_EventSegmentExclusion_descriptor = - getDescriptor().getMessageType(45); + getDescriptor().getMessageType(46); internal_static_google_analytics_data_v1alpha_EventSegmentExclusion_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_analytics_data_v1alpha_EventSegmentExclusion_descriptor, @@ -1320,7 +1472,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "EventExclusionDuration", "EventExclusionCriteria", }); internal_static_google_analytics_data_v1alpha_Segment_descriptor = - getDescriptor().getMessageType(46); + getDescriptor().getMessageType(47); internal_static_google_analytics_data_v1alpha_Segment_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_analytics_data_v1alpha_Segment_descriptor, @@ -1328,7 +1480,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "UserSegment", "SessionSegment", "EventSegment", "OneSegmentScope", }); internal_static_google_analytics_data_v1alpha_SegmentFilterExpression_descriptor = - getDescriptor().getMessageType(47); + getDescriptor().getMessageType(48); internal_static_google_analytics_data_v1alpha_SegmentFilterExpression_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_analytics_data_v1alpha_SegmentFilterExpression_descriptor, @@ -1336,7 +1488,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "AndGroup", "OrGroup", "NotExpression", "SegmentFilter", "SegmentEventFilter", "Expr", }); internal_static_google_analytics_data_v1alpha_SegmentFilterExpressionList_descriptor = - getDescriptor().getMessageType(48); + getDescriptor().getMessageType(49); internal_static_google_analytics_data_v1alpha_SegmentFilterExpressionList_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_analytics_data_v1alpha_SegmentFilterExpressionList_descriptor, @@ -1344,7 +1496,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Expressions", }); internal_static_google_analytics_data_v1alpha_SegmentFilter_descriptor = - getDescriptor().getMessageType(49); + getDescriptor().getMessageType(50); internal_static_google_analytics_data_v1alpha_SegmentFilter_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_analytics_data_v1alpha_SegmentFilter_descriptor, @@ -1358,7 +1510,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "OneFilter", }); internal_static_google_analytics_data_v1alpha_SegmentFilterScoping_descriptor = - getDescriptor().getMessageType(50); + getDescriptor().getMessageType(51); internal_static_google_analytics_data_v1alpha_SegmentFilterScoping_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_analytics_data_v1alpha_SegmentFilterScoping_descriptor, @@ -1366,7 +1518,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "AtAnyPointInTime", }); internal_static_google_analytics_data_v1alpha_SegmentEventFilter_descriptor = - getDescriptor().getMessageType(51); + getDescriptor().getMessageType(52); internal_static_google_analytics_data_v1alpha_SegmentEventFilter_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_analytics_data_v1alpha_SegmentEventFilter_descriptor, @@ -1374,7 +1526,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "EventName", "SegmentParameterFilterExpression", }); internal_static_google_analytics_data_v1alpha_SegmentParameterFilterExpression_descriptor = - getDescriptor().getMessageType(52); + getDescriptor().getMessageType(53); internal_static_google_analytics_data_v1alpha_SegmentParameterFilterExpression_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_analytics_data_v1alpha_SegmentParameterFilterExpression_descriptor, @@ -1382,7 +1534,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "AndGroup", "OrGroup", "NotExpression", "SegmentParameterFilter", "Expr", }); internal_static_google_analytics_data_v1alpha_SegmentParameterFilterExpressionList_descriptor = - getDescriptor().getMessageType(53); + getDescriptor().getMessageType(54); internal_static_google_analytics_data_v1alpha_SegmentParameterFilterExpressionList_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_analytics_data_v1alpha_SegmentParameterFilterExpressionList_descriptor, @@ -1390,7 +1542,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Expressions", }); internal_static_google_analytics_data_v1alpha_SegmentParameterFilter_descriptor = - getDescriptor().getMessageType(54); + getDescriptor().getMessageType(55); internal_static_google_analytics_data_v1alpha_SegmentParameterFilter_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_analytics_data_v1alpha_SegmentParameterFilter_descriptor, @@ -1406,7 +1558,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "OneFilter", }); internal_static_google_analytics_data_v1alpha_SegmentParameterFilterScoping_descriptor = - getDescriptor().getMessageType(55); + getDescriptor().getMessageType(56); internal_static_google_analytics_data_v1alpha_SegmentParameterFilterScoping_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_analytics_data_v1alpha_SegmentParameterFilterScoping_descriptor, @@ -1414,7 +1566,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "InAnyNDayPeriod", }); internal_static_google_analytics_data_v1alpha_FunnelFilterExpression_descriptor = - getDescriptor().getMessageType(56); + getDescriptor().getMessageType(57); internal_static_google_analytics_data_v1alpha_FunnelFilterExpression_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_analytics_data_v1alpha_FunnelFilterExpression_descriptor, @@ -1427,7 +1579,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Expr", }); internal_static_google_analytics_data_v1alpha_FunnelFilterExpressionList_descriptor = - getDescriptor().getMessageType(57); + getDescriptor().getMessageType(58); internal_static_google_analytics_data_v1alpha_FunnelFilterExpressionList_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_analytics_data_v1alpha_FunnelFilterExpressionList_descriptor, @@ -1435,7 +1587,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Expressions", }); internal_static_google_analytics_data_v1alpha_FunnelFieldFilter_descriptor = - getDescriptor().getMessageType(58); + getDescriptor().getMessageType(59); internal_static_google_analytics_data_v1alpha_FunnelFieldFilter_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_analytics_data_v1alpha_FunnelFieldFilter_descriptor, @@ -1448,7 +1600,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "OneFilter", }); internal_static_google_analytics_data_v1alpha_FunnelEventFilter_descriptor = - getDescriptor().getMessageType(59); + getDescriptor().getMessageType(60); internal_static_google_analytics_data_v1alpha_FunnelEventFilter_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_analytics_data_v1alpha_FunnelEventFilter_descriptor, @@ -1456,7 +1608,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "EventName", "FunnelParameterFilterExpression", }); internal_static_google_analytics_data_v1alpha_FunnelParameterFilterExpression_descriptor = - getDescriptor().getMessageType(60); + getDescriptor().getMessageType(61); internal_static_google_analytics_data_v1alpha_FunnelParameterFilterExpression_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_analytics_data_v1alpha_FunnelParameterFilterExpression_descriptor, @@ -1464,7 +1616,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "AndGroup", "OrGroup", "NotExpression", "FunnelParameterFilter", "Expr", }); internal_static_google_analytics_data_v1alpha_FunnelParameterFilterExpressionList_descriptor = - getDescriptor().getMessageType(61); + getDescriptor().getMessageType(62); internal_static_google_analytics_data_v1alpha_FunnelParameterFilterExpressionList_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_analytics_data_v1alpha_FunnelParameterFilterExpressionList_descriptor, @@ -1472,7 +1624,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Expressions", }); internal_static_google_analytics_data_v1alpha_FunnelParameterFilter_descriptor = - getDescriptor().getMessageType(62); + getDescriptor().getMessageType(63); internal_static_google_analytics_data_v1alpha_FunnelParameterFilter_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_analytics_data_v1alpha_FunnelParameterFilter_descriptor, @@ -1487,7 +1639,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "OneFilter", }); internal_static_google_analytics_data_v1alpha_FunnelResponseMetadata_descriptor = - getDescriptor().getMessageType(63); + getDescriptor().getMessageType(64); internal_static_google_analytics_data_v1alpha_FunnelResponseMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_analytics_data_v1alpha_FunnelResponseMetadata_descriptor, @@ -1495,7 +1647,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "SamplingMetadatas", }); internal_static_google_analytics_data_v1alpha_SamplingMetadata_descriptor = - getDescriptor().getMessageType(64); + getDescriptor().getMessageType(65); internal_static_google_analytics_data_v1alpha_SamplingMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_analytics_data_v1alpha_SamplingMetadata_descriptor, @@ -1503,7 +1655,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "SamplesReadCount", "SamplingSpaceSize", }); internal_static_google_analytics_data_v1alpha_ConversionSpec_descriptor = - getDescriptor().getMessageType(65); + getDescriptor().getMessageType(66); internal_static_google_analytics_data_v1alpha_ConversionSpec_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_analytics_data_v1alpha_ConversionSpec_descriptor, @@ -1511,7 +1663,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ConversionActions", "AttributionModel", }); internal_static_google_analytics_data_v1alpha_DimensionMetadata_descriptor = - getDescriptor().getMessageType(66); + getDescriptor().getMessageType(67); internal_static_google_analytics_data_v1alpha_DimensionMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_analytics_data_v1alpha_DimensionMetadata_descriptor, @@ -1525,7 +1677,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Sections", }); internal_static_google_analytics_data_v1alpha_MetricMetadata_descriptor = - getDescriptor().getMessageType(67); + getDescriptor().getMessageType(68); internal_static_google_analytics_data_v1alpha_MetricMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_analytics_data_v1alpha_MetricMetadata_descriptor, @@ -1542,7 +1694,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Sections", }); internal_static_google_analytics_data_v1alpha_ComparisonMetadata_descriptor = - getDescriptor().getMessageType(68); + getDescriptor().getMessageType(69); internal_static_google_analytics_data_v1alpha_ComparisonMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_analytics_data_v1alpha_ComparisonMetadata_descriptor, @@ -1550,13 +1702,21 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ApiName", "UiName", "Description", }); internal_static_google_analytics_data_v1alpha_ConversionMetadata_descriptor = - getDescriptor().getMessageType(69); + getDescriptor().getMessageType(70); internal_static_google_analytics_data_v1alpha_ConversionMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_analytics_data_v1alpha_ConversionMetadata_descriptor, new java.lang.String[] { "ConversionAction", "DisplayName", }); + internal_static_google_analytics_data_v1alpha_PropertyChatQuota_descriptor = + getDescriptor().getMessageType(71); + internal_static_google_analytics_data_v1alpha_PropertyChatQuota_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_analytics_data_v1alpha_PropertyChatQuota_descriptor, + new java.lang.String[] { + "TokensPerDay", "TokensPerHour", + }); descriptor.resolveAllFeaturesImmutable(); com.google.protobuf.DurationProto.getDescriptor(); } diff --git a/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/ResponseBlock.java b/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/ResponseBlock.java new file mode 100644 index 000000000000..579defab25cc --- /dev/null +++ b/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/ResponseBlock.java @@ -0,0 +1,5132 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/analytics/data/v1alpha/data.proto +// Protobuf Java Version: 4.33.6 + +package com.google.analytics.data.v1alpha; + +/** + * + * + *
+ * One block of structured data in chat response.
+ * 
+ * + * Protobuf type {@code google.analytics.data.v1alpha.ResponseBlock} + */ +@com.google.protobuf.Generated +public final class ResponseBlock extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.analytics.data.v1alpha.ResponseBlock) + ResponseBlockOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ResponseBlock"); + } + + // Use ResponseBlock.newBuilder() to construct. + private ResponseBlock(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ResponseBlock() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1alpha.ReportingApiProto + .internal_static_google_analytics_data_v1alpha_ResponseBlock_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1alpha.ReportingApiProto + .internal_static_google_analytics_data_v1alpha_ResponseBlock_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1alpha.ResponseBlock.class, + com.google.analytics.data.v1alpha.ResponseBlock.Builder.class); + } + + public interface DataTableCellOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.data.v1alpha.ResponseBlock.DataTableCell) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The value of the cell.
+     * 
+ * + * string value = 1; + * + * @return The value. + */ + java.lang.String getValue(); + + /** + * + * + *
+     * The value of the cell.
+     * 
+ * + * string value = 1; + * + * @return The bytes for value. + */ + com.google.protobuf.ByteString getValueBytes(); + } + + /** + * + * + *
+   * A cell in a data table.
+   * 
+ * + * Protobuf type {@code google.analytics.data.v1alpha.ResponseBlock.DataTableCell} + */ + public static final class DataTableCell extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.analytics.data.v1alpha.ResponseBlock.DataTableCell) + DataTableCellOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "DataTableCell"); + } + + // Use DataTableCell.newBuilder() to construct. + private DataTableCell(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DataTableCell() { + value_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1alpha.ReportingApiProto + .internal_static_google_analytics_data_v1alpha_ResponseBlock_DataTableCell_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1alpha.ReportingApiProto + .internal_static_google_analytics_data_v1alpha_ResponseBlock_DataTableCell_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1alpha.ResponseBlock.DataTableCell.class, + com.google.analytics.data.v1alpha.ResponseBlock.DataTableCell.Builder.class); + } + + public static final int VALUE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object value_ = ""; + + /** + * + * + *
+     * The value of the cell.
+     * 
+ * + * string value = 1; + * + * @return The value. + */ + @java.lang.Override + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } + } + + /** + * + * + *
+     * The value of the cell.
+     * 
+ * + * string value = 1; + * + * @return The bytes for value. + */ + @java.lang.Override + public com.google.protobuf.ByteString getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(value_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, value_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(value_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, value_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.data.v1alpha.ResponseBlock.DataTableCell)) { + return super.equals(obj); + } + com.google.analytics.data.v1alpha.ResponseBlock.DataTableCell other = + (com.google.analytics.data.v1alpha.ResponseBlock.DataTableCell) obj; + + if (!getValue().equals(other.getValue())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.data.v1alpha.ResponseBlock.DataTableCell parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1alpha.ResponseBlock.DataTableCell parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1alpha.ResponseBlock.DataTableCell parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1alpha.ResponseBlock.DataTableCell parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1alpha.ResponseBlock.DataTableCell parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1alpha.ResponseBlock.DataTableCell parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1alpha.ResponseBlock.DataTableCell parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1alpha.ResponseBlock.DataTableCell parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1alpha.ResponseBlock.DataTableCell parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1alpha.ResponseBlock.DataTableCell parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1alpha.ResponseBlock.DataTableCell parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1alpha.ResponseBlock.DataTableCell parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.analytics.data.v1alpha.ResponseBlock.DataTableCell prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * A cell in a data table.
+     * 
+ * + * Protobuf type {@code google.analytics.data.v1alpha.ResponseBlock.DataTableCell} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.data.v1alpha.ResponseBlock.DataTableCell) + com.google.analytics.data.v1alpha.ResponseBlock.DataTableCellOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1alpha.ReportingApiProto + .internal_static_google_analytics_data_v1alpha_ResponseBlock_DataTableCell_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1alpha.ReportingApiProto + .internal_static_google_analytics_data_v1alpha_ResponseBlock_DataTableCell_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1alpha.ResponseBlock.DataTableCell.class, + com.google.analytics.data.v1alpha.ResponseBlock.DataTableCell.Builder.class); + } + + // Construct using com.google.analytics.data.v1alpha.ResponseBlock.DataTableCell.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + value_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.data.v1alpha.ReportingApiProto + .internal_static_google_analytics_data_v1alpha_ResponseBlock_DataTableCell_descriptor; + } + + @java.lang.Override + public com.google.analytics.data.v1alpha.ResponseBlock.DataTableCell + getDefaultInstanceForType() { + return com.google.analytics.data.v1alpha.ResponseBlock.DataTableCell.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.data.v1alpha.ResponseBlock.DataTableCell build() { + com.google.analytics.data.v1alpha.ResponseBlock.DataTableCell result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.data.v1alpha.ResponseBlock.DataTableCell buildPartial() { + com.google.analytics.data.v1alpha.ResponseBlock.DataTableCell result = + new com.google.analytics.data.v1alpha.ResponseBlock.DataTableCell(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.analytics.data.v1alpha.ResponseBlock.DataTableCell result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.value_ = value_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.data.v1alpha.ResponseBlock.DataTableCell) { + return mergeFrom((com.google.analytics.data.v1alpha.ResponseBlock.DataTableCell) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.analytics.data.v1alpha.ResponseBlock.DataTableCell other) { + if (other + == com.google.analytics.data.v1alpha.ResponseBlock.DataTableCell.getDefaultInstance()) + return this; + if (!other.getValue().isEmpty()) { + value_ = other.value_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + value_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object value_ = ""; + + /** + * + * + *
+       * The value of the cell.
+       * 
+ * + * string value = 1; + * + * @return The value. + */ + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * The value of the cell.
+       * 
+ * + * string value = 1; + * + * @return The bytes for value. + */ + public com.google.protobuf.ByteString getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * The value of the cell.
+       * 
+ * + * string value = 1; + * + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * The value of the cell.
+       * 
+ * + * string value = 1; + * + * @return This builder for chaining. + */ + public Builder clearValue() { + value_ = getDefaultInstance().getValue(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+       * The value of the cell.
+       * 
+ * + * string value = 1; + * + * @param value The bytes for value to set. + * @return This builder for chaining. + */ + public Builder setValueBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + value_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.analytics.data.v1alpha.ResponseBlock.DataTableCell) + } + + // @@protoc_insertion_point(class_scope:google.analytics.data.v1alpha.ResponseBlock.DataTableCell) + private static final com.google.analytics.data.v1alpha.ResponseBlock.DataTableCell + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.data.v1alpha.ResponseBlock.DataTableCell(); + } + + public static com.google.analytics.data.v1alpha.ResponseBlock.DataTableCell + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DataTableCell parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.data.v1alpha.ResponseBlock.DataTableCell + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface DataTableHeaderOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.data.v1alpha.ResponseBlock.DataTableHeader) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The header name.
+     * 
+ * + * string header = 1; + * + * @return The header. + */ + java.lang.String getHeader(); + + /** + * + * + *
+     * The header name.
+     * 
+ * + * string header = 1; + * + * @return The bytes for header. + */ + com.google.protobuf.ByteString getHeaderBytes(); + + /** + * + * + *
+     * The data type.
+     * 
+ * + * string data_type = 2; + * + * @return The dataType. + */ + java.lang.String getDataType(); + + /** + * + * + *
+     * The data type.
+     * 
+ * + * string data_type = 2; + * + * @return The bytes for dataType. + */ + com.google.protobuf.ByteString getDataTypeBytes(); + } + + /** + * + * + *
+   * Describes a column header in a DataTable.
+   * 
+ * + * Protobuf type {@code google.analytics.data.v1alpha.ResponseBlock.DataTableHeader} + */ + public static final class DataTableHeader extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.analytics.data.v1alpha.ResponseBlock.DataTableHeader) + DataTableHeaderOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "DataTableHeader"); + } + + // Use DataTableHeader.newBuilder() to construct. + private DataTableHeader(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DataTableHeader() { + header_ = ""; + dataType_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1alpha.ReportingApiProto + .internal_static_google_analytics_data_v1alpha_ResponseBlock_DataTableHeader_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1alpha.ReportingApiProto + .internal_static_google_analytics_data_v1alpha_ResponseBlock_DataTableHeader_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeader.class, + com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeader.Builder.class); + } + + public static final int HEADER_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object header_ = ""; + + /** + * + * + *
+     * The header name.
+     * 
+ * + * string header = 1; + * + * @return The header. + */ + @java.lang.Override + public java.lang.String getHeader() { + java.lang.Object ref = header_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + header_ = s; + return s; + } + } + + /** + * + * + *
+     * The header name.
+     * 
+ * + * string header = 1; + * + * @return The bytes for header. + */ + @java.lang.Override + public com.google.protobuf.ByteString getHeaderBytes() { + java.lang.Object ref = header_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + header_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATA_TYPE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object dataType_ = ""; + + /** + * + * + *
+     * The data type.
+     * 
+ * + * string data_type = 2; + * + * @return The dataType. + */ + @java.lang.Override + public java.lang.String getDataType() { + java.lang.Object ref = dataType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataType_ = s; + return s; + } + } + + /** + * + * + *
+     * The data type.
+     * 
+ * + * string data_type = 2; + * + * @return The bytes for dataType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDataTypeBytes() { + java.lang.Object ref = dataType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(header_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, header_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(dataType_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, dataType_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(header_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, header_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(dataType_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, dataType_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeader)) { + return super.equals(obj); + } + com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeader other = + (com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeader) obj; + + if (!getHeader().equals(other.getHeader())) return false; + if (!getDataType().equals(other.getDataType())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + HEADER_FIELD_NUMBER; + hash = (53 * hash) + getHeader().hashCode(); + hash = (37 * hash) + DATA_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getDataType().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeader parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeader parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeader parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeader parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeader parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeader parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeader parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeader parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeader + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeader + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeader parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeader parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeader prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * Describes a column header in a DataTable.
+     * 
+ * + * Protobuf type {@code google.analytics.data.v1alpha.ResponseBlock.DataTableHeader} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.data.v1alpha.ResponseBlock.DataTableHeader) + com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeaderOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1alpha.ReportingApiProto + .internal_static_google_analytics_data_v1alpha_ResponseBlock_DataTableHeader_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1alpha.ReportingApiProto + .internal_static_google_analytics_data_v1alpha_ResponseBlock_DataTableHeader_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeader.class, + com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeader.Builder.class); + } + + // Construct using + // com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeader.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + header_ = ""; + dataType_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.data.v1alpha.ReportingApiProto + .internal_static_google_analytics_data_v1alpha_ResponseBlock_DataTableHeader_descriptor; + } + + @java.lang.Override + public com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeader + getDefaultInstanceForType() { + return com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeader.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeader build() { + com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeader result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeader buildPartial() { + com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeader result = + new com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeader(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeader result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.header_ = header_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.dataType_ = dataType_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeader) { + return mergeFrom((com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeader) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeader other) { + if (other + == com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeader.getDefaultInstance()) + return this; + if (!other.getHeader().isEmpty()) { + header_ = other.header_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDataType().isEmpty()) { + dataType_ = other.dataType_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + header_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + dataType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object header_ = ""; + + /** + * + * + *
+       * The header name.
+       * 
+ * + * string header = 1; + * + * @return The header. + */ + public java.lang.String getHeader() { + java.lang.Object ref = header_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + header_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * The header name.
+       * 
+ * + * string header = 1; + * + * @return The bytes for header. + */ + public com.google.protobuf.ByteString getHeaderBytes() { + java.lang.Object ref = header_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + header_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * The header name.
+       * 
+ * + * string header = 1; + * + * @param value The header to set. + * @return This builder for chaining. + */ + public Builder setHeader(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + header_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * The header name.
+       * 
+ * + * string header = 1; + * + * @return This builder for chaining. + */ + public Builder clearHeader() { + header_ = getDefaultInstance().getHeader(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+       * The header name.
+       * 
+ * + * string header = 1; + * + * @param value The bytes for header to set. + * @return This builder for chaining. + */ + public Builder setHeaderBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + header_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object dataType_ = ""; + + /** + * + * + *
+       * The data type.
+       * 
+ * + * string data_type = 2; + * + * @return The dataType. + */ + public java.lang.String getDataType() { + java.lang.Object ref = dataType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * The data type.
+       * 
+ * + * string data_type = 2; + * + * @return The bytes for dataType. + */ + public com.google.protobuf.ByteString getDataTypeBytes() { + java.lang.Object ref = dataType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * The data type.
+       * 
+ * + * string data_type = 2; + * + * @param value The dataType to set. + * @return This builder for chaining. + */ + public Builder setDataType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + dataType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * The data type.
+       * 
+ * + * string data_type = 2; + * + * @return This builder for chaining. + */ + public Builder clearDataType() { + dataType_ = getDefaultInstance().getDataType(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+       * The data type.
+       * 
+ * + * string data_type = 2; + * + * @param value The bytes for dataType to set. + * @return This builder for chaining. + */ + public Builder setDataTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + dataType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.analytics.data.v1alpha.ResponseBlock.DataTableHeader) + } + + // @@protoc_insertion_point(class_scope:google.analytics.data.v1alpha.ResponseBlock.DataTableHeader) + private static final com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeader + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeader(); + } + + public static com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeader + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DataTableHeader parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeader + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface DataTableRowOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.data.v1alpha.ResponseBlock.DataTableRow) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The cell values in the row.
+     * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableCell columns = 1; + */ + java.util.List getColumnsList(); + + /** + * + * + *
+     * The cell values in the row.
+     * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableCell columns = 1; + */ + com.google.analytics.data.v1alpha.ResponseBlock.DataTableCell getColumns(int index); + + /** + * + * + *
+     * The cell values in the row.
+     * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableCell columns = 1; + */ + int getColumnsCount(); + + /** + * + * + *
+     * The cell values in the row.
+     * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableCell columns = 1; + */ + java.util.List + getColumnsOrBuilderList(); + + /** + * + * + *
+     * The cell values in the row.
+     * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableCell columns = 1; + */ + com.google.analytics.data.v1alpha.ResponseBlock.DataTableCellOrBuilder getColumnsOrBuilder( + int index); + } + + /** + * + * + *
+   * A row in a DataTable.
+   * 
+ * + * Protobuf type {@code google.analytics.data.v1alpha.ResponseBlock.DataTableRow} + */ + public static final class DataTableRow extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.analytics.data.v1alpha.ResponseBlock.DataTableRow) + DataTableRowOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "DataTableRow"); + } + + // Use DataTableRow.newBuilder() to construct. + private DataTableRow(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DataTableRow() { + columns_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1alpha.ReportingApiProto + .internal_static_google_analytics_data_v1alpha_ResponseBlock_DataTableRow_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1alpha.ReportingApiProto + .internal_static_google_analytics_data_v1alpha_ResponseBlock_DataTableRow_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1alpha.ResponseBlock.DataTableRow.class, + com.google.analytics.data.v1alpha.ResponseBlock.DataTableRow.Builder.class); + } + + public static final int COLUMNS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List columns_; + + /** + * + * + *
+     * The cell values in the row.
+     * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableCell columns = 1; + */ + @java.lang.Override + public java.util.List + getColumnsList() { + return columns_; + } + + /** + * + * + *
+     * The cell values in the row.
+     * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableCell columns = 1; + */ + @java.lang.Override + public java.util.List< + ? extends com.google.analytics.data.v1alpha.ResponseBlock.DataTableCellOrBuilder> + getColumnsOrBuilderList() { + return columns_; + } + + /** + * + * + *
+     * The cell values in the row.
+     * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableCell columns = 1; + */ + @java.lang.Override + public int getColumnsCount() { + return columns_.size(); + } + + /** + * + * + *
+     * The cell values in the row.
+     * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableCell columns = 1; + */ + @java.lang.Override + public com.google.analytics.data.v1alpha.ResponseBlock.DataTableCell getColumns(int index) { + return columns_.get(index); + } + + /** + * + * + *
+     * The cell values in the row.
+     * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableCell columns = 1; + */ + @java.lang.Override + public com.google.analytics.data.v1alpha.ResponseBlock.DataTableCellOrBuilder + getColumnsOrBuilder(int index) { + return columns_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < columns_.size(); i++) { + output.writeMessage(1, columns_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < columns_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, columns_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.data.v1alpha.ResponseBlock.DataTableRow)) { + return super.equals(obj); + } + com.google.analytics.data.v1alpha.ResponseBlock.DataTableRow other = + (com.google.analytics.data.v1alpha.ResponseBlock.DataTableRow) obj; + + if (!getColumnsList().equals(other.getColumnsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getColumnsCount() > 0) { + hash = (37 * hash) + COLUMNS_FIELD_NUMBER; + hash = (53 * hash) + getColumnsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.data.v1alpha.ResponseBlock.DataTableRow parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1alpha.ResponseBlock.DataTableRow parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1alpha.ResponseBlock.DataTableRow parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1alpha.ResponseBlock.DataTableRow parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1alpha.ResponseBlock.DataTableRow parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1alpha.ResponseBlock.DataTableRow parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1alpha.ResponseBlock.DataTableRow parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1alpha.ResponseBlock.DataTableRow parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1alpha.ResponseBlock.DataTableRow parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1alpha.ResponseBlock.DataTableRow parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1alpha.ResponseBlock.DataTableRow parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1alpha.ResponseBlock.DataTableRow parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.analytics.data.v1alpha.ResponseBlock.DataTableRow prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * A row in a DataTable.
+     * 
+ * + * Protobuf type {@code google.analytics.data.v1alpha.ResponseBlock.DataTableRow} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.data.v1alpha.ResponseBlock.DataTableRow) + com.google.analytics.data.v1alpha.ResponseBlock.DataTableRowOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1alpha.ReportingApiProto + .internal_static_google_analytics_data_v1alpha_ResponseBlock_DataTableRow_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1alpha.ReportingApiProto + .internal_static_google_analytics_data_v1alpha_ResponseBlock_DataTableRow_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1alpha.ResponseBlock.DataTableRow.class, + com.google.analytics.data.v1alpha.ResponseBlock.DataTableRow.Builder.class); + } + + // Construct using com.google.analytics.data.v1alpha.ResponseBlock.DataTableRow.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (columnsBuilder_ == null) { + columns_ = java.util.Collections.emptyList(); + } else { + columns_ = null; + columnsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.data.v1alpha.ReportingApiProto + .internal_static_google_analytics_data_v1alpha_ResponseBlock_DataTableRow_descriptor; + } + + @java.lang.Override + public com.google.analytics.data.v1alpha.ResponseBlock.DataTableRow + getDefaultInstanceForType() { + return com.google.analytics.data.v1alpha.ResponseBlock.DataTableRow.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.data.v1alpha.ResponseBlock.DataTableRow build() { + com.google.analytics.data.v1alpha.ResponseBlock.DataTableRow result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.data.v1alpha.ResponseBlock.DataTableRow buildPartial() { + com.google.analytics.data.v1alpha.ResponseBlock.DataTableRow result = + new com.google.analytics.data.v1alpha.ResponseBlock.DataTableRow(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.analytics.data.v1alpha.ResponseBlock.DataTableRow result) { + if (columnsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + columns_ = java.util.Collections.unmodifiableList(columns_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.columns_ = columns_; + } else { + result.columns_ = columnsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.analytics.data.v1alpha.ResponseBlock.DataTableRow result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.data.v1alpha.ResponseBlock.DataTableRow) { + return mergeFrom((com.google.analytics.data.v1alpha.ResponseBlock.DataTableRow) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.data.v1alpha.ResponseBlock.DataTableRow other) { + if (other + == com.google.analytics.data.v1alpha.ResponseBlock.DataTableRow.getDefaultInstance()) + return this; + if (columnsBuilder_ == null) { + if (!other.columns_.isEmpty()) { + if (columns_.isEmpty()) { + columns_ = other.columns_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureColumnsIsMutable(); + columns_.addAll(other.columns_); + } + onChanged(); + } + } else { + if (!other.columns_.isEmpty()) { + if (columnsBuilder_.isEmpty()) { + columnsBuilder_.dispose(); + columnsBuilder_ = null; + columns_ = other.columns_; + bitField0_ = (bitField0_ & ~0x00000001); + columnsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetColumnsFieldBuilder() + : null; + } else { + columnsBuilder_.addAllMessages(other.columns_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.analytics.data.v1alpha.ResponseBlock.DataTableCell m = + input.readMessage( + com.google.analytics.data.v1alpha.ResponseBlock.DataTableCell.parser(), + extensionRegistry); + if (columnsBuilder_ == null) { + ensureColumnsIsMutable(); + columns_.add(m); + } else { + columnsBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List + columns_ = java.util.Collections.emptyList(); + + private void ensureColumnsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + columns_ = + new java.util.ArrayList< + com.google.analytics.data.v1alpha.ResponseBlock.DataTableCell>(columns_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.analytics.data.v1alpha.ResponseBlock.DataTableCell, + com.google.analytics.data.v1alpha.ResponseBlock.DataTableCell.Builder, + com.google.analytics.data.v1alpha.ResponseBlock.DataTableCellOrBuilder> + columnsBuilder_; + + /** + * + * + *
+       * The cell values in the row.
+       * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableCell columns = 1; + * + */ + public java.util.List + getColumnsList() { + if (columnsBuilder_ == null) { + return java.util.Collections.unmodifiableList(columns_); + } else { + return columnsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+       * The cell values in the row.
+       * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableCell columns = 1; + * + */ + public int getColumnsCount() { + if (columnsBuilder_ == null) { + return columns_.size(); + } else { + return columnsBuilder_.getCount(); + } + } + + /** + * + * + *
+       * The cell values in the row.
+       * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableCell columns = 1; + * + */ + public com.google.analytics.data.v1alpha.ResponseBlock.DataTableCell getColumns(int index) { + if (columnsBuilder_ == null) { + return columns_.get(index); + } else { + return columnsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+       * The cell values in the row.
+       * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableCell columns = 1; + * + */ + public Builder setColumns( + int index, com.google.analytics.data.v1alpha.ResponseBlock.DataTableCell value) { + if (columnsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureColumnsIsMutable(); + columns_.set(index, value); + onChanged(); + } else { + columnsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+       * The cell values in the row.
+       * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableCell columns = 1; + * + */ + public Builder setColumns( + int index, + com.google.analytics.data.v1alpha.ResponseBlock.DataTableCell.Builder builderForValue) { + if (columnsBuilder_ == null) { + ensureColumnsIsMutable(); + columns_.set(index, builderForValue.build()); + onChanged(); + } else { + columnsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+       * The cell values in the row.
+       * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableCell columns = 1; + * + */ + public Builder addColumns( + com.google.analytics.data.v1alpha.ResponseBlock.DataTableCell value) { + if (columnsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureColumnsIsMutable(); + columns_.add(value); + onChanged(); + } else { + columnsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+       * The cell values in the row.
+       * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableCell columns = 1; + * + */ + public Builder addColumns( + int index, com.google.analytics.data.v1alpha.ResponseBlock.DataTableCell value) { + if (columnsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureColumnsIsMutable(); + columns_.add(index, value); + onChanged(); + } else { + columnsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+       * The cell values in the row.
+       * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableCell columns = 1; + * + */ + public Builder addColumns( + com.google.analytics.data.v1alpha.ResponseBlock.DataTableCell.Builder builderForValue) { + if (columnsBuilder_ == null) { + ensureColumnsIsMutable(); + columns_.add(builderForValue.build()); + onChanged(); + } else { + columnsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+       * The cell values in the row.
+       * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableCell columns = 1; + * + */ + public Builder addColumns( + int index, + com.google.analytics.data.v1alpha.ResponseBlock.DataTableCell.Builder builderForValue) { + if (columnsBuilder_ == null) { + ensureColumnsIsMutable(); + columns_.add(index, builderForValue.build()); + onChanged(); + } else { + columnsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+       * The cell values in the row.
+       * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableCell columns = 1; + * + */ + public Builder addAllColumns( + java.lang.Iterable< + ? extends com.google.analytics.data.v1alpha.ResponseBlock.DataTableCell> + values) { + if (columnsBuilder_ == null) { + ensureColumnsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, columns_); + onChanged(); + } else { + columnsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+       * The cell values in the row.
+       * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableCell columns = 1; + * + */ + public Builder clearColumns() { + if (columnsBuilder_ == null) { + columns_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + columnsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+       * The cell values in the row.
+       * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableCell columns = 1; + * + */ + public Builder removeColumns(int index) { + if (columnsBuilder_ == null) { + ensureColumnsIsMutable(); + columns_.remove(index); + onChanged(); + } else { + columnsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+       * The cell values in the row.
+       * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableCell columns = 1; + * + */ + public com.google.analytics.data.v1alpha.ResponseBlock.DataTableCell.Builder + getColumnsBuilder(int index) { + return internalGetColumnsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+       * The cell values in the row.
+       * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableCell columns = 1; + * + */ + public com.google.analytics.data.v1alpha.ResponseBlock.DataTableCellOrBuilder + getColumnsOrBuilder(int index) { + if (columnsBuilder_ == null) { + return columns_.get(index); + } else { + return columnsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+       * The cell values in the row.
+       * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableCell columns = 1; + * + */ + public java.util.List< + ? extends com.google.analytics.data.v1alpha.ResponseBlock.DataTableCellOrBuilder> + getColumnsOrBuilderList() { + if (columnsBuilder_ != null) { + return columnsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(columns_); + } + } + + /** + * + * + *
+       * The cell values in the row.
+       * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableCell columns = 1; + * + */ + public com.google.analytics.data.v1alpha.ResponseBlock.DataTableCell.Builder + addColumnsBuilder() { + return internalGetColumnsFieldBuilder() + .addBuilder( + com.google.analytics.data.v1alpha.ResponseBlock.DataTableCell.getDefaultInstance()); + } + + /** + * + * + *
+       * The cell values in the row.
+       * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableCell columns = 1; + * + */ + public com.google.analytics.data.v1alpha.ResponseBlock.DataTableCell.Builder + addColumnsBuilder(int index) { + return internalGetColumnsFieldBuilder() + .addBuilder( + index, + com.google.analytics.data.v1alpha.ResponseBlock.DataTableCell.getDefaultInstance()); + } + + /** + * + * + *
+       * The cell values in the row.
+       * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableCell columns = 1; + * + */ + public java.util.List + getColumnsBuilderList() { + return internalGetColumnsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.analytics.data.v1alpha.ResponseBlock.DataTableCell, + com.google.analytics.data.v1alpha.ResponseBlock.DataTableCell.Builder, + com.google.analytics.data.v1alpha.ResponseBlock.DataTableCellOrBuilder> + internalGetColumnsFieldBuilder() { + if (columnsBuilder_ == null) { + columnsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.analytics.data.v1alpha.ResponseBlock.DataTableCell, + com.google.analytics.data.v1alpha.ResponseBlock.DataTableCell.Builder, + com.google.analytics.data.v1alpha.ResponseBlock.DataTableCellOrBuilder>( + columns_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + columns_ = null; + } + return columnsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.analytics.data.v1alpha.ResponseBlock.DataTableRow) + } + + // @@protoc_insertion_point(class_scope:google.analytics.data.v1alpha.ResponseBlock.DataTableRow) + private static final com.google.analytics.data.v1alpha.ResponseBlock.DataTableRow + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.data.v1alpha.ResponseBlock.DataTableRow(); + } + + public static com.google.analytics.data.v1alpha.ResponseBlock.DataTableRow + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DataTableRow parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.data.v1alpha.ResponseBlock.DataTableRow + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface DataTableOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.data.v1alpha.ResponseBlock.DataTable) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Describes dimension columns. The number of headers and ordering of
+     * headers matches the dimensions present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableHeader headers = 1; + * + */ + java.util.List + getHeadersList(); + + /** + * + * + *
+     * Describes dimension columns. The number of headers and ordering of
+     * headers matches the dimensions present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableHeader headers = 1; + * + */ + com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeader getHeaders(int index); + + /** + * + * + *
+     * Describes dimension columns. The number of headers and ordering of
+     * headers matches the dimensions present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableHeader headers = 1; + * + */ + int getHeadersCount(); + + /** + * + * + *
+     * Describes dimension columns. The number of headers and ordering of
+     * headers matches the dimensions present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableHeader headers = 1; + * + */ + java.util.List< + ? extends com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeaderOrBuilder> + getHeadersOrBuilderList(); + + /** + * + * + *
+     * Describes dimension columns. The number of headers and ordering of
+     * headers matches the dimensions present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableHeader headers = 1; + * + */ + com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeaderOrBuilder getHeadersOrBuilder( + int index); + + /** + * + * + *
+     * Rows of dimension value combinations and metric values in the report.
+     * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableRow rows = 2; + */ + java.util.List getRowsList(); + + /** + * + * + *
+     * Rows of dimension value combinations and metric values in the report.
+     * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableRow rows = 2; + */ + com.google.analytics.data.v1alpha.ResponseBlock.DataTableRow getRows(int index); + + /** + * + * + *
+     * Rows of dimension value combinations and metric values in the report.
+     * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableRow rows = 2; + */ + int getRowsCount(); + + /** + * + * + *
+     * Rows of dimension value combinations and metric values in the report.
+     * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableRow rows = 2; + */ + java.util.List + getRowsOrBuilderList(); + + /** + * + * + *
+     * Rows of dimension value combinations and metric values in the report.
+     * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableRow rows = 2; + */ + com.google.analytics.data.v1alpha.ResponseBlock.DataTableRowOrBuilder getRowsOrBuilder( + int index); + } + + /** + * + * + *
+   * A table of data.
+   * 
+ * + * Protobuf type {@code google.analytics.data.v1alpha.ResponseBlock.DataTable} + */ + public static final class DataTable extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.analytics.data.v1alpha.ResponseBlock.DataTable) + DataTableOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "DataTable"); + } + + // Use DataTable.newBuilder() to construct. + private DataTable(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DataTable() { + headers_ = java.util.Collections.emptyList(); + rows_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1alpha.ReportingApiProto + .internal_static_google_analytics_data_v1alpha_ResponseBlock_DataTable_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1alpha.ReportingApiProto + .internal_static_google_analytics_data_v1alpha_ResponseBlock_DataTable_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1alpha.ResponseBlock.DataTable.class, + com.google.analytics.data.v1alpha.ResponseBlock.DataTable.Builder.class); + } + + public static final int HEADERS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List + headers_; + + /** + * + * + *
+     * Describes dimension columns. The number of headers and ordering of
+     * headers matches the dimensions present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableHeader headers = 1; + * + */ + @java.lang.Override + public java.util.List + getHeadersList() { + return headers_; + } + + /** + * + * + *
+     * Describes dimension columns. The number of headers and ordering of
+     * headers matches the dimensions present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableHeader headers = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeaderOrBuilder> + getHeadersOrBuilderList() { + return headers_; + } + + /** + * + * + *
+     * Describes dimension columns. The number of headers and ordering of
+     * headers matches the dimensions present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableHeader headers = 1; + * + */ + @java.lang.Override + public int getHeadersCount() { + return headers_.size(); + } + + /** + * + * + *
+     * Describes dimension columns. The number of headers and ordering of
+     * headers matches the dimensions present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableHeader headers = 1; + * + */ + @java.lang.Override + public com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeader getHeaders(int index) { + return headers_.get(index); + } + + /** + * + * + *
+     * Describes dimension columns. The number of headers and ordering of
+     * headers matches the dimensions present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableHeader headers = 1; + * + */ + @java.lang.Override + public com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeaderOrBuilder + getHeadersOrBuilder(int index) { + return headers_.get(index); + } + + public static final int ROWS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List rows_; + + /** + * + * + *
+     * Rows of dimension value combinations and metric values in the report.
+     * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableRow rows = 2; + */ + @java.lang.Override + public java.util.List + getRowsList() { + return rows_; + } + + /** + * + * + *
+     * Rows of dimension value combinations and metric values in the report.
+     * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableRow rows = 2; + */ + @java.lang.Override + public java.util.List< + ? extends com.google.analytics.data.v1alpha.ResponseBlock.DataTableRowOrBuilder> + getRowsOrBuilderList() { + return rows_; + } + + /** + * + * + *
+     * Rows of dimension value combinations and metric values in the report.
+     * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableRow rows = 2; + */ + @java.lang.Override + public int getRowsCount() { + return rows_.size(); + } + + /** + * + * + *
+     * Rows of dimension value combinations and metric values in the report.
+     * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableRow rows = 2; + */ + @java.lang.Override + public com.google.analytics.data.v1alpha.ResponseBlock.DataTableRow getRows(int index) { + return rows_.get(index); + } + + /** + * + * + *
+     * Rows of dimension value combinations and metric values in the report.
+     * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableRow rows = 2; + */ + @java.lang.Override + public com.google.analytics.data.v1alpha.ResponseBlock.DataTableRowOrBuilder getRowsOrBuilder( + int index) { + return rows_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < headers_.size(); i++) { + output.writeMessage(1, headers_.get(i)); + } + for (int i = 0; i < rows_.size(); i++) { + output.writeMessage(2, rows_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < headers_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, headers_.get(i)); + } + for (int i = 0; i < rows_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, rows_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.data.v1alpha.ResponseBlock.DataTable)) { + return super.equals(obj); + } + com.google.analytics.data.v1alpha.ResponseBlock.DataTable other = + (com.google.analytics.data.v1alpha.ResponseBlock.DataTable) obj; + + if (!getHeadersList().equals(other.getHeadersList())) return false; + if (!getRowsList().equals(other.getRowsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getHeadersCount() > 0) { + hash = (37 * hash) + HEADERS_FIELD_NUMBER; + hash = (53 * hash) + getHeadersList().hashCode(); + } + if (getRowsCount() > 0) { + hash = (37 * hash) + ROWS_FIELD_NUMBER; + hash = (53 * hash) + getRowsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.data.v1alpha.ResponseBlock.DataTable parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1alpha.ResponseBlock.DataTable parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1alpha.ResponseBlock.DataTable parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1alpha.ResponseBlock.DataTable parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1alpha.ResponseBlock.DataTable parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1alpha.ResponseBlock.DataTable parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1alpha.ResponseBlock.DataTable parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1alpha.ResponseBlock.DataTable parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1alpha.ResponseBlock.DataTable parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1alpha.ResponseBlock.DataTable parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1alpha.ResponseBlock.DataTable parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1alpha.ResponseBlock.DataTable parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.analytics.data.v1alpha.ResponseBlock.DataTable prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * A table of data.
+     * 
+ * + * Protobuf type {@code google.analytics.data.v1alpha.ResponseBlock.DataTable} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.data.v1alpha.ResponseBlock.DataTable) + com.google.analytics.data.v1alpha.ResponseBlock.DataTableOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1alpha.ReportingApiProto + .internal_static_google_analytics_data_v1alpha_ResponseBlock_DataTable_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1alpha.ReportingApiProto + .internal_static_google_analytics_data_v1alpha_ResponseBlock_DataTable_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1alpha.ResponseBlock.DataTable.class, + com.google.analytics.data.v1alpha.ResponseBlock.DataTable.Builder.class); + } + + // Construct using com.google.analytics.data.v1alpha.ResponseBlock.DataTable.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (headersBuilder_ == null) { + headers_ = java.util.Collections.emptyList(); + } else { + headers_ = null; + headersBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + if (rowsBuilder_ == null) { + rows_ = java.util.Collections.emptyList(); + } else { + rows_ = null; + rowsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.data.v1alpha.ReportingApiProto + .internal_static_google_analytics_data_v1alpha_ResponseBlock_DataTable_descriptor; + } + + @java.lang.Override + public com.google.analytics.data.v1alpha.ResponseBlock.DataTable getDefaultInstanceForType() { + return com.google.analytics.data.v1alpha.ResponseBlock.DataTable.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.data.v1alpha.ResponseBlock.DataTable build() { + com.google.analytics.data.v1alpha.ResponseBlock.DataTable result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.data.v1alpha.ResponseBlock.DataTable buildPartial() { + com.google.analytics.data.v1alpha.ResponseBlock.DataTable result = + new com.google.analytics.data.v1alpha.ResponseBlock.DataTable(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.analytics.data.v1alpha.ResponseBlock.DataTable result) { + if (headersBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + headers_ = java.util.Collections.unmodifiableList(headers_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.headers_ = headers_; + } else { + result.headers_ = headersBuilder_.build(); + } + if (rowsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + rows_ = java.util.Collections.unmodifiableList(rows_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.rows_ = rows_; + } else { + result.rows_ = rowsBuilder_.build(); + } + } + + private void buildPartial0(com.google.analytics.data.v1alpha.ResponseBlock.DataTable result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.data.v1alpha.ResponseBlock.DataTable) { + return mergeFrom((com.google.analytics.data.v1alpha.ResponseBlock.DataTable) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.data.v1alpha.ResponseBlock.DataTable other) { + if (other == com.google.analytics.data.v1alpha.ResponseBlock.DataTable.getDefaultInstance()) + return this; + if (headersBuilder_ == null) { + if (!other.headers_.isEmpty()) { + if (headers_.isEmpty()) { + headers_ = other.headers_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureHeadersIsMutable(); + headers_.addAll(other.headers_); + } + onChanged(); + } + } else { + if (!other.headers_.isEmpty()) { + if (headersBuilder_.isEmpty()) { + headersBuilder_.dispose(); + headersBuilder_ = null; + headers_ = other.headers_; + bitField0_ = (bitField0_ & ~0x00000001); + headersBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetHeadersFieldBuilder() + : null; + } else { + headersBuilder_.addAllMessages(other.headers_); + } + } + } + if (rowsBuilder_ == null) { + if (!other.rows_.isEmpty()) { + if (rows_.isEmpty()) { + rows_ = other.rows_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureRowsIsMutable(); + rows_.addAll(other.rows_); + } + onChanged(); + } + } else { + if (!other.rows_.isEmpty()) { + if (rowsBuilder_.isEmpty()) { + rowsBuilder_.dispose(); + rowsBuilder_ = null; + rows_ = other.rows_; + bitField0_ = (bitField0_ & ~0x00000002); + rowsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetRowsFieldBuilder() + : null; + } else { + rowsBuilder_.addAllMessages(other.rows_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeader m = + input.readMessage( + com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeader.parser(), + extensionRegistry); + if (headersBuilder_ == null) { + ensureHeadersIsMutable(); + headers_.add(m); + } else { + headersBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + com.google.analytics.data.v1alpha.ResponseBlock.DataTableRow m = + input.readMessage( + com.google.analytics.data.v1alpha.ResponseBlock.DataTableRow.parser(), + extensionRegistry); + if (rowsBuilder_ == null) { + ensureRowsIsMutable(); + rows_.add(m); + } else { + rowsBuilder_.addMessage(m); + } + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List + headers_ = java.util.Collections.emptyList(); + + private void ensureHeadersIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + headers_ = + new java.util.ArrayList< + com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeader>(headers_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeader, + com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeader.Builder, + com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeaderOrBuilder> + headersBuilder_; + + /** + * + * + *
+       * Describes dimension columns. The number of headers and ordering of
+       * headers matches the dimensions present in rows.
+       * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableHeader headers = 1; + * + */ + public java.util.List + getHeadersList() { + if (headersBuilder_ == null) { + return java.util.Collections.unmodifiableList(headers_); + } else { + return headersBuilder_.getMessageList(); + } + } + + /** + * + * + *
+       * Describes dimension columns. The number of headers and ordering of
+       * headers matches the dimensions present in rows.
+       * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableHeader headers = 1; + * + */ + public int getHeadersCount() { + if (headersBuilder_ == null) { + return headers_.size(); + } else { + return headersBuilder_.getCount(); + } + } + + /** + * + * + *
+       * Describes dimension columns. The number of headers and ordering of
+       * headers matches the dimensions present in rows.
+       * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableHeader headers = 1; + * + */ + public com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeader getHeaders(int index) { + if (headersBuilder_ == null) { + return headers_.get(index); + } else { + return headersBuilder_.getMessage(index); + } + } + + /** + * + * + *
+       * Describes dimension columns. The number of headers and ordering of
+       * headers matches the dimensions present in rows.
+       * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableHeader headers = 1; + * + */ + public Builder setHeaders( + int index, com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeader value) { + if (headersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHeadersIsMutable(); + headers_.set(index, value); + onChanged(); + } else { + headersBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+       * Describes dimension columns. The number of headers and ordering of
+       * headers matches the dimensions present in rows.
+       * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableHeader headers = 1; + * + */ + public Builder setHeaders( + int index, + com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeader.Builder builderForValue) { + if (headersBuilder_ == null) { + ensureHeadersIsMutable(); + headers_.set(index, builderForValue.build()); + onChanged(); + } else { + headersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+       * Describes dimension columns. The number of headers and ordering of
+       * headers matches the dimensions present in rows.
+       * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableHeader headers = 1; + * + */ + public Builder addHeaders( + com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeader value) { + if (headersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHeadersIsMutable(); + headers_.add(value); + onChanged(); + } else { + headersBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+       * Describes dimension columns. The number of headers and ordering of
+       * headers matches the dimensions present in rows.
+       * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableHeader headers = 1; + * + */ + public Builder addHeaders( + int index, com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeader value) { + if (headersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHeadersIsMutable(); + headers_.add(index, value); + onChanged(); + } else { + headersBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+       * Describes dimension columns. The number of headers and ordering of
+       * headers matches the dimensions present in rows.
+       * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableHeader headers = 1; + * + */ + public Builder addHeaders( + com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeader.Builder builderForValue) { + if (headersBuilder_ == null) { + ensureHeadersIsMutable(); + headers_.add(builderForValue.build()); + onChanged(); + } else { + headersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+       * Describes dimension columns. The number of headers and ordering of
+       * headers matches the dimensions present in rows.
+       * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableHeader headers = 1; + * + */ + public Builder addHeaders( + int index, + com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeader.Builder builderForValue) { + if (headersBuilder_ == null) { + ensureHeadersIsMutable(); + headers_.add(index, builderForValue.build()); + onChanged(); + } else { + headersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+       * Describes dimension columns. The number of headers and ordering of
+       * headers matches the dimensions present in rows.
+       * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableHeader headers = 1; + * + */ + public Builder addAllHeaders( + java.lang.Iterable< + ? extends com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeader> + values) { + if (headersBuilder_ == null) { + ensureHeadersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, headers_); + onChanged(); + } else { + headersBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+       * Describes dimension columns. The number of headers and ordering of
+       * headers matches the dimensions present in rows.
+       * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableHeader headers = 1; + * + */ + public Builder clearHeaders() { + if (headersBuilder_ == null) { + headers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + headersBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+       * Describes dimension columns. The number of headers and ordering of
+       * headers matches the dimensions present in rows.
+       * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableHeader headers = 1; + * + */ + public Builder removeHeaders(int index) { + if (headersBuilder_ == null) { + ensureHeadersIsMutable(); + headers_.remove(index); + onChanged(); + } else { + headersBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+       * Describes dimension columns. The number of headers and ordering of
+       * headers matches the dimensions present in rows.
+       * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableHeader headers = 1; + * + */ + public com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeader.Builder + getHeadersBuilder(int index) { + return internalGetHeadersFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+       * Describes dimension columns. The number of headers and ordering of
+       * headers matches the dimensions present in rows.
+       * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableHeader headers = 1; + * + */ + public com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeaderOrBuilder + getHeadersOrBuilder(int index) { + if (headersBuilder_ == null) { + return headers_.get(index); + } else { + return headersBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+       * Describes dimension columns. The number of headers and ordering of
+       * headers matches the dimensions present in rows.
+       * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableHeader headers = 1; + * + */ + public java.util.List< + ? extends com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeaderOrBuilder> + getHeadersOrBuilderList() { + if (headersBuilder_ != null) { + return headersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(headers_); + } + } + + /** + * + * + *
+       * Describes dimension columns. The number of headers and ordering of
+       * headers matches the dimensions present in rows.
+       * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableHeader headers = 1; + * + */ + public com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeader.Builder + addHeadersBuilder() { + return internalGetHeadersFieldBuilder() + .addBuilder( + com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeader + .getDefaultInstance()); + } + + /** + * + * + *
+       * Describes dimension columns. The number of headers and ordering of
+       * headers matches the dimensions present in rows.
+       * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableHeader headers = 1; + * + */ + public com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeader.Builder + addHeadersBuilder(int index) { + return internalGetHeadersFieldBuilder() + .addBuilder( + index, + com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeader + .getDefaultInstance()); + } + + /** + * + * + *
+       * Describes dimension columns. The number of headers and ordering of
+       * headers matches the dimensions present in rows.
+       * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableHeader headers = 1; + * + */ + public java.util.List + getHeadersBuilderList() { + return internalGetHeadersFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeader, + com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeader.Builder, + com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeaderOrBuilder> + internalGetHeadersFieldBuilder() { + if (headersBuilder_ == null) { + headersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeader, + com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeader.Builder, + com.google.analytics.data.v1alpha.ResponseBlock.DataTableHeaderOrBuilder>( + headers_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + headers_ = null; + } + return headersBuilder_; + } + + private java.util.List rows_ = + java.util.Collections.emptyList(); + + private void ensureRowsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + rows_ = + new java.util.ArrayList( + rows_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.analytics.data.v1alpha.ResponseBlock.DataTableRow, + com.google.analytics.data.v1alpha.ResponseBlock.DataTableRow.Builder, + com.google.analytics.data.v1alpha.ResponseBlock.DataTableRowOrBuilder> + rowsBuilder_; + + /** + * + * + *
+       * Rows of dimension value combinations and metric values in the report.
+       * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableRow rows = 2; + */ + public java.util.List + getRowsList() { + if (rowsBuilder_ == null) { + return java.util.Collections.unmodifiableList(rows_); + } else { + return rowsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+       * Rows of dimension value combinations and metric values in the report.
+       * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableRow rows = 2; + */ + public int getRowsCount() { + if (rowsBuilder_ == null) { + return rows_.size(); + } else { + return rowsBuilder_.getCount(); + } + } + + /** + * + * + *
+       * Rows of dimension value combinations and metric values in the report.
+       * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableRow rows = 2; + */ + public com.google.analytics.data.v1alpha.ResponseBlock.DataTableRow getRows(int index) { + if (rowsBuilder_ == null) { + return rows_.get(index); + } else { + return rowsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+       * Rows of dimension value combinations and metric values in the report.
+       * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableRow rows = 2; + */ + public Builder setRows( + int index, com.google.analytics.data.v1alpha.ResponseBlock.DataTableRow value) { + if (rowsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRowsIsMutable(); + rows_.set(index, value); + onChanged(); + } else { + rowsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+       * Rows of dimension value combinations and metric values in the report.
+       * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableRow rows = 2; + */ + public Builder setRows( + int index, + com.google.analytics.data.v1alpha.ResponseBlock.DataTableRow.Builder builderForValue) { + if (rowsBuilder_ == null) { + ensureRowsIsMutable(); + rows_.set(index, builderForValue.build()); + onChanged(); + } else { + rowsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+       * Rows of dimension value combinations and metric values in the report.
+       * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableRow rows = 2; + */ + public Builder addRows(com.google.analytics.data.v1alpha.ResponseBlock.DataTableRow value) { + if (rowsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRowsIsMutable(); + rows_.add(value); + onChanged(); + } else { + rowsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+       * Rows of dimension value combinations and metric values in the report.
+       * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableRow rows = 2; + */ + public Builder addRows( + int index, com.google.analytics.data.v1alpha.ResponseBlock.DataTableRow value) { + if (rowsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRowsIsMutable(); + rows_.add(index, value); + onChanged(); + } else { + rowsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+       * Rows of dimension value combinations and metric values in the report.
+       * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableRow rows = 2; + */ + public Builder addRows( + com.google.analytics.data.v1alpha.ResponseBlock.DataTableRow.Builder builderForValue) { + if (rowsBuilder_ == null) { + ensureRowsIsMutable(); + rows_.add(builderForValue.build()); + onChanged(); + } else { + rowsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+       * Rows of dimension value combinations and metric values in the report.
+       * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableRow rows = 2; + */ + public Builder addRows( + int index, + com.google.analytics.data.v1alpha.ResponseBlock.DataTableRow.Builder builderForValue) { + if (rowsBuilder_ == null) { + ensureRowsIsMutable(); + rows_.add(index, builderForValue.build()); + onChanged(); + } else { + rowsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+       * Rows of dimension value combinations and metric values in the report.
+       * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableRow rows = 2; + */ + public Builder addAllRows( + java.lang.Iterable + values) { + if (rowsBuilder_ == null) { + ensureRowsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, rows_); + onChanged(); + } else { + rowsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+       * Rows of dimension value combinations and metric values in the report.
+       * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableRow rows = 2; + */ + public Builder clearRows() { + if (rowsBuilder_ == null) { + rows_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + rowsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+       * Rows of dimension value combinations and metric values in the report.
+       * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableRow rows = 2; + */ + public Builder removeRows(int index) { + if (rowsBuilder_ == null) { + ensureRowsIsMutable(); + rows_.remove(index); + onChanged(); + } else { + rowsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+       * Rows of dimension value combinations and metric values in the report.
+       * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableRow rows = 2; + */ + public com.google.analytics.data.v1alpha.ResponseBlock.DataTableRow.Builder getRowsBuilder( + int index) { + return internalGetRowsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+       * Rows of dimension value combinations and metric values in the report.
+       * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableRow rows = 2; + */ + public com.google.analytics.data.v1alpha.ResponseBlock.DataTableRowOrBuilder getRowsOrBuilder( + int index) { + if (rowsBuilder_ == null) { + return rows_.get(index); + } else { + return rowsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+       * Rows of dimension value combinations and metric values in the report.
+       * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableRow rows = 2; + */ + public java.util.List< + ? extends com.google.analytics.data.v1alpha.ResponseBlock.DataTableRowOrBuilder> + getRowsOrBuilderList() { + if (rowsBuilder_ != null) { + return rowsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(rows_); + } + } + + /** + * + * + *
+       * Rows of dimension value combinations and metric values in the report.
+       * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableRow rows = 2; + */ + public com.google.analytics.data.v1alpha.ResponseBlock.DataTableRow.Builder addRowsBuilder() { + return internalGetRowsFieldBuilder() + .addBuilder( + com.google.analytics.data.v1alpha.ResponseBlock.DataTableRow.getDefaultInstance()); + } + + /** + * + * + *
+       * Rows of dimension value combinations and metric values in the report.
+       * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableRow rows = 2; + */ + public com.google.analytics.data.v1alpha.ResponseBlock.DataTableRow.Builder addRowsBuilder( + int index) { + return internalGetRowsFieldBuilder() + .addBuilder( + index, + com.google.analytics.data.v1alpha.ResponseBlock.DataTableRow.getDefaultInstance()); + } + + /** + * + * + *
+       * Rows of dimension value combinations and metric values in the report.
+       * 
+ * + * repeated .google.analytics.data.v1alpha.ResponseBlock.DataTableRow rows = 2; + */ + public java.util.List + getRowsBuilderList() { + return internalGetRowsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.analytics.data.v1alpha.ResponseBlock.DataTableRow, + com.google.analytics.data.v1alpha.ResponseBlock.DataTableRow.Builder, + com.google.analytics.data.v1alpha.ResponseBlock.DataTableRowOrBuilder> + internalGetRowsFieldBuilder() { + if (rowsBuilder_ == null) { + rowsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.analytics.data.v1alpha.ResponseBlock.DataTableRow, + com.google.analytics.data.v1alpha.ResponseBlock.DataTableRow.Builder, + com.google.analytics.data.v1alpha.ResponseBlock.DataTableRowOrBuilder>( + rows_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + rows_ = null; + } + return rowsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.analytics.data.v1alpha.ResponseBlock.DataTable) + } + + // @@protoc_insertion_point(class_scope:google.analytics.data.v1alpha.ResponseBlock.DataTable) + private static final com.google.analytics.data.v1alpha.ResponseBlock.DataTable DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.data.v1alpha.ResponseBlock.DataTable(); + } + + public static com.google.analytics.data.v1alpha.ResponseBlock.DataTable getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DataTable parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.data.v1alpha.ResponseBlock.DataTable getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int blockCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object block_; + + public enum BlockCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + TEXT(1), + TABLE(2), + BLOCK_NOT_SET(0); + private final int value; + + private BlockCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static BlockCase valueOf(int value) { + return forNumber(value); + } + + public static BlockCase forNumber(int value) { + switch (value) { + case 1: + return TEXT; + case 2: + return TABLE; + case 0: + return BLOCK_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public BlockCase getBlockCase() { + return BlockCase.forNumber(blockCase_); + } + + public static final int TEXT_FIELD_NUMBER = 1; + + /** + * + * + *
+   * A block of text.
+   * 
+ * + * string text = 1; + * + * @return Whether the text field is set. + */ + public boolean hasText() { + return blockCase_ == 1; + } + + /** + * + * + *
+   * A block of text.
+   * 
+ * + * string text = 1; + * + * @return The text. + */ + public java.lang.String getText() { + java.lang.Object ref = ""; + if (blockCase_ == 1) { + ref = block_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (blockCase_ == 1) { + block_ = s; + } + return s; + } + } + + /** + * + * + *
+   * A block of text.
+   * 
+ * + * string text = 1; + * + * @return The bytes for text. + */ + public com.google.protobuf.ByteString getTextBytes() { + java.lang.Object ref = ""; + if (blockCase_ == 1) { + ref = block_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (blockCase_ == 1) { + block_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TABLE_FIELD_NUMBER = 2; + + /** + * + * + *
+   * A block of table data.
+   * 
+ * + * .google.analytics.data.v1alpha.ResponseBlock.DataTable table = 2; + * + * @return Whether the table field is set. + */ + @java.lang.Override + public boolean hasTable() { + return blockCase_ == 2; + } + + /** + * + * + *
+   * A block of table data.
+   * 
+ * + * .google.analytics.data.v1alpha.ResponseBlock.DataTable table = 2; + * + * @return The table. + */ + @java.lang.Override + public com.google.analytics.data.v1alpha.ResponseBlock.DataTable getTable() { + if (blockCase_ == 2) { + return (com.google.analytics.data.v1alpha.ResponseBlock.DataTable) block_; + } + return com.google.analytics.data.v1alpha.ResponseBlock.DataTable.getDefaultInstance(); + } + + /** + * + * + *
+   * A block of table data.
+   * 
+ * + * .google.analytics.data.v1alpha.ResponseBlock.DataTable table = 2; + */ + @java.lang.Override + public com.google.analytics.data.v1alpha.ResponseBlock.DataTableOrBuilder getTableOrBuilder() { + if (blockCase_ == 2) { + return (com.google.analytics.data.v1alpha.ResponseBlock.DataTable) block_; + } + return com.google.analytics.data.v1alpha.ResponseBlock.DataTable.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (blockCase_ == 1) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, block_); + } + if (blockCase_ == 2) { + output.writeMessage(2, (com.google.analytics.data.v1alpha.ResponseBlock.DataTable) block_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (blockCase_ == 1) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, block_); + } + if (blockCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.analytics.data.v1alpha.ResponseBlock.DataTable) block_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.data.v1alpha.ResponseBlock)) { + return super.equals(obj); + } + com.google.analytics.data.v1alpha.ResponseBlock other = + (com.google.analytics.data.v1alpha.ResponseBlock) obj; + + if (!getBlockCase().equals(other.getBlockCase())) return false; + switch (blockCase_) { + case 1: + if (!getText().equals(other.getText())) return false; + break; + case 2: + if (!getTable().equals(other.getTable())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (blockCase_) { + case 1: + hash = (37 * hash) + TEXT_FIELD_NUMBER; + hash = (53 * hash) + getText().hashCode(); + break; + case 2: + hash = (37 * hash) + TABLE_FIELD_NUMBER; + hash = (53 * hash) + getTable().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.data.v1alpha.ResponseBlock parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1alpha.ResponseBlock parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1alpha.ResponseBlock parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1alpha.ResponseBlock parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1alpha.ResponseBlock parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1alpha.ResponseBlock parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1alpha.ResponseBlock parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1alpha.ResponseBlock parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1alpha.ResponseBlock parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1alpha.ResponseBlock parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1alpha.ResponseBlock parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1alpha.ResponseBlock parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.analytics.data.v1alpha.ResponseBlock prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * One block of structured data in chat response.
+   * 
+ * + * Protobuf type {@code google.analytics.data.v1alpha.ResponseBlock} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.data.v1alpha.ResponseBlock) + com.google.analytics.data.v1alpha.ResponseBlockOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1alpha.ReportingApiProto + .internal_static_google_analytics_data_v1alpha_ResponseBlock_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1alpha.ReportingApiProto + .internal_static_google_analytics_data_v1alpha_ResponseBlock_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1alpha.ResponseBlock.class, + com.google.analytics.data.v1alpha.ResponseBlock.Builder.class); + } + + // Construct using com.google.analytics.data.v1alpha.ResponseBlock.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (tableBuilder_ != null) { + tableBuilder_.clear(); + } + blockCase_ = 0; + block_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.data.v1alpha.ReportingApiProto + .internal_static_google_analytics_data_v1alpha_ResponseBlock_descriptor; + } + + @java.lang.Override + public com.google.analytics.data.v1alpha.ResponseBlock getDefaultInstanceForType() { + return com.google.analytics.data.v1alpha.ResponseBlock.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.data.v1alpha.ResponseBlock build() { + com.google.analytics.data.v1alpha.ResponseBlock result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.data.v1alpha.ResponseBlock buildPartial() { + com.google.analytics.data.v1alpha.ResponseBlock result = + new com.google.analytics.data.v1alpha.ResponseBlock(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.analytics.data.v1alpha.ResponseBlock result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.analytics.data.v1alpha.ResponseBlock result) { + result.blockCase_ = blockCase_; + result.block_ = this.block_; + if (blockCase_ == 2 && tableBuilder_ != null) { + result.block_ = tableBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.data.v1alpha.ResponseBlock) { + return mergeFrom((com.google.analytics.data.v1alpha.ResponseBlock) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.data.v1alpha.ResponseBlock other) { + if (other == com.google.analytics.data.v1alpha.ResponseBlock.getDefaultInstance()) + return this; + switch (other.getBlockCase()) { + case TEXT: + { + blockCase_ = 1; + block_ = other.block_; + onChanged(); + break; + } + case TABLE: + { + mergeTable(other.getTable()); + break; + } + case BLOCK_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + blockCase_ = 1; + block_ = s; + break; + } // case 10 + case 18: + { + input.readMessage(internalGetTableFieldBuilder().getBuilder(), extensionRegistry); + blockCase_ = 2; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int blockCase_ = 0; + private java.lang.Object block_; + + public BlockCase getBlockCase() { + return BlockCase.forNumber(blockCase_); + } + + public Builder clearBlock() { + blockCase_ = 0; + block_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+     * A block of text.
+     * 
+ * + * string text = 1; + * + * @return Whether the text field is set. + */ + @java.lang.Override + public boolean hasText() { + return blockCase_ == 1; + } + + /** + * + * + *
+     * A block of text.
+     * 
+ * + * string text = 1; + * + * @return The text. + */ + @java.lang.Override + public java.lang.String getText() { + java.lang.Object ref = ""; + if (blockCase_ == 1) { + ref = block_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (blockCase_ == 1) { + block_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * A block of text.
+     * 
+ * + * string text = 1; + * + * @return The bytes for text. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTextBytes() { + java.lang.Object ref = ""; + if (blockCase_ == 1) { + ref = block_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (blockCase_ == 1) { + block_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * A block of text.
+     * 
+ * + * string text = 1; + * + * @param value The text to set. + * @return This builder for chaining. + */ + public Builder setText(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + blockCase_ = 1; + block_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * A block of text.
+     * 
+ * + * string text = 1; + * + * @return This builder for chaining. + */ + public Builder clearText() { + if (blockCase_ == 1) { + blockCase_ = 0; + block_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * A block of text.
+     * 
+ * + * string text = 1; + * + * @param value The bytes for text to set. + * @return This builder for chaining. + */ + public Builder setTextBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + blockCase_ = 1; + block_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.analytics.data.v1alpha.ResponseBlock.DataTable, + com.google.analytics.data.v1alpha.ResponseBlock.DataTable.Builder, + com.google.analytics.data.v1alpha.ResponseBlock.DataTableOrBuilder> + tableBuilder_; + + /** + * + * + *
+     * A block of table data.
+     * 
+ * + * .google.analytics.data.v1alpha.ResponseBlock.DataTable table = 2; + * + * @return Whether the table field is set. + */ + @java.lang.Override + public boolean hasTable() { + return blockCase_ == 2; + } + + /** + * + * + *
+     * A block of table data.
+     * 
+ * + * .google.analytics.data.v1alpha.ResponseBlock.DataTable table = 2; + * + * @return The table. + */ + @java.lang.Override + public com.google.analytics.data.v1alpha.ResponseBlock.DataTable getTable() { + if (tableBuilder_ == null) { + if (blockCase_ == 2) { + return (com.google.analytics.data.v1alpha.ResponseBlock.DataTable) block_; + } + return com.google.analytics.data.v1alpha.ResponseBlock.DataTable.getDefaultInstance(); + } else { + if (blockCase_ == 2) { + return tableBuilder_.getMessage(); + } + return com.google.analytics.data.v1alpha.ResponseBlock.DataTable.getDefaultInstance(); + } + } + + /** + * + * + *
+     * A block of table data.
+     * 
+ * + * .google.analytics.data.v1alpha.ResponseBlock.DataTable table = 2; + */ + public Builder setTable(com.google.analytics.data.v1alpha.ResponseBlock.DataTable value) { + if (tableBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + block_ = value; + onChanged(); + } else { + tableBuilder_.setMessage(value); + } + blockCase_ = 2; + return this; + } + + /** + * + * + *
+     * A block of table data.
+     * 
+ * + * .google.analytics.data.v1alpha.ResponseBlock.DataTable table = 2; + */ + public Builder setTable( + com.google.analytics.data.v1alpha.ResponseBlock.DataTable.Builder builderForValue) { + if (tableBuilder_ == null) { + block_ = builderForValue.build(); + onChanged(); + } else { + tableBuilder_.setMessage(builderForValue.build()); + } + blockCase_ = 2; + return this; + } + + /** + * + * + *
+     * A block of table data.
+     * 
+ * + * .google.analytics.data.v1alpha.ResponseBlock.DataTable table = 2; + */ + public Builder mergeTable(com.google.analytics.data.v1alpha.ResponseBlock.DataTable value) { + if (tableBuilder_ == null) { + if (blockCase_ == 2 + && block_ + != com.google.analytics.data.v1alpha.ResponseBlock.DataTable.getDefaultInstance()) { + block_ = + com.google.analytics.data.v1alpha.ResponseBlock.DataTable.newBuilder( + (com.google.analytics.data.v1alpha.ResponseBlock.DataTable) block_) + .mergeFrom(value) + .buildPartial(); + } else { + block_ = value; + } + onChanged(); + } else { + if (blockCase_ == 2) { + tableBuilder_.mergeFrom(value); + } else { + tableBuilder_.setMessage(value); + } + } + blockCase_ = 2; + return this; + } + + /** + * + * + *
+     * A block of table data.
+     * 
+ * + * .google.analytics.data.v1alpha.ResponseBlock.DataTable table = 2; + */ + public Builder clearTable() { + if (tableBuilder_ == null) { + if (blockCase_ == 2) { + blockCase_ = 0; + block_ = null; + onChanged(); + } + } else { + if (blockCase_ == 2) { + blockCase_ = 0; + block_ = null; + } + tableBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * A block of table data.
+     * 
+ * + * .google.analytics.data.v1alpha.ResponseBlock.DataTable table = 2; + */ + public com.google.analytics.data.v1alpha.ResponseBlock.DataTable.Builder getTableBuilder() { + return internalGetTableFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * A block of table data.
+     * 
+ * + * .google.analytics.data.v1alpha.ResponseBlock.DataTable table = 2; + */ + @java.lang.Override + public com.google.analytics.data.v1alpha.ResponseBlock.DataTableOrBuilder getTableOrBuilder() { + if ((blockCase_ == 2) && (tableBuilder_ != null)) { + return tableBuilder_.getMessageOrBuilder(); + } else { + if (blockCase_ == 2) { + return (com.google.analytics.data.v1alpha.ResponseBlock.DataTable) block_; + } + return com.google.analytics.data.v1alpha.ResponseBlock.DataTable.getDefaultInstance(); + } + } + + /** + * + * + *
+     * A block of table data.
+     * 
+ * + * .google.analytics.data.v1alpha.ResponseBlock.DataTable table = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.analytics.data.v1alpha.ResponseBlock.DataTable, + com.google.analytics.data.v1alpha.ResponseBlock.DataTable.Builder, + com.google.analytics.data.v1alpha.ResponseBlock.DataTableOrBuilder> + internalGetTableFieldBuilder() { + if (tableBuilder_ == null) { + if (!(blockCase_ == 2)) { + block_ = com.google.analytics.data.v1alpha.ResponseBlock.DataTable.getDefaultInstance(); + } + tableBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.analytics.data.v1alpha.ResponseBlock.DataTable, + com.google.analytics.data.v1alpha.ResponseBlock.DataTable.Builder, + com.google.analytics.data.v1alpha.ResponseBlock.DataTableOrBuilder>( + (com.google.analytics.data.v1alpha.ResponseBlock.DataTable) block_, + getParentForChildren(), + isClean()); + block_ = null; + } + blockCase_ = 2; + onChanged(); + return tableBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.analytics.data.v1alpha.ResponseBlock) + } + + // @@protoc_insertion_point(class_scope:google.analytics.data.v1alpha.ResponseBlock) + private static final com.google.analytics.data.v1alpha.ResponseBlock DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.data.v1alpha.ResponseBlock(); + } + + public static com.google.analytics.data.v1alpha.ResponseBlock getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ResponseBlock parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.data.v1alpha.ResponseBlock getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/ResponseBlockOrBuilder.java b/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/ResponseBlockOrBuilder.java new file mode 100644 index 000000000000..23646bada9d6 --- /dev/null +++ b/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/ResponseBlockOrBuilder.java @@ -0,0 +1,106 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/analytics/data/v1alpha/data.proto +// Protobuf Java Version: 4.33.6 + +package com.google.analytics.data.v1alpha; + +@com.google.protobuf.Generated +public interface ResponseBlockOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.data.v1alpha.ResponseBlock) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A block of text.
+   * 
+ * + * string text = 1; + * + * @return Whether the text field is set. + */ + boolean hasText(); + + /** + * + * + *
+   * A block of text.
+   * 
+ * + * string text = 1; + * + * @return The text. + */ + java.lang.String getText(); + + /** + * + * + *
+   * A block of text.
+   * 
+ * + * string text = 1; + * + * @return The bytes for text. + */ + com.google.protobuf.ByteString getTextBytes(); + + /** + * + * + *
+   * A block of table data.
+   * 
+ * + * .google.analytics.data.v1alpha.ResponseBlock.DataTable table = 2; + * + * @return Whether the table field is set. + */ + boolean hasTable(); + + /** + * + * + *
+   * A block of table data.
+   * 
+ * + * .google.analytics.data.v1alpha.ResponseBlock.DataTable table = 2; + * + * @return The table. + */ + com.google.analytics.data.v1alpha.ResponseBlock.DataTable getTable(); + + /** + * + * + *
+   * A block of table data.
+   * 
+ * + * .google.analytics.data.v1alpha.ResponseBlock.DataTable table = 2; + */ + com.google.analytics.data.v1alpha.ResponseBlock.DataTableOrBuilder getTableOrBuilder(); + + com.google.analytics.data.v1alpha.ResponseBlock.BlockCase getBlockCase(); +} diff --git a/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/ResponseMetaData.java b/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/ResponseMetaData.java index 588af9301e9c..d733ec84a7d8 100644 --- a/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/ResponseMetaData.java +++ b/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/ResponseMetaData.java @@ -57,6 +57,7 @@ private ResponseMetaData() { emptyReason_ = ""; samplingMetadatas_ = java.util.Collections.emptyList(); section_ = 0; + dataTruncationReasons_ = java.util.Collections.emptyList(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @@ -2558,6 +2559,3326 @@ public com.google.protobuf.Parser getParserForType() } } + public interface DataTruncationReasonOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The type of data truncation.
+     * 
+ * + * + * optional .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.DataTruncationType data_truncation_type = 1; + * + * + * @return Whether the dataTruncationType field is set. + */ + boolean hasDataTruncationType(); + + /** + * + * + *
+     * The type of data truncation.
+     * 
+ * + * + * optional .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.DataTruncationType data_truncation_type = 1; + * + * + * @return The enum numeric value on the wire for dataTruncationType. + */ + int getDataTruncationTypeValue(); + + /** + * + * + *
+     * The type of data truncation.
+     * 
+ * + * + * optional .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.DataTruncationType data_truncation_type = 1; + * + * + * @return The dataTruncationType. + */ + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.DataTruncationType + getDataTruncationType(); + + /** + * + * + *
+     * A descriptive message explaining the data truncation.
+     * 
+ * + * optional string data_truncation_message = 2; + * + * @return Whether the dataTruncationMessage field is set. + */ + boolean hasDataTruncationMessage(); + + /** + * + * + *
+     * A descriptive message explaining the data truncation.
+     * 
+ * + * optional string data_truncation_message = 2; + * + * @return The dataTruncationMessage. + */ + java.lang.String getDataTruncationMessage(); + + /** + * + * + *
+     * A descriptive message explaining the data truncation.
+     * 
+ * + * optional string data_truncation_message = 2; + * + * @return The bytes for dataTruncationMessage. + */ + com.google.protobuf.ByteString getDataTruncationMessageBytes(); + + /** + * + * + *
+     * The data truncation date in the format YYYY-MM-DD.
+     * Indicates data before this date is truncated.
+     * 
+ * + * optional string data_truncation_date = 3; + * + * @return Whether the dataTruncationDate field is set. + */ + boolean hasDataTruncationDate(); + + /** + * + * + *
+     * The data truncation date in the format YYYY-MM-DD.
+     * Indicates data before this date is truncated.
+     * 
+ * + * optional string data_truncation_date = 3; + * + * @return The dataTruncationDate. + */ + java.lang.String getDataTruncationDate(); + + /** + * + * + *
+     * The data truncation date in the format YYYY-MM-DD.
+     * Indicates data before this date is truncated.
+     * 
+ * + * optional string data_truncation_date = 3; + * + * @return The bytes for dataTruncationDate. + */ + com.google.protobuf.ByteString getDataTruncationDateBytes(); + + /** + * + * + *
+     * The truncated date ranges.
+     * 
+ * + * + * repeated .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.DataTruncationDateRange data_truncation_date_ranges = 4; + * + */ + java.util.List< + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRange> + getDataTruncationDateRangesList(); + + /** + * + * + *
+     * The truncated date ranges.
+     * 
+ * + * + * repeated .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.DataTruncationDateRange data_truncation_date_ranges = 4; + * + */ + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.DataTruncationDateRange + getDataTruncationDateRanges(int index); + + /** + * + * + *
+     * The truncated date ranges.
+     * 
+ * + * + * repeated .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.DataTruncationDateRange data_truncation_date_ranges = 4; + * + */ + int getDataTruncationDateRangesCount(); + + /** + * + * + *
+     * The truncated date ranges.
+     * 
+ * + * + * repeated .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.DataTruncationDateRange data_truncation_date_ranges = 4; + * + */ + java.util.List< + ? extends + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRangeOrBuilder> + getDataTruncationDateRangesOrBuilderList(); + + /** + * + * + *
+     * The truncated date ranges.
+     * 
+ * + * + * repeated .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.DataTruncationDateRange data_truncation_date_ranges = 4; + * + */ + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRangeOrBuilder + getDataTruncationDateRangesOrBuilder(int index); + } + + /** + * + * + *
+   * Describes a reason for data truncation in the report.
+   * 
+ * + * Protobuf type {@code google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason} + */ + public static final class DataTruncationReason extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason) + DataTruncationReasonOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "DataTruncationReason"); + } + + // Use DataTruncationReason.newBuilder() to construct. + private DataTruncationReason(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DataTruncationReason() { + dataTruncationType_ = 0; + dataTruncationMessage_ = ""; + dataTruncationDate_ = ""; + dataTruncationDateRanges_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1alpha.ReportingApiProto + .internal_static_google_analytics_data_v1alpha_ResponseMetaData_DataTruncationReason_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1alpha.ReportingApiProto + .internal_static_google_analytics_data_v1alpha_ResponseMetaData_DataTruncationReason_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.class, + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.Builder + .class); + } + + /** + * + * + *
+     * The type of data truncation.
+     * 
+ * + * Protobuf enum {@code + * google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.DataTruncationType} + */ + public enum DataTruncationType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Unspecified type.
+       * 
+ * + * DATA_TRUNCATION_TYPE_UNSPECIFIED = 0; + */ + DATA_TRUNCATION_TYPE_UNSPECIFIED(0), + /** + * + * + *
+       * Data is truncated in attribution report for rules-based models golden
+       * date.
+       * 
+ * + * DATA_TRUNCATION_TYPE_RULES_BASED_MODELS = 1; + */ + DATA_TRUNCATION_TYPE_RULES_BASED_MODELS(1), + /** + * + * + *
+       * Data is truncated in attribution report for data driven attribution
+       * golden date.
+       * 
+ * + * DATA_TRUNCATION_TYPE_DATA_DRIVEN_ATTRIBUTION = 2; + */ + DATA_TRUNCATION_TYPE_DATA_DRIVEN_ATTRIBUTION(2), + /** + * + * + *
+       * Data is truncated because DV360 policy does not permit data older than
+       * 2 years from being returned.
+       * 
+ * + * DATA_TRUNCATION_TYPE_DV360 = 3; + */ + DATA_TRUNCATION_TYPE_DV360(3), + /** + * + * + *
+       * Data is truncated because CM360 policy does not permit data older than
+       * 2 years from being returned.
+       * 
+ * + * DATA_TRUNCATION_TYPE_CM360 = 4; + */ + DATA_TRUNCATION_TYPE_CM360(4), + /** + * + * + *
+       * New item-scoped ecommerce metrics only have data after a specific date.
+       * 
+ * + * DATA_TRUNCATION_TYPE_ITEM_SCOPED_ECOMMERCE_METRICS = 5; + */ + DATA_TRUNCATION_TYPE_ITEM_SCOPED_ECOMMERCE_METRICS(5), + /** + * + * + *
+       * New event-scoped ecommerce metrics only have data after a specific
+       * date.
+       * 
+ * + * DATA_TRUNCATION_TYPE_EVENT_SCOPED_ECOMMERCE_METRICS = 6; + */ + DATA_TRUNCATION_TYPE_EVENT_SCOPED_ECOMMERCE_METRICS(6), + /** + * + * + *
+       * Query date range may not be fully served.
+       * 
+ * + * DATA_TRUNCATION_TYPE_DATE_RANGE = 7; + */ + DATA_TRUNCATION_TYPE_DATE_RANGE(7), + /** + * + * + *
+       * Data truncated because the query attempts to read event data prior
+       * to its retention date.
+       * 
+ * + * DATA_TRUNCATION_TYPE_PROPERTY = 8; + */ + DATA_TRUNCATION_TYPE_PROPERTY(8), + /** + * + * + *
+       * Data is truncated in conversions report.
+       * 
+ * + * DATA_TRUNCATION_TYPE_CONVERSIONS = 9; + */ + DATA_TRUNCATION_TYPE_CONVERSIONS(9), + /** + * + * + *
+       * Data is truncated due to Google Ads 36 month retention policy.
+       * 
+ * + * DATA_TRUNCATION_TYPE_GOOGLE_ADS = 10; + */ + DATA_TRUNCATION_TYPE_GOOGLE_ADS(10), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "DataTruncationType"); + } + + /** + * + * + *
+       * Unspecified type.
+       * 
+ * + * DATA_TRUNCATION_TYPE_UNSPECIFIED = 0; + */ + public static final int DATA_TRUNCATION_TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+       * Data is truncated in attribution report for rules-based models golden
+       * date.
+       * 
+ * + * DATA_TRUNCATION_TYPE_RULES_BASED_MODELS = 1; + */ + public static final int DATA_TRUNCATION_TYPE_RULES_BASED_MODELS_VALUE = 1; + + /** + * + * + *
+       * Data is truncated in attribution report for data driven attribution
+       * golden date.
+       * 
+ * + * DATA_TRUNCATION_TYPE_DATA_DRIVEN_ATTRIBUTION = 2; + */ + public static final int DATA_TRUNCATION_TYPE_DATA_DRIVEN_ATTRIBUTION_VALUE = 2; + + /** + * + * + *
+       * Data is truncated because DV360 policy does not permit data older than
+       * 2 years from being returned.
+       * 
+ * + * DATA_TRUNCATION_TYPE_DV360 = 3; + */ + public static final int DATA_TRUNCATION_TYPE_DV360_VALUE = 3; + + /** + * + * + *
+       * Data is truncated because CM360 policy does not permit data older than
+       * 2 years from being returned.
+       * 
+ * + * DATA_TRUNCATION_TYPE_CM360 = 4; + */ + public static final int DATA_TRUNCATION_TYPE_CM360_VALUE = 4; + + /** + * + * + *
+       * New item-scoped ecommerce metrics only have data after a specific date.
+       * 
+ * + * DATA_TRUNCATION_TYPE_ITEM_SCOPED_ECOMMERCE_METRICS = 5; + */ + public static final int DATA_TRUNCATION_TYPE_ITEM_SCOPED_ECOMMERCE_METRICS_VALUE = 5; + + /** + * + * + *
+       * New event-scoped ecommerce metrics only have data after a specific
+       * date.
+       * 
+ * + * DATA_TRUNCATION_TYPE_EVENT_SCOPED_ECOMMERCE_METRICS = 6; + */ + public static final int DATA_TRUNCATION_TYPE_EVENT_SCOPED_ECOMMERCE_METRICS_VALUE = 6; + + /** + * + * + *
+       * Query date range may not be fully served.
+       * 
+ * + * DATA_TRUNCATION_TYPE_DATE_RANGE = 7; + */ + public static final int DATA_TRUNCATION_TYPE_DATE_RANGE_VALUE = 7; + + /** + * + * + *
+       * Data truncated because the query attempts to read event data prior
+       * to its retention date.
+       * 
+ * + * DATA_TRUNCATION_TYPE_PROPERTY = 8; + */ + public static final int DATA_TRUNCATION_TYPE_PROPERTY_VALUE = 8; + + /** + * + * + *
+       * Data is truncated in conversions report.
+       * 
+ * + * DATA_TRUNCATION_TYPE_CONVERSIONS = 9; + */ + public static final int DATA_TRUNCATION_TYPE_CONVERSIONS_VALUE = 9; + + /** + * + * + *
+       * Data is truncated due to Google Ads 36 month retention policy.
+       * 
+ * + * DATA_TRUNCATION_TYPE_GOOGLE_ADS = 10; + */ + public static final int DATA_TRUNCATION_TYPE_GOOGLE_ADS_VALUE = 10; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DataTruncationType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static DataTruncationType forNumber(int value) { + switch (value) { + case 0: + return DATA_TRUNCATION_TYPE_UNSPECIFIED; + case 1: + return DATA_TRUNCATION_TYPE_RULES_BASED_MODELS; + case 2: + return DATA_TRUNCATION_TYPE_DATA_DRIVEN_ATTRIBUTION; + case 3: + return DATA_TRUNCATION_TYPE_DV360; + case 4: + return DATA_TRUNCATION_TYPE_CM360; + case 5: + return DATA_TRUNCATION_TYPE_ITEM_SCOPED_ECOMMERCE_METRICS; + case 6: + return DATA_TRUNCATION_TYPE_EVENT_SCOPED_ECOMMERCE_METRICS; + case 7: + return DATA_TRUNCATION_TYPE_DATE_RANGE; + case 8: + return DATA_TRUNCATION_TYPE_PROPERTY; + case 9: + return DATA_TRUNCATION_TYPE_CONVERSIONS; + case 10: + return DATA_TRUNCATION_TYPE_GOOGLE_ADS; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public DataTruncationType findValueByNumber(int number) { + return DataTruncationType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final DataTruncationType[] VALUES = values(); + + public static DataTruncationType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private DataTruncationType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.DataTruncationType) + } + + public interface DataTruncationDateRangeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.DataTruncationDateRange) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * The start date in the format YYYY-MM-DD (inclusive).
+       * 
+ * + * optional string start_date = 1; + * + * @return Whether the startDate field is set. + */ + boolean hasStartDate(); + + /** + * + * + *
+       * The start date in the format YYYY-MM-DD (inclusive).
+       * 
+ * + * optional string start_date = 1; + * + * @return The startDate. + */ + java.lang.String getStartDate(); + + /** + * + * + *
+       * The start date in the format YYYY-MM-DD (inclusive).
+       * 
+ * + * optional string start_date = 1; + * + * @return The bytes for startDate. + */ + com.google.protobuf.ByteString getStartDateBytes(); + + /** + * + * + *
+       * The end date in the format YYYY-MM-DD (inclusive).
+       * 
+ * + * optional string end_date = 2; + * + * @return Whether the endDate field is set. + */ + boolean hasEndDate(); + + /** + * + * + *
+       * The end date in the format YYYY-MM-DD (inclusive).
+       * 
+ * + * optional string end_date = 2; + * + * @return The endDate. + */ + java.lang.String getEndDate(); + + /** + * + * + *
+       * The end date in the format YYYY-MM-DD (inclusive).
+       * 
+ * + * optional string end_date = 2; + * + * @return The bytes for endDate. + */ + com.google.protobuf.ByteString getEndDateBytes(); + } + + /** + * + * + *
+     * Define the truncated date range from start_date to end_date.
+     * 
+ * + * Protobuf type {@code + * google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.DataTruncationDateRange} + */ + public static final class DataTruncationDateRange extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.DataTruncationDateRange) + DataTruncationDateRangeOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "DataTruncationDateRange"); + } + + // Use DataTruncationDateRange.newBuilder() to construct. + private DataTruncationDateRange(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DataTruncationDateRange() { + startDate_ = ""; + endDate_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1alpha.ReportingApiProto + .internal_static_google_analytics_data_v1alpha_ResponseMetaData_DataTruncationReason_DataTruncationDateRange_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1alpha.ReportingApiProto + .internal_static_google_analytics_data_v1alpha_ResponseMetaData_DataTruncationReason_DataTruncationDateRange_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRange.class, + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRange.Builder.class); + } + + private int bitField0_; + public static final int START_DATE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object startDate_ = ""; + + /** + * + * + *
+       * The start date in the format YYYY-MM-DD (inclusive).
+       * 
+ * + * optional string start_date = 1; + * + * @return Whether the startDate field is set. + */ + @java.lang.Override + public boolean hasStartDate() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+       * The start date in the format YYYY-MM-DD (inclusive).
+       * 
+ * + * optional string start_date = 1; + * + * @return The startDate. + */ + @java.lang.Override + public java.lang.String getStartDate() { + java.lang.Object ref = startDate_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + startDate_ = s; + return s; + } + } + + /** + * + * + *
+       * The start date in the format YYYY-MM-DD (inclusive).
+       * 
+ * + * optional string start_date = 1; + * + * @return The bytes for startDate. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStartDateBytes() { + java.lang.Object ref = startDate_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + startDate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int END_DATE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object endDate_ = ""; + + /** + * + * + *
+       * The end date in the format YYYY-MM-DD (inclusive).
+       * 
+ * + * optional string end_date = 2; + * + * @return Whether the endDate field is set. + */ + @java.lang.Override + public boolean hasEndDate() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+       * The end date in the format YYYY-MM-DD (inclusive).
+       * 
+ * + * optional string end_date = 2; + * + * @return The endDate. + */ + @java.lang.Override + public java.lang.String getEndDate() { + java.lang.Object ref = endDate_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endDate_ = s; + return s; + } + } + + /** + * + * + *
+       * The end date in the format YYYY-MM-DD (inclusive).
+       * 
+ * + * optional string end_date = 2; + * + * @return The bytes for endDate. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEndDateBytes() { + java.lang.Object ref = endDate_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + endDate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, startDate_); + } + if (((bitField0_ & 0x00000002) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, endDate_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, startDate_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, endDate_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRange)) { + return super.equals(obj); + } + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRange + other = + (com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRange) + obj; + + if (hasStartDate() != other.hasStartDate()) return false; + if (hasStartDate()) { + if (!getStartDate().equals(other.getStartDate())) return false; + } + if (hasEndDate() != other.hasEndDate()) return false; + if (hasEndDate()) { + if (!getEndDate().equals(other.getEndDate())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasStartDate()) { + hash = (37 * hash) + START_DATE_FIELD_NUMBER; + hash = (53 * hash) + getStartDate().hashCode(); + } + if (hasEndDate()) { + hash = (37 * hash) + END_DATE_FIELD_NUMBER; + hash = (53 * hash) + getEndDate().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRange + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRange + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRange + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRange + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRange + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRange + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRange + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRange + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRange + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRange + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRange + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRange + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRange + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+       * Define the truncated date range from start_date to end_date.
+       * 
+ * + * Protobuf type {@code + * google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.DataTruncationDateRange} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.DataTruncationDateRange) + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRangeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1alpha.ReportingApiProto + .internal_static_google_analytics_data_v1alpha_ResponseMetaData_DataTruncationReason_DataTruncationDateRange_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1alpha.ReportingApiProto + .internal_static_google_analytics_data_v1alpha_ResponseMetaData_DataTruncationReason_DataTruncationDateRange_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRange.class, + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRange.Builder.class); + } + + // Construct using + // com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.DataTruncationDateRange.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + startDate_ = ""; + endDate_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.data.v1alpha.ReportingApiProto + .internal_static_google_analytics_data_v1alpha_ResponseMetaData_DataTruncationReason_DataTruncationDateRange_descriptor; + } + + @java.lang.Override + public com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRange + getDefaultInstanceForType() { + return com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRange.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRange + build() { + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRange + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRange + buildPartial() { + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRange + result = + new com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRange(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRange + result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.startDate_ = startDate_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.endDate_ = endDate_; + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRange) { + return mergeFrom( + (com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRange) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRange + other) { + if (other + == com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRange.getDefaultInstance()) return this; + if (other.hasStartDate()) { + startDate_ = other.startDate_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasEndDate()) { + endDate_ = other.endDate_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + startDate_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + endDate_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object startDate_ = ""; + + /** + * + * + *
+         * The start date in the format YYYY-MM-DD (inclusive).
+         * 
+ * + * optional string start_date = 1; + * + * @return Whether the startDate field is set. + */ + public boolean hasStartDate() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+         * The start date in the format YYYY-MM-DD (inclusive).
+         * 
+ * + * optional string start_date = 1; + * + * @return The startDate. + */ + public java.lang.String getStartDate() { + java.lang.Object ref = startDate_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + startDate_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+         * The start date in the format YYYY-MM-DD (inclusive).
+         * 
+ * + * optional string start_date = 1; + * + * @return The bytes for startDate. + */ + public com.google.protobuf.ByteString getStartDateBytes() { + java.lang.Object ref = startDate_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + startDate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+         * The start date in the format YYYY-MM-DD (inclusive).
+         * 
+ * + * optional string start_date = 1; + * + * @param value The startDate to set. + * @return This builder for chaining. + */ + public Builder setStartDate(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + startDate_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+         * The start date in the format YYYY-MM-DD (inclusive).
+         * 
+ * + * optional string start_date = 1; + * + * @return This builder for chaining. + */ + public Builder clearStartDate() { + startDate_ = getDefaultInstance().getStartDate(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+         * The start date in the format YYYY-MM-DD (inclusive).
+         * 
+ * + * optional string start_date = 1; + * + * @param value The bytes for startDate to set. + * @return This builder for chaining. + */ + public Builder setStartDateBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + startDate_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object endDate_ = ""; + + /** + * + * + *
+         * The end date in the format YYYY-MM-DD (inclusive).
+         * 
+ * + * optional string end_date = 2; + * + * @return Whether the endDate field is set. + */ + public boolean hasEndDate() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+         * The end date in the format YYYY-MM-DD (inclusive).
+         * 
+ * + * optional string end_date = 2; + * + * @return The endDate. + */ + public java.lang.String getEndDate() { + java.lang.Object ref = endDate_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endDate_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+         * The end date in the format YYYY-MM-DD (inclusive).
+         * 
+ * + * optional string end_date = 2; + * + * @return The bytes for endDate. + */ + public com.google.protobuf.ByteString getEndDateBytes() { + java.lang.Object ref = endDate_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + endDate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+         * The end date in the format YYYY-MM-DD (inclusive).
+         * 
+ * + * optional string end_date = 2; + * + * @param value The endDate to set. + * @return This builder for chaining. + */ + public Builder setEndDate(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + endDate_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+         * The end date in the format YYYY-MM-DD (inclusive).
+         * 
+ * + * optional string end_date = 2; + * + * @return This builder for chaining. + */ + public Builder clearEndDate() { + endDate_ = getDefaultInstance().getEndDate(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+         * The end date in the format YYYY-MM-DD (inclusive).
+         * 
+ * + * optional string end_date = 2; + * + * @param value The bytes for endDate to set. + * @return This builder for chaining. + */ + public Builder setEndDateBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + endDate_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.DataTruncationDateRange) + } + + // @@protoc_insertion_point(class_scope:google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.DataTruncationDateRange) + private static final com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRange + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRange(); + } + + public static com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRange + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DataTruncationDateRange parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRange + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int DATA_TRUNCATION_TYPE_FIELD_NUMBER = 1; + private int dataTruncationType_ = 0; + + /** + * + * + *
+     * The type of data truncation.
+     * 
+ * + * + * optional .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.DataTruncationType data_truncation_type = 1; + * + * + * @return Whether the dataTruncationType field is set. + */ + @java.lang.Override + public boolean hasDataTruncationType() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * The type of data truncation.
+     * 
+ * + * + * optional .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.DataTruncationType data_truncation_type = 1; + * + * + * @return The enum numeric value on the wire for dataTruncationType. + */ + @java.lang.Override + public int getDataTruncationTypeValue() { + return dataTruncationType_; + } + + /** + * + * + *
+     * The type of data truncation.
+     * 
+ * + * + * optional .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.DataTruncationType data_truncation_type = 1; + * + * + * @return The dataTruncationType. + */ + @java.lang.Override + public com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationType + getDataTruncationType() { + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.DataTruncationType + result = + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationType.forNumber(dataTruncationType_); + return result == null + ? com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationType.UNRECOGNIZED + : result; + } + + public static final int DATA_TRUNCATION_MESSAGE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object dataTruncationMessage_ = ""; + + /** + * + * + *
+     * A descriptive message explaining the data truncation.
+     * 
+ * + * optional string data_truncation_message = 2; + * + * @return Whether the dataTruncationMessage field is set. + */ + @java.lang.Override + public boolean hasDataTruncationMessage() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * A descriptive message explaining the data truncation.
+     * 
+ * + * optional string data_truncation_message = 2; + * + * @return The dataTruncationMessage. + */ + @java.lang.Override + public java.lang.String getDataTruncationMessage() { + java.lang.Object ref = dataTruncationMessage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataTruncationMessage_ = s; + return s; + } + } + + /** + * + * + *
+     * A descriptive message explaining the data truncation.
+     * 
+ * + * optional string data_truncation_message = 2; + * + * @return The bytes for dataTruncationMessage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDataTruncationMessageBytes() { + java.lang.Object ref = dataTruncationMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataTruncationMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATA_TRUNCATION_DATE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object dataTruncationDate_ = ""; + + /** + * + * + *
+     * The data truncation date in the format YYYY-MM-DD.
+     * Indicates data before this date is truncated.
+     * 
+ * + * optional string data_truncation_date = 3; + * + * @return Whether the dataTruncationDate field is set. + */ + @java.lang.Override + public boolean hasDataTruncationDate() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * The data truncation date in the format YYYY-MM-DD.
+     * Indicates data before this date is truncated.
+     * 
+ * + * optional string data_truncation_date = 3; + * + * @return The dataTruncationDate. + */ + @java.lang.Override + public java.lang.String getDataTruncationDate() { + java.lang.Object ref = dataTruncationDate_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataTruncationDate_ = s; + return s; + } + } + + /** + * + * + *
+     * The data truncation date in the format YYYY-MM-DD.
+     * Indicates data before this date is truncated.
+     * 
+ * + * optional string data_truncation_date = 3; + * + * @return The bytes for dataTruncationDate. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDataTruncationDateBytes() { + java.lang.Object ref = dataTruncationDate_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataTruncationDate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATA_TRUNCATION_DATE_RANGES_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List< + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRange> + dataTruncationDateRanges_; + + /** + * + * + *
+     * The truncated date ranges.
+     * 
+ * + * + * repeated .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.DataTruncationDateRange data_truncation_date_ranges = 4; + * + */ + @java.lang.Override + public java.util.List< + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRange> + getDataTruncationDateRangesList() { + return dataTruncationDateRanges_; + } + + /** + * + * + *
+     * The truncated date ranges.
+     * 
+ * + * + * repeated .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.DataTruncationDateRange data_truncation_date_ranges = 4; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRangeOrBuilder> + getDataTruncationDateRangesOrBuilderList() { + return dataTruncationDateRanges_; + } + + /** + * + * + *
+     * The truncated date ranges.
+     * 
+ * + * + * repeated .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.DataTruncationDateRange data_truncation_date_ranges = 4; + * + */ + @java.lang.Override + public int getDataTruncationDateRangesCount() { + return dataTruncationDateRanges_.size(); + } + + /** + * + * + *
+     * The truncated date ranges.
+     * 
+ * + * + * repeated .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.DataTruncationDateRange data_truncation_date_ranges = 4; + * + */ + @java.lang.Override + public com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRange + getDataTruncationDateRanges(int index) { + return dataTruncationDateRanges_.get(index); + } + + /** + * + * + *
+     * The truncated date ranges.
+     * 
+ * + * + * repeated .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.DataTruncationDateRange data_truncation_date_ranges = 4; + * + */ + @java.lang.Override + public com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRangeOrBuilder + getDataTruncationDateRangesOrBuilder(int index) { + return dataTruncationDateRanges_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeEnum(1, dataTruncationType_); + } + if (((bitField0_ & 0x00000002) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, dataTruncationMessage_); + } + if (((bitField0_ & 0x00000004) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, dataTruncationDate_); + } + for (int i = 0; i < dataTruncationDateRanges_.size(); i++) { + output.writeMessage(4, dataTruncationDateRanges_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, dataTruncationType_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, dataTruncationMessage_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, dataTruncationDate_); + } + for (int i = 0; i < dataTruncationDateRanges_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, dataTruncationDateRanges_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason)) { + return super.equals(obj); + } + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason other = + (com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason) obj; + + if (hasDataTruncationType() != other.hasDataTruncationType()) return false; + if (hasDataTruncationType()) { + if (dataTruncationType_ != other.dataTruncationType_) return false; + } + if (hasDataTruncationMessage() != other.hasDataTruncationMessage()) return false; + if (hasDataTruncationMessage()) { + if (!getDataTruncationMessage().equals(other.getDataTruncationMessage())) return false; + } + if (hasDataTruncationDate() != other.hasDataTruncationDate()) return false; + if (hasDataTruncationDate()) { + if (!getDataTruncationDate().equals(other.getDataTruncationDate())) return false; + } + if (!getDataTruncationDateRangesList().equals(other.getDataTruncationDateRangesList())) + return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasDataTruncationType()) { + hash = (37 * hash) + DATA_TRUNCATION_TYPE_FIELD_NUMBER; + hash = (53 * hash) + dataTruncationType_; + } + if (hasDataTruncationMessage()) { + hash = (37 * hash) + DATA_TRUNCATION_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getDataTruncationMessage().hashCode(); + } + if (hasDataTruncationDate()) { + hash = (37 * hash) + DATA_TRUNCATION_DATE_FIELD_NUMBER; + hash = (53 * hash) + getDataTruncationDate().hashCode(); + } + if (getDataTruncationDateRangesCount() > 0) { + hash = (37 * hash) + DATA_TRUNCATION_DATE_RANGES_FIELD_NUMBER; + hash = (53 * hash) + getDataTruncationDateRangesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * Describes a reason for data truncation in the report.
+     * 
+ * + * Protobuf type {@code google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason) + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReasonOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1alpha.ReportingApiProto + .internal_static_google_analytics_data_v1alpha_ResponseMetaData_DataTruncationReason_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1alpha.ReportingApiProto + .internal_static_google_analytics_data_v1alpha_ResponseMetaData_DataTruncationReason_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.class, + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.Builder + .class); + } + + // Construct using + // com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + dataTruncationType_ = 0; + dataTruncationMessage_ = ""; + dataTruncationDate_ = ""; + if (dataTruncationDateRangesBuilder_ == null) { + dataTruncationDateRanges_ = java.util.Collections.emptyList(); + } else { + dataTruncationDateRanges_ = null; + dataTruncationDateRangesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.data.v1alpha.ReportingApiProto + .internal_static_google_analytics_data_v1alpha_ResponseMetaData_DataTruncationReason_descriptor; + } + + @java.lang.Override + public com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + getDefaultInstanceForType() { + return com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason build() { + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + buildPartial() { + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason result = + new com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason result) { + if (dataTruncationDateRangesBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + dataTruncationDateRanges_ = + java.util.Collections.unmodifiableList(dataTruncationDateRanges_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.dataTruncationDateRanges_ = dataTruncationDateRanges_; + } else { + result.dataTruncationDateRanges_ = dataTruncationDateRangesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.dataTruncationType_ = dataTruncationType_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.dataTruncationMessage_ = dataTruncationMessage_; + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.dataTruncationDate_ = dataTruncationDate_; + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason) { + return mergeFrom( + (com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason other) { + if (other + == com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .getDefaultInstance()) return this; + if (other.hasDataTruncationType()) { + setDataTruncationTypeValue(other.getDataTruncationTypeValue()); + } + if (other.hasDataTruncationMessage()) { + dataTruncationMessage_ = other.dataTruncationMessage_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasDataTruncationDate()) { + dataTruncationDate_ = other.dataTruncationDate_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (dataTruncationDateRangesBuilder_ == null) { + if (!other.dataTruncationDateRanges_.isEmpty()) { + if (dataTruncationDateRanges_.isEmpty()) { + dataTruncationDateRanges_ = other.dataTruncationDateRanges_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureDataTruncationDateRangesIsMutable(); + dataTruncationDateRanges_.addAll(other.dataTruncationDateRanges_); + } + onChanged(); + } + } else { + if (!other.dataTruncationDateRanges_.isEmpty()) { + if (dataTruncationDateRangesBuilder_.isEmpty()) { + dataTruncationDateRangesBuilder_.dispose(); + dataTruncationDateRangesBuilder_ = null; + dataTruncationDateRanges_ = other.dataTruncationDateRanges_; + bitField0_ = (bitField0_ & ~0x00000008); + dataTruncationDateRangesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetDataTruncationDateRangesFieldBuilder() + : null; + } else { + dataTruncationDateRangesBuilder_.addAllMessages(other.dataTruncationDateRanges_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + dataTruncationType_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + dataTruncationMessage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + dataTruncationDate_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRange + m = + input.readMessage( + com.google.analytics.data.v1alpha.ResponseMetaData + .DataTruncationReason.DataTruncationDateRange.parser(), + extensionRegistry); + if (dataTruncationDateRangesBuilder_ == null) { + ensureDataTruncationDateRangesIsMutable(); + dataTruncationDateRanges_.add(m); + } else { + dataTruncationDateRangesBuilder_.addMessage(m); + } + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int dataTruncationType_ = 0; + + /** + * + * + *
+       * The type of data truncation.
+       * 
+ * + * + * optional .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.DataTruncationType data_truncation_type = 1; + * + * + * @return Whether the dataTruncationType field is set. + */ + @java.lang.Override + public boolean hasDataTruncationType() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+       * The type of data truncation.
+       * 
+ * + * + * optional .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.DataTruncationType data_truncation_type = 1; + * + * + * @return The enum numeric value on the wire for dataTruncationType. + */ + @java.lang.Override + public int getDataTruncationTypeValue() { + return dataTruncationType_; + } + + /** + * + * + *
+       * The type of data truncation.
+       * 
+ * + * + * optional .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.DataTruncationType data_truncation_type = 1; + * + * + * @param value The enum numeric value on the wire for dataTruncationType to set. + * @return This builder for chaining. + */ + public Builder setDataTruncationTypeValue(int value) { + dataTruncationType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * The type of data truncation.
+       * 
+ * + * + * optional .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.DataTruncationType data_truncation_type = 1; + * + * + * @return The dataTruncationType. + */ + @java.lang.Override + public com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationType + getDataTruncationType() { + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.DataTruncationType + result = + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationType.forNumber(dataTruncationType_); + return result == null + ? com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationType.UNRECOGNIZED + : result; + } + + /** + * + * + *
+       * The type of data truncation.
+       * 
+ * + * + * optional .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.DataTruncationType data_truncation_type = 1; + * + * + * @param value The dataTruncationType to set. + * @return This builder for chaining. + */ + public Builder setDataTruncationType( + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.DataTruncationType + value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + dataTruncationType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+       * The type of data truncation.
+       * 
+ * + * + * optional .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.DataTruncationType data_truncation_type = 1; + * + * + * @return This builder for chaining. + */ + public Builder clearDataTruncationType() { + bitField0_ = (bitField0_ & ~0x00000001); + dataTruncationType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object dataTruncationMessage_ = ""; + + /** + * + * + *
+       * A descriptive message explaining the data truncation.
+       * 
+ * + * optional string data_truncation_message = 2; + * + * @return Whether the dataTruncationMessage field is set. + */ + public boolean hasDataTruncationMessage() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+       * A descriptive message explaining the data truncation.
+       * 
+ * + * optional string data_truncation_message = 2; + * + * @return The dataTruncationMessage. + */ + public java.lang.String getDataTruncationMessage() { + java.lang.Object ref = dataTruncationMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataTruncationMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * A descriptive message explaining the data truncation.
+       * 
+ * + * optional string data_truncation_message = 2; + * + * @return The bytes for dataTruncationMessage. + */ + public com.google.protobuf.ByteString getDataTruncationMessageBytes() { + java.lang.Object ref = dataTruncationMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataTruncationMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * A descriptive message explaining the data truncation.
+       * 
+ * + * optional string data_truncation_message = 2; + * + * @param value The dataTruncationMessage to set. + * @return This builder for chaining. + */ + public Builder setDataTruncationMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + dataTruncationMessage_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * A descriptive message explaining the data truncation.
+       * 
+ * + * optional string data_truncation_message = 2; + * + * @return This builder for chaining. + */ + public Builder clearDataTruncationMessage() { + dataTruncationMessage_ = getDefaultInstance().getDataTruncationMessage(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+       * A descriptive message explaining the data truncation.
+       * 
+ * + * optional string data_truncation_message = 2; + * + * @param value The bytes for dataTruncationMessage to set. + * @return This builder for chaining. + */ + public Builder setDataTruncationMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + dataTruncationMessage_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object dataTruncationDate_ = ""; + + /** + * + * + *
+       * The data truncation date in the format YYYY-MM-DD.
+       * Indicates data before this date is truncated.
+       * 
+ * + * optional string data_truncation_date = 3; + * + * @return Whether the dataTruncationDate field is set. + */ + public boolean hasDataTruncationDate() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+       * The data truncation date in the format YYYY-MM-DD.
+       * Indicates data before this date is truncated.
+       * 
+ * + * optional string data_truncation_date = 3; + * + * @return The dataTruncationDate. + */ + public java.lang.String getDataTruncationDate() { + java.lang.Object ref = dataTruncationDate_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataTruncationDate_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * The data truncation date in the format YYYY-MM-DD.
+       * Indicates data before this date is truncated.
+       * 
+ * + * optional string data_truncation_date = 3; + * + * @return The bytes for dataTruncationDate. + */ + public com.google.protobuf.ByteString getDataTruncationDateBytes() { + java.lang.Object ref = dataTruncationDate_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataTruncationDate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * The data truncation date in the format YYYY-MM-DD.
+       * Indicates data before this date is truncated.
+       * 
+ * + * optional string data_truncation_date = 3; + * + * @param value The dataTruncationDate to set. + * @return This builder for chaining. + */ + public Builder setDataTruncationDate(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + dataTruncationDate_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+       * The data truncation date in the format YYYY-MM-DD.
+       * Indicates data before this date is truncated.
+       * 
+ * + * optional string data_truncation_date = 3; + * + * @return This builder for chaining. + */ + public Builder clearDataTruncationDate() { + dataTruncationDate_ = getDefaultInstance().getDataTruncationDate(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+       * The data truncation date in the format YYYY-MM-DD.
+       * Indicates data before this date is truncated.
+       * 
+ * + * optional string data_truncation_date = 3; + * + * @param value The bytes for dataTruncationDate to set. + * @return This builder for chaining. + */ + public Builder setDataTruncationDateBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + dataTruncationDate_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.util.List< + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRange> + dataTruncationDateRanges_ = java.util.Collections.emptyList(); + + private void ensureDataTruncationDateRangesIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + dataTruncationDateRanges_ = + new java.util.ArrayList< + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRange>(dataTruncationDateRanges_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRange, + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRange.Builder, + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRangeOrBuilder> + dataTruncationDateRangesBuilder_; + + /** + * + * + *
+       * The truncated date ranges.
+       * 
+ * + * + * repeated .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.DataTruncationDateRange data_truncation_date_ranges = 4; + * + */ + public java.util.List< + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRange> + getDataTruncationDateRangesList() { + if (dataTruncationDateRangesBuilder_ == null) { + return java.util.Collections.unmodifiableList(dataTruncationDateRanges_); + } else { + return dataTruncationDateRangesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+       * The truncated date ranges.
+       * 
+ * + * + * repeated .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.DataTruncationDateRange data_truncation_date_ranges = 4; + * + */ + public int getDataTruncationDateRangesCount() { + if (dataTruncationDateRangesBuilder_ == null) { + return dataTruncationDateRanges_.size(); + } else { + return dataTruncationDateRangesBuilder_.getCount(); + } + } + + /** + * + * + *
+       * The truncated date ranges.
+       * 
+ * + * + * repeated .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.DataTruncationDateRange data_truncation_date_ranges = 4; + * + */ + public com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRange + getDataTruncationDateRanges(int index) { + if (dataTruncationDateRangesBuilder_ == null) { + return dataTruncationDateRanges_.get(index); + } else { + return dataTruncationDateRangesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+       * The truncated date ranges.
+       * 
+ * + * + * repeated .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.DataTruncationDateRange data_truncation_date_ranges = 4; + * + */ + public Builder setDataTruncationDateRanges( + int index, + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRange + value) { + if (dataTruncationDateRangesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataTruncationDateRangesIsMutable(); + dataTruncationDateRanges_.set(index, value); + onChanged(); + } else { + dataTruncationDateRangesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+       * The truncated date ranges.
+       * 
+ * + * + * repeated .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.DataTruncationDateRange data_truncation_date_ranges = 4; + * + */ + public Builder setDataTruncationDateRanges( + int index, + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRange.Builder + builderForValue) { + if (dataTruncationDateRangesBuilder_ == null) { + ensureDataTruncationDateRangesIsMutable(); + dataTruncationDateRanges_.set(index, builderForValue.build()); + onChanged(); + } else { + dataTruncationDateRangesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+       * The truncated date ranges.
+       * 
+ * + * + * repeated .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.DataTruncationDateRange data_truncation_date_ranges = 4; + * + */ + public Builder addDataTruncationDateRanges( + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRange + value) { + if (dataTruncationDateRangesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataTruncationDateRangesIsMutable(); + dataTruncationDateRanges_.add(value); + onChanged(); + } else { + dataTruncationDateRangesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+       * The truncated date ranges.
+       * 
+ * + * + * repeated .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.DataTruncationDateRange data_truncation_date_ranges = 4; + * + */ + public Builder addDataTruncationDateRanges( + int index, + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRange + value) { + if (dataTruncationDateRangesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataTruncationDateRangesIsMutable(); + dataTruncationDateRanges_.add(index, value); + onChanged(); + } else { + dataTruncationDateRangesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+       * The truncated date ranges.
+       * 
+ * + * + * repeated .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.DataTruncationDateRange data_truncation_date_ranges = 4; + * + */ + public Builder addDataTruncationDateRanges( + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRange.Builder + builderForValue) { + if (dataTruncationDateRangesBuilder_ == null) { + ensureDataTruncationDateRangesIsMutable(); + dataTruncationDateRanges_.add(builderForValue.build()); + onChanged(); + } else { + dataTruncationDateRangesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+       * The truncated date ranges.
+       * 
+ * + * + * repeated .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.DataTruncationDateRange data_truncation_date_ranges = 4; + * + */ + public Builder addDataTruncationDateRanges( + int index, + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRange.Builder + builderForValue) { + if (dataTruncationDateRangesBuilder_ == null) { + ensureDataTruncationDateRangesIsMutable(); + dataTruncationDateRanges_.add(index, builderForValue.build()); + onChanged(); + } else { + dataTruncationDateRangesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+       * The truncated date ranges.
+       * 
+ * + * + * repeated .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.DataTruncationDateRange data_truncation_date_ranges = 4; + * + */ + public Builder addAllDataTruncationDateRanges( + java.lang.Iterable< + ? extends + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRange> + values) { + if (dataTruncationDateRangesBuilder_ == null) { + ensureDataTruncationDateRangesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dataTruncationDateRanges_); + onChanged(); + } else { + dataTruncationDateRangesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+       * The truncated date ranges.
+       * 
+ * + * + * repeated .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.DataTruncationDateRange data_truncation_date_ranges = 4; + * + */ + public Builder clearDataTruncationDateRanges() { + if (dataTruncationDateRangesBuilder_ == null) { + dataTruncationDateRanges_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + dataTruncationDateRangesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+       * The truncated date ranges.
+       * 
+ * + * + * repeated .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.DataTruncationDateRange data_truncation_date_ranges = 4; + * + */ + public Builder removeDataTruncationDateRanges(int index) { + if (dataTruncationDateRangesBuilder_ == null) { + ensureDataTruncationDateRangesIsMutable(); + dataTruncationDateRanges_.remove(index); + onChanged(); + } else { + dataTruncationDateRangesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+       * The truncated date ranges.
+       * 
+ * + * + * repeated .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.DataTruncationDateRange data_truncation_date_ranges = 4; + * + */ + public com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRange.Builder + getDataTruncationDateRangesBuilder(int index) { + return internalGetDataTruncationDateRangesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+       * The truncated date ranges.
+       * 
+ * + * + * repeated .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.DataTruncationDateRange data_truncation_date_ranges = 4; + * + */ + public com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRangeOrBuilder + getDataTruncationDateRangesOrBuilder(int index) { + if (dataTruncationDateRangesBuilder_ == null) { + return dataTruncationDateRanges_.get(index); + } else { + return dataTruncationDateRangesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+       * The truncated date ranges.
+       * 
+ * + * + * repeated .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.DataTruncationDateRange data_truncation_date_ranges = 4; + * + */ + public java.util.List< + ? extends + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRangeOrBuilder> + getDataTruncationDateRangesOrBuilderList() { + if (dataTruncationDateRangesBuilder_ != null) { + return dataTruncationDateRangesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(dataTruncationDateRanges_); + } + } + + /** + * + * + *
+       * The truncated date ranges.
+       * 
+ * + * + * repeated .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.DataTruncationDateRange data_truncation_date_ranges = 4; + * + */ + public com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRange.Builder + addDataTruncationDateRangesBuilder() { + return internalGetDataTruncationDateRangesFieldBuilder() + .addBuilder( + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRange.getDefaultInstance()); + } + + /** + * + * + *
+       * The truncated date ranges.
+       * 
+ * + * + * repeated .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.DataTruncationDateRange data_truncation_date_ranges = 4; + * + */ + public com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRange.Builder + addDataTruncationDateRangesBuilder(int index) { + return internalGetDataTruncationDateRangesFieldBuilder() + .addBuilder( + index, + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRange.getDefaultInstance()); + } + + /** + * + * + *
+       * The truncated date ranges.
+       * 
+ * + * + * repeated .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.DataTruncationDateRange data_truncation_date_ranges = 4; + * + */ + public java.util.List< + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRange.Builder> + getDataTruncationDateRangesBuilderList() { + return internalGetDataTruncationDateRangesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRange, + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRange.Builder, + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRangeOrBuilder> + internalGetDataTruncationDateRangesFieldBuilder() { + if (dataTruncationDateRangesBuilder_ == null) { + dataTruncationDateRangesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRange, + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRange.Builder, + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .DataTruncationDateRangeOrBuilder>( + dataTruncationDateRanges_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + dataTruncationDateRanges_ = null; + } + return dataTruncationDateRangesBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason) + } + + // @@protoc_insertion_point(class_scope:google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason) + private static final com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason(); + } + + public static com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DataTruncationReason parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + private int bitField0_; public static final int DATA_LOSS_FROM_OTHER_ROW_FIELD_NUMBER = 3; private boolean dataLossFromOtherRow_ = false; @@ -3103,6 +6424,98 @@ public com.google.analytics.data.v1alpha.Section getSection() { return result == null ? com.google.analytics.data.v1alpha.Section.UNRECOGNIZED : result; } + public static final int DATA_TRUNCATION_REASONS_FIELD_NUMBER = 11; + + @SuppressWarnings("serial") + private java.util.List + dataTruncationReasons_; + + /** + * + * + *
+   * If set, indicate there is data truncation in the report.
+   * 
+ * + * + * repeated .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason data_truncation_reasons = 11; + * + */ + @java.lang.Override + public java.util.List + getDataTruncationReasonsList() { + return dataTruncationReasons_; + } + + /** + * + * + *
+   * If set, indicate there is data truncation in the report.
+   * 
+ * + * + * repeated .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason data_truncation_reasons = 11; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReasonOrBuilder> + getDataTruncationReasonsOrBuilderList() { + return dataTruncationReasons_; + } + + /** + * + * + *
+   * If set, indicate there is data truncation in the report.
+   * 
+ * + * + * repeated .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason data_truncation_reasons = 11; + * + */ + @java.lang.Override + public int getDataTruncationReasonsCount() { + return dataTruncationReasons_.size(); + } + + /** + * + * + *
+   * If set, indicate there is data truncation in the report.
+   * 
+ * + * + * repeated .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason data_truncation_reasons = 11; + * + */ + @java.lang.Override + public com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + getDataTruncationReasons(int index) { + return dataTruncationReasons_.get(index); + } + + /** + * + * + *
+   * If set, indicate there is data truncation in the report.
+   * 
+ * + * + * repeated .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason data_truncation_reasons = 11; + * + */ + @java.lang.Override + public com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReasonOrBuilder + getDataTruncationReasonsOrBuilder(int index) { + return dataTruncationReasons_.get(index); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -3141,6 +6554,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (section_ != com.google.analytics.data.v1alpha.Section.SECTION_UNSPECIFIED.getNumber()) { output.writeEnum(10, section_); } + for (int i = 0; i < dataTruncationReasons_.size(); i++) { + output.writeMessage(11, dataTruncationReasons_.get(i)); + } getUnknownFields().writeTo(output); } @@ -3177,6 +6593,11 @@ public int getSerializedSize() { if (section_ != com.google.analytics.data.v1alpha.Section.SECTION_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(10, section_); } + for (int i = 0; i < dataTruncationReasons_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 11, dataTruncationReasons_.get(i)); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -3217,6 +6638,7 @@ public boolean equals(final java.lang.Object obj) { } if (!getSamplingMetadatasList().equals(other.getSamplingMetadatasList())) return false; if (section_ != other.section_) return false; + if (!getDataTruncationReasonsList().equals(other.getDataTruncationReasonsList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -3256,6 +6678,10 @@ public int hashCode() { } hash = (37 * hash) + SECTION_FIELD_NUMBER; hash = (53 * hash) + section_; + if (getDataTruncationReasonsCount() > 0) { + hash = (37 * hash) + DATA_TRUNCATION_REASONS_FIELD_NUMBER; + hash = (53 * hash) + getDataTruncationReasonsList().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -3399,6 +6825,7 @@ private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { internalGetSchemaRestrictionResponseFieldBuilder(); internalGetSamplingMetadatasFieldBuilder(); + internalGetDataTruncationReasonsFieldBuilder(); } } @@ -3424,6 +6851,13 @@ public Builder clear() { } bitField0_ = (bitField0_ & ~0x00000040); section_ = 0; + if (dataTruncationReasonsBuilder_ == null) { + dataTruncationReasons_ = java.util.Collections.emptyList(); + } else { + dataTruncationReasons_ = null; + dataTruncationReasonsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000100); return this; } @@ -3470,6 +6904,15 @@ private void buildPartialRepeatedFields( } else { result.samplingMetadatas_ = samplingMetadatasBuilder_.build(); } + if (dataTruncationReasonsBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0)) { + dataTruncationReasons_ = java.util.Collections.unmodifiableList(dataTruncationReasons_); + bitField0_ = (bitField0_ & ~0x00000100); + } + result.dataTruncationReasons_ = dataTruncationReasons_; + } else { + result.dataTruncationReasons_ = dataTruncationReasonsBuilder_.build(); + } } private void buildPartial0(com.google.analytics.data.v1alpha.ResponseMetaData result) { @@ -3567,13 +7010,40 @@ public Builder mergeFrom(com.google.analytics.data.v1alpha.ResponseMetaData othe ? internalGetSamplingMetadatasFieldBuilder() : null; } else { - samplingMetadatasBuilder_.addAllMessages(other.samplingMetadatas_); + samplingMetadatasBuilder_.addAllMessages(other.samplingMetadatas_); + } + } + } + if (other.section_ != 0) { + setSectionValue(other.getSectionValue()); + } + if (dataTruncationReasonsBuilder_ == null) { + if (!other.dataTruncationReasons_.isEmpty()) { + if (dataTruncationReasons_.isEmpty()) { + dataTruncationReasons_ = other.dataTruncationReasons_; + bitField0_ = (bitField0_ & ~0x00000100); + } else { + ensureDataTruncationReasonsIsMutable(); + dataTruncationReasons_.addAll(other.dataTruncationReasons_); + } + onChanged(); + } + } else { + if (!other.dataTruncationReasons_.isEmpty()) { + if (dataTruncationReasonsBuilder_.isEmpty()) { + dataTruncationReasonsBuilder_.dispose(); + dataTruncationReasonsBuilder_ = null; + dataTruncationReasons_ = other.dataTruncationReasons_; + bitField0_ = (bitField0_ & ~0x00000100); + dataTruncationReasonsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetDataTruncationReasonsFieldBuilder() + : null; + } else { + dataTruncationReasonsBuilder_.addAllMessages(other.dataTruncationReasons_); } } } - if (other.section_ != 0) { - setSectionValue(other.getSectionValue()); - } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -3658,6 +7128,21 @@ public Builder mergeFrom( bitField0_ |= 0x00000080; break; } // case 80 + case 90: + { + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason m = + input.readMessage( + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .parser(), + extensionRegistry); + if (dataTruncationReasonsBuilder_ == null) { + ensureDataTruncationReasonsIsMutable(); + dataTruncationReasons_.add(m); + } else { + dataTruncationReasonsBuilder_.addMessage(m); + } + break; + } // case 90 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -4220,75 +7705,323 @@ public boolean hasTimeZone() { * * *
-     * The property's current timezone. Intended to be used to interpret
-     * time-based dimensions like `hour` and `minute`. Formatted as strings from
-     * the IANA Time Zone database (https://www.iana.org/time-zones); for example
-     * "America/New_York" or "Asia/Tokyo".
+     * The property's current timezone. Intended to be used to interpret
+     * time-based dimensions like `hour` and `minute`. Formatted as strings from
+     * the IANA Time Zone database (https://www.iana.org/time-zones); for example
+     * "America/New_York" or "Asia/Tokyo".
+     * 
+ * + * optional string time_zone = 6; + * + * @return The timeZone. + */ + public java.lang.String getTimeZone() { + java.lang.Object ref = timeZone_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + timeZone_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The property's current timezone. Intended to be used to interpret
+     * time-based dimensions like `hour` and `minute`. Formatted as strings from
+     * the IANA Time Zone database (https://www.iana.org/time-zones); for example
+     * "America/New_York" or "Asia/Tokyo".
+     * 
+ * + * optional string time_zone = 6; + * + * @return The bytes for timeZone. + */ + public com.google.protobuf.ByteString getTimeZoneBytes() { + java.lang.Object ref = timeZone_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + timeZone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The property's current timezone. Intended to be used to interpret
+     * time-based dimensions like `hour` and `minute`. Formatted as strings from
+     * the IANA Time Zone database (https://www.iana.org/time-zones); for example
+     * "America/New_York" or "Asia/Tokyo".
+     * 
+ * + * optional string time_zone = 6; + * + * @param value The timeZone to set. + * @return This builder for chaining. + */ + public Builder setTimeZone(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + timeZone_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * The property's current timezone. Intended to be used to interpret
+     * time-based dimensions like `hour` and `minute`. Formatted as strings from
+     * the IANA Time Zone database (https://www.iana.org/time-zones); for example
+     * "America/New_York" or "Asia/Tokyo".
+     * 
+ * + * optional string time_zone = 6; + * + * @return This builder for chaining. + */ + public Builder clearTimeZone() { + timeZone_ = getDefaultInstance().getTimeZone(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * The property's current timezone. Intended to be used to interpret
+     * time-based dimensions like `hour` and `minute`. Formatted as strings from
+     * the IANA Time Zone database (https://www.iana.org/time-zones); for example
+     * "America/New_York" or "Asia/Tokyo".
+     * 
+ * + * optional string time_zone = 6; + * + * @param value The bytes for timeZone to set. + * @return This builder for chaining. + */ + public Builder setTimeZoneBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + timeZone_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object emptyReason_ = ""; + + /** + * + * + *
+     * If empty reason is specified, the report is empty for this reason.
+     * 
+ * + * optional string empty_reason = 7; + * + * @return Whether the emptyReason field is set. + */ + public boolean hasEmptyReason() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+     * If empty reason is specified, the report is empty for this reason.
+     * 
+ * + * optional string empty_reason = 7; + * + * @return The emptyReason. + */ + public java.lang.String getEmptyReason() { + java.lang.Object ref = emptyReason_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + emptyReason_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * If empty reason is specified, the report is empty for this reason.
+     * 
+ * + * optional string empty_reason = 7; + * + * @return The bytes for emptyReason. + */ + public com.google.protobuf.ByteString getEmptyReasonBytes() { + java.lang.Object ref = emptyReason_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + emptyReason_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * If empty reason is specified, the report is empty for this reason.
+     * 
+ * + * optional string empty_reason = 7; + * + * @param value The emptyReason to set. + * @return This builder for chaining. + */ + public Builder setEmptyReason(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + emptyReason_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * If empty reason is specified, the report is empty for this reason.
+     * 
+ * + * optional string empty_reason = 7; + * + * @return This builder for chaining. + */ + public Builder clearEmptyReason() { + emptyReason_ = getDefaultInstance().getEmptyReason(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * If empty reason is specified, the report is empty for this reason.
+     * 
+ * + * optional string empty_reason = 7; + * + * @param value The bytes for emptyReason to set. + * @return This builder for chaining. + */ + public Builder setEmptyReasonBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + emptyReason_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private boolean subjectToThresholding_; + + /** + * + * + *
+     * If `subjectToThresholding` is true, this report is subject to thresholding
+     * and only returns data that meets the minimum aggregation thresholds. It is
+     * possible for a request to be subject to thresholding thresholding and no
+     * data is absent from the report, and this happens when all data is above the
+     * thresholds. To learn more, see [Data
+     * thresholds](https://support.google.com/analytics/answer/9383630) and [About
+     * Demographics and
+     * Interests](https://support.google.com/analytics/answer/2799357).
      * 
* - * optional string time_zone = 6; + * optional bool subject_to_thresholding = 8; * - * @return The timeZone. + * @return Whether the subjectToThresholding field is set. */ - public java.lang.String getTimeZone() { - java.lang.Object ref = timeZone_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - timeZone_ = s; - return s; - } else { - return (java.lang.String) ref; - } + @java.lang.Override + public boolean hasSubjectToThresholding() { + return ((bitField0_ & 0x00000020) != 0); } /** * * *
-     * The property's current timezone. Intended to be used to interpret
-     * time-based dimensions like `hour` and `minute`. Formatted as strings from
-     * the IANA Time Zone database (https://www.iana.org/time-zones); for example
-     * "America/New_York" or "Asia/Tokyo".
+     * If `subjectToThresholding` is true, this report is subject to thresholding
+     * and only returns data that meets the minimum aggregation thresholds. It is
+     * possible for a request to be subject to thresholding thresholding and no
+     * data is absent from the report, and this happens when all data is above the
+     * thresholds. To learn more, see [Data
+     * thresholds](https://support.google.com/analytics/answer/9383630) and [About
+     * Demographics and
+     * Interests](https://support.google.com/analytics/answer/2799357).
      * 
* - * optional string time_zone = 6; + * optional bool subject_to_thresholding = 8; * - * @return The bytes for timeZone. + * @return The subjectToThresholding. */ - public com.google.protobuf.ByteString getTimeZoneBytes() { - java.lang.Object ref = timeZone_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - timeZone_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + @java.lang.Override + public boolean getSubjectToThresholding() { + return subjectToThresholding_; } /** * * *
-     * The property's current timezone. Intended to be used to interpret
-     * time-based dimensions like `hour` and `minute`. Formatted as strings from
-     * the IANA Time Zone database (https://www.iana.org/time-zones); for example
-     * "America/New_York" or "Asia/Tokyo".
+     * If `subjectToThresholding` is true, this report is subject to thresholding
+     * and only returns data that meets the minimum aggregation thresholds. It is
+     * possible for a request to be subject to thresholding thresholding and no
+     * data is absent from the report, and this happens when all data is above the
+     * thresholds. To learn more, see [Data
+     * thresholds](https://support.google.com/analytics/answer/9383630) and [About
+     * Demographics and
+     * Interests](https://support.google.com/analytics/answer/2799357).
      * 
* - * optional string time_zone = 6; + * optional bool subject_to_thresholding = 8; * - * @param value The timeZone to set. + * @param value The subjectToThresholding to set. * @return This builder for chaining. */ - public Builder setTimeZone(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - timeZone_ = value; - bitField0_ |= 0x00000008; + public Builder setSubjectToThresholding(boolean value) { + + subjectToThresholding_ = value; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -4297,86 +8030,115 @@ public Builder setTimeZone(java.lang.String value) { * * *
-     * The property's current timezone. Intended to be used to interpret
-     * time-based dimensions like `hour` and `minute`. Formatted as strings from
-     * the IANA Time Zone database (https://www.iana.org/time-zones); for example
-     * "America/New_York" or "Asia/Tokyo".
+     * If `subjectToThresholding` is true, this report is subject to thresholding
+     * and only returns data that meets the minimum aggregation thresholds. It is
+     * possible for a request to be subject to thresholding thresholding and no
+     * data is absent from the report, and this happens when all data is above the
+     * thresholds. To learn more, see [Data
+     * thresholds](https://support.google.com/analytics/answer/9383630) and [About
+     * Demographics and
+     * Interests](https://support.google.com/analytics/answer/2799357).
      * 
* - * optional string time_zone = 6; + * optional bool subject_to_thresholding = 8; * * @return This builder for chaining. */ - public Builder clearTimeZone() { - timeZone_ = getDefaultInstance().getTimeZone(); - bitField0_ = (bitField0_ & ~0x00000008); + public Builder clearSubjectToThresholding() { + bitField0_ = (bitField0_ & ~0x00000020); + subjectToThresholding_ = false; onChanged(); return this; } + private java.util.List samplingMetadatas_ = + java.util.Collections.emptyList(); + + private void ensureSamplingMetadatasIsMutable() { + if (!((bitField0_ & 0x00000040) != 0)) { + samplingMetadatas_ = + new java.util.ArrayList( + samplingMetadatas_); + bitField0_ |= 0x00000040; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.analytics.data.v1alpha.SamplingMetadata, + com.google.analytics.data.v1alpha.SamplingMetadata.Builder, + com.google.analytics.data.v1alpha.SamplingMetadataOrBuilder> + samplingMetadatasBuilder_; + /** * * *
-     * The property's current timezone. Intended to be used to interpret
-     * time-based dimensions like `hour` and `minute`. Formatted as strings from
-     * the IANA Time Zone database (https://www.iana.org/time-zones); for example
-     * "America/New_York" or "Asia/Tokyo".
-     * 
+ * If this report results is + * [sampled](https://support.google.com/analytics/answer/13331292), this + * describes the percentage of events used in this report. One + * `samplingMetadatas` is populated for each date range. Each + * `samplingMetadatas` corresponds to a date range in order that date ranges + * were specified in the request. * - * optional string time_zone = 6; + * However if the results are not sampled, this field will not be defined. + * * - * @param value The bytes for timeZone to set. - * @return This builder for chaining. + * repeated .google.analytics.data.v1alpha.SamplingMetadata sampling_metadatas = 9; */ - public Builder setTimeZoneBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + public java.util.List + getSamplingMetadatasList() { + if (samplingMetadatasBuilder_ == null) { + return java.util.Collections.unmodifiableList(samplingMetadatas_); + } else { + return samplingMetadatasBuilder_.getMessageList(); } - checkByteStringIsUtf8(value); - timeZone_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; } - private java.lang.Object emptyReason_ = ""; - /** * * *
-     * If empty reason is specified, the report is empty for this reason.
-     * 
+ * If this report results is + * [sampled](https://support.google.com/analytics/answer/13331292), this + * describes the percentage of events used in this report. One + * `samplingMetadatas` is populated for each date range. Each + * `samplingMetadatas` corresponds to a date range in order that date ranges + * were specified in the request. * - * optional string empty_reason = 7; + * However if the results are not sampled, this field will not be defined. + * * - * @return Whether the emptyReason field is set. + * repeated .google.analytics.data.v1alpha.SamplingMetadata sampling_metadatas = 9; */ - public boolean hasEmptyReason() { - return ((bitField0_ & 0x00000010) != 0); + public int getSamplingMetadatasCount() { + if (samplingMetadatasBuilder_ == null) { + return samplingMetadatas_.size(); + } else { + return samplingMetadatasBuilder_.getCount(); + } } /** * * *
-     * If empty reason is specified, the report is empty for this reason.
-     * 
+ * If this report results is + * [sampled](https://support.google.com/analytics/answer/13331292), this + * describes the percentage of events used in this report. One + * `samplingMetadatas` is populated for each date range. Each + * `samplingMetadatas` corresponds to a date range in order that date ranges + * were specified in the request. * - * optional string empty_reason = 7; + * However if the results are not sampled, this field will not be defined. + * * - * @return The emptyReason. + * repeated .google.analytics.data.v1alpha.SamplingMetadata sampling_metadatas = 9; */ - public java.lang.String getEmptyReason() { - java.lang.Object ref = emptyReason_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - emptyReason_ = s; - return s; + public com.google.analytics.data.v1alpha.SamplingMetadata getSamplingMetadatas(int index) { + if (samplingMetadatasBuilder_ == null) { + return samplingMetadatas_.get(index); } else { - return (java.lang.String) ref; + return samplingMetadatasBuilder_.getMessage(index); } } @@ -4384,44 +8146,88 @@ public java.lang.String getEmptyReason() { * * *
-     * If empty reason is specified, the report is empty for this reason.
+     * If this report results is
+     * [sampled](https://support.google.com/analytics/answer/13331292), this
+     * describes the percentage of events used in this report. One
+     * `samplingMetadatas` is populated for each date range. Each
+     * `samplingMetadatas` corresponds to a date range in order that date ranges
+     * were specified in the request.
+     *
+     * However if the results are not sampled, this field will not be defined.
      * 
* - * optional string empty_reason = 7; + * repeated .google.analytics.data.v1alpha.SamplingMetadata sampling_metadatas = 9; + */ + public Builder setSamplingMetadatas( + int index, com.google.analytics.data.v1alpha.SamplingMetadata value) { + if (samplingMetadatasBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSamplingMetadatasIsMutable(); + samplingMetadatas_.set(index, value); + onChanged(); + } else { + samplingMetadatasBuilder_.setMessage(index, value); + } + return this; + } + + /** * - * @return The bytes for emptyReason. + * + *
+     * If this report results is
+     * [sampled](https://support.google.com/analytics/answer/13331292), this
+     * describes the percentage of events used in this report. One
+     * `samplingMetadatas` is populated for each date range. Each
+     * `samplingMetadatas` corresponds to a date range in order that date ranges
+     * were specified in the request.
+     *
+     * However if the results are not sampled, this field will not be defined.
+     * 
+ * + * repeated .google.analytics.data.v1alpha.SamplingMetadata sampling_metadatas = 9; */ - public com.google.protobuf.ByteString getEmptyReasonBytes() { - java.lang.Object ref = emptyReason_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - emptyReason_ = b; - return b; + public Builder setSamplingMetadatas( + int index, com.google.analytics.data.v1alpha.SamplingMetadata.Builder builderForValue) { + if (samplingMetadatasBuilder_ == null) { + ensureSamplingMetadatasIsMutable(); + samplingMetadatas_.set(index, builderForValue.build()); + onChanged(); } else { - return (com.google.protobuf.ByteString) ref; + samplingMetadatasBuilder_.setMessage(index, builderForValue.build()); } + return this; } /** * * *
-     * If empty reason is specified, the report is empty for this reason.
-     * 
+ * If this report results is + * [sampled](https://support.google.com/analytics/answer/13331292), this + * describes the percentage of events used in this report. One + * `samplingMetadatas` is populated for each date range. Each + * `samplingMetadatas` corresponds to a date range in order that date ranges + * were specified in the request. * - * optional string empty_reason = 7; + * However if the results are not sampled, this field will not be defined. + * * - * @param value The emptyReason to set. - * @return This builder for chaining. + * repeated .google.analytics.data.v1alpha.SamplingMetadata sampling_metadatas = 9; */ - public Builder setEmptyReason(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public Builder addSamplingMetadatas(com.google.analytics.data.v1alpha.SamplingMetadata value) { + if (samplingMetadatasBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSamplingMetadatasIsMutable(); + samplingMetadatas_.add(value); + onChanged(); + } else { + samplingMetadatasBuilder_.addMessage(value); } - emptyReason_ = value; - bitField0_ |= 0x00000010; - onChanged(); return this; } @@ -4429,17 +8235,30 @@ public Builder setEmptyReason(java.lang.String value) { * * *
-     * If empty reason is specified, the report is empty for this reason.
-     * 
+ * If this report results is + * [sampled](https://support.google.com/analytics/answer/13331292), this + * describes the percentage of events used in this report. One + * `samplingMetadatas` is populated for each date range. Each + * `samplingMetadatas` corresponds to a date range in order that date ranges + * were specified in the request. * - * optional string empty_reason = 7; + * However if the results are not sampled, this field will not be defined. + * * - * @return This builder for chaining. + * repeated .google.analytics.data.v1alpha.SamplingMetadata sampling_metadatas = 9; */ - public Builder clearEmptyReason() { - emptyReason_ = getDefaultInstance().getEmptyReason(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); + public Builder addSamplingMetadatas( + int index, com.google.analytics.data.v1alpha.SamplingMetadata value) { + if (samplingMetadatasBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSamplingMetadatasIsMutable(); + samplingMetadatas_.add(index, value); + onChanged(); + } else { + samplingMetadatasBuilder_.addMessage(index, value); + } return this; } @@ -4447,97 +8266,110 @@ public Builder clearEmptyReason() { * * *
-     * If empty reason is specified, the report is empty for this reason.
-     * 
+ * If this report results is + * [sampled](https://support.google.com/analytics/answer/13331292), this + * describes the percentage of events used in this report. One + * `samplingMetadatas` is populated for each date range. Each + * `samplingMetadatas` corresponds to a date range in order that date ranges + * were specified in the request. * - * optional string empty_reason = 7; + * However if the results are not sampled, this field will not be defined. + * * - * @param value The bytes for emptyReason to set. - * @return This builder for chaining. + * repeated .google.analytics.data.v1alpha.SamplingMetadata sampling_metadatas = 9; */ - public Builder setEmptyReasonBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + public Builder addSamplingMetadatas( + com.google.analytics.data.v1alpha.SamplingMetadata.Builder builderForValue) { + if (samplingMetadatasBuilder_ == null) { + ensureSamplingMetadatasIsMutable(); + samplingMetadatas_.add(builderForValue.build()); + onChanged(); + } else { + samplingMetadatasBuilder_.addMessage(builderForValue.build()); } - checkByteStringIsUtf8(value); - emptyReason_ = value; - bitField0_ |= 0x00000010; - onChanged(); return this; } - private boolean subjectToThresholding_; - /** * * *
-     * If `subjectToThresholding` is true, this report is subject to thresholding
-     * and only returns data that meets the minimum aggregation thresholds. It is
-     * possible for a request to be subject to thresholding thresholding and no
-     * data is absent from the report, and this happens when all data is above the
-     * thresholds. To learn more, see [Data
-     * thresholds](https://support.google.com/analytics/answer/9383630) and [About
-     * Demographics and
-     * Interests](https://support.google.com/analytics/answer/2799357).
-     * 
+ * If this report results is + * [sampled](https://support.google.com/analytics/answer/13331292), this + * describes the percentage of events used in this report. One + * `samplingMetadatas` is populated for each date range. Each + * `samplingMetadatas` corresponds to a date range in order that date ranges + * were specified in the request. * - * optional bool subject_to_thresholding = 8; + * However if the results are not sampled, this field will not be defined. + * * - * @return Whether the subjectToThresholding field is set. + * repeated .google.analytics.data.v1alpha.SamplingMetadata sampling_metadatas = 9; */ - @java.lang.Override - public boolean hasSubjectToThresholding() { - return ((bitField0_ & 0x00000020) != 0); + public Builder addSamplingMetadatas( + int index, com.google.analytics.data.v1alpha.SamplingMetadata.Builder builderForValue) { + if (samplingMetadatasBuilder_ == null) { + ensureSamplingMetadatasIsMutable(); + samplingMetadatas_.add(index, builderForValue.build()); + onChanged(); + } else { + samplingMetadatasBuilder_.addMessage(index, builderForValue.build()); + } + return this; } /** * * *
-     * If `subjectToThresholding` is true, this report is subject to thresholding
-     * and only returns data that meets the minimum aggregation thresholds. It is
-     * possible for a request to be subject to thresholding thresholding and no
-     * data is absent from the report, and this happens when all data is above the
-     * thresholds. To learn more, see [Data
-     * thresholds](https://support.google.com/analytics/answer/9383630) and [About
-     * Demographics and
-     * Interests](https://support.google.com/analytics/answer/2799357).
-     * 
+ * If this report results is + * [sampled](https://support.google.com/analytics/answer/13331292), this + * describes the percentage of events used in this report. One + * `samplingMetadatas` is populated for each date range. Each + * `samplingMetadatas` corresponds to a date range in order that date ranges + * were specified in the request. * - * optional bool subject_to_thresholding = 8; + * However if the results are not sampled, this field will not be defined. + * * - * @return The subjectToThresholding. + * repeated .google.analytics.data.v1alpha.SamplingMetadata sampling_metadatas = 9; */ - @java.lang.Override - public boolean getSubjectToThresholding() { - return subjectToThresholding_; + public Builder addAllSamplingMetadatas( + java.lang.Iterable values) { + if (samplingMetadatasBuilder_ == null) { + ensureSamplingMetadatasIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, samplingMetadatas_); + onChanged(); + } else { + samplingMetadatasBuilder_.addAllMessages(values); + } + return this; } /** * * *
-     * If `subjectToThresholding` is true, this report is subject to thresholding
-     * and only returns data that meets the minimum aggregation thresholds. It is
-     * possible for a request to be subject to thresholding thresholding and no
-     * data is absent from the report, and this happens when all data is above the
-     * thresholds. To learn more, see [Data
-     * thresholds](https://support.google.com/analytics/answer/9383630) and [About
-     * Demographics and
-     * Interests](https://support.google.com/analytics/answer/2799357).
-     * 
+ * If this report results is + * [sampled](https://support.google.com/analytics/answer/13331292), this + * describes the percentage of events used in this report. One + * `samplingMetadatas` is populated for each date range. Each + * `samplingMetadatas` corresponds to a date range in order that date ranges + * were specified in the request. * - * optional bool subject_to_thresholding = 8; + * However if the results are not sampled, this field will not be defined. + * * - * @param value The subjectToThresholding to set. - * @return This builder for chaining. + * repeated .google.analytics.data.v1alpha.SamplingMetadata sampling_metadatas = 9; */ - public Builder setSubjectToThresholding(boolean value) { - - subjectToThresholding_ = value; - bitField0_ |= 0x00000020; - onChanged(); + public Builder clearSamplingMetadatas() { + if (samplingMetadatasBuilder_ == null) { + samplingMetadatas_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + } else { + samplingMetadatasBuilder_.clear(); + } return this; } @@ -4545,45 +8377,29 @@ public Builder setSubjectToThresholding(boolean value) { * * *
-     * If `subjectToThresholding` is true, this report is subject to thresholding
-     * and only returns data that meets the minimum aggregation thresholds. It is
-     * possible for a request to be subject to thresholding thresholding and no
-     * data is absent from the report, and this happens when all data is above the
-     * thresholds. To learn more, see [Data
-     * thresholds](https://support.google.com/analytics/answer/9383630) and [About
-     * Demographics and
-     * Interests](https://support.google.com/analytics/answer/2799357).
-     * 
+ * If this report results is + * [sampled](https://support.google.com/analytics/answer/13331292), this + * describes the percentage of events used in this report. One + * `samplingMetadatas` is populated for each date range. Each + * `samplingMetadatas` corresponds to a date range in order that date ranges + * were specified in the request. * - * optional bool subject_to_thresholding = 8; + * However if the results are not sampled, this field will not be defined. + * * - * @return This builder for chaining. + * repeated .google.analytics.data.v1alpha.SamplingMetadata sampling_metadatas = 9; */ - public Builder clearSubjectToThresholding() { - bitField0_ = (bitField0_ & ~0x00000020); - subjectToThresholding_ = false; - onChanged(); - return this; - } - - private java.util.List samplingMetadatas_ = - java.util.Collections.emptyList(); - - private void ensureSamplingMetadatasIsMutable() { - if (!((bitField0_ & 0x00000040) != 0)) { - samplingMetadatas_ = - new java.util.ArrayList( - samplingMetadatas_); - bitField0_ |= 0x00000040; + public Builder removeSamplingMetadatas(int index) { + if (samplingMetadatasBuilder_ == null) { + ensureSamplingMetadatasIsMutable(); + samplingMetadatas_.remove(index); + onChanged(); + } else { + samplingMetadatasBuilder_.remove(index); } + return this; } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.analytics.data.v1alpha.SamplingMetadata, - com.google.analytics.data.v1alpha.SamplingMetadata.Builder, - com.google.analytics.data.v1alpha.SamplingMetadataOrBuilder> - samplingMetadatasBuilder_; - /** * * @@ -4600,13 +8416,9 @@ private void ensureSamplingMetadatasIsMutable() { * * repeated .google.analytics.data.v1alpha.SamplingMetadata sampling_metadatas = 9; */ - public java.util.List - getSamplingMetadatasList() { - if (samplingMetadatasBuilder_ == null) { - return java.util.Collections.unmodifiableList(samplingMetadatas_); - } else { - return samplingMetadatasBuilder_.getMessageList(); - } + public com.google.analytics.data.v1alpha.SamplingMetadata.Builder getSamplingMetadatasBuilder( + int index) { + return internalGetSamplingMetadatasFieldBuilder().getBuilder(index); } /** @@ -4625,11 +8437,12 @@ private void ensureSamplingMetadatasIsMutable() { * * repeated .google.analytics.data.v1alpha.SamplingMetadata sampling_metadatas = 9; */ - public int getSamplingMetadatasCount() { + public com.google.analytics.data.v1alpha.SamplingMetadataOrBuilder + getSamplingMetadatasOrBuilder(int index) { if (samplingMetadatasBuilder_ == null) { - return samplingMetadatas_.size(); + return samplingMetadatas_.get(index); } else { - return samplingMetadatasBuilder_.getCount(); + return samplingMetadatasBuilder_.getMessageOrBuilder(index); } } @@ -4649,11 +8462,12 @@ public int getSamplingMetadatasCount() { * * repeated .google.analytics.data.v1alpha.SamplingMetadata sampling_metadatas = 9; */ - public com.google.analytics.data.v1alpha.SamplingMetadata getSamplingMetadatas(int index) { - if (samplingMetadatasBuilder_ == null) { - return samplingMetadatas_.get(index); + public java.util.List + getSamplingMetadatasOrBuilderList() { + if (samplingMetadatasBuilder_ != null) { + return samplingMetadatasBuilder_.getMessageOrBuilderList(); } else { - return samplingMetadatasBuilder_.getMessage(index); + return java.util.Collections.unmodifiableList(samplingMetadatas_); } } @@ -4673,19 +8487,10 @@ public com.google.analytics.data.v1alpha.SamplingMetadata getSamplingMetadatas(i * * repeated .google.analytics.data.v1alpha.SamplingMetadata sampling_metadatas = 9; */ - public Builder setSamplingMetadatas( - int index, com.google.analytics.data.v1alpha.SamplingMetadata value) { - if (samplingMetadatasBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSamplingMetadatasIsMutable(); - samplingMetadatas_.set(index, value); - onChanged(); - } else { - samplingMetadatasBuilder_.setMessage(index, value); - } - return this; + public com.google.analytics.data.v1alpha.SamplingMetadata.Builder + addSamplingMetadatasBuilder() { + return internalGetSamplingMetadatasFieldBuilder() + .addBuilder(com.google.analytics.data.v1alpha.SamplingMetadata.getDefaultInstance()); } /** @@ -4704,16 +8509,11 @@ public Builder setSamplingMetadatas( * * repeated .google.analytics.data.v1alpha.SamplingMetadata sampling_metadatas = 9; */ - public Builder setSamplingMetadatas( - int index, com.google.analytics.data.v1alpha.SamplingMetadata.Builder builderForValue) { - if (samplingMetadatasBuilder_ == null) { - ensureSamplingMetadatasIsMutable(); - samplingMetadatas_.set(index, builderForValue.build()); - onChanged(); - } else { - samplingMetadatasBuilder_.setMessage(index, builderForValue.build()); - } - return this; + public com.google.analytics.data.v1alpha.SamplingMetadata.Builder addSamplingMetadatasBuilder( + int index) { + return internalGetSamplingMetadatasFieldBuilder() + .addBuilder( + index, com.google.analytics.data.v1alpha.SamplingMetadata.getDefaultInstance()); } /** @@ -4732,17 +8532,65 @@ public Builder setSamplingMetadatas( * * repeated .google.analytics.data.v1alpha.SamplingMetadata sampling_metadatas = 9; */ - public Builder addSamplingMetadatas(com.google.analytics.data.v1alpha.SamplingMetadata value) { + public java.util.List + getSamplingMetadatasBuilderList() { + return internalGetSamplingMetadatasFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.analytics.data.v1alpha.SamplingMetadata, + com.google.analytics.data.v1alpha.SamplingMetadata.Builder, + com.google.analytics.data.v1alpha.SamplingMetadataOrBuilder> + internalGetSamplingMetadatasFieldBuilder() { if (samplingMetadatasBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSamplingMetadatasIsMutable(); - samplingMetadatas_.add(value); - onChanged(); - } else { - samplingMetadatasBuilder_.addMessage(value); + samplingMetadatasBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.analytics.data.v1alpha.SamplingMetadata, + com.google.analytics.data.v1alpha.SamplingMetadata.Builder, + com.google.analytics.data.v1alpha.SamplingMetadataOrBuilder>( + samplingMetadatas_, + ((bitField0_ & 0x00000040) != 0), + getParentForChildren(), + isClean()); + samplingMetadatas_ = null; } + return samplingMetadatasBuilder_; + } + + private int section_ = 0; + + /** + * + * + *
+     * Identifies the type of data in the report.
+     * 
+ * + * .google.analytics.data.v1alpha.Section section = 10; + * + * @return The enum numeric value on the wire for section. + */ + @java.lang.Override + public int getSectionValue() { + return section_; + } + + /** + * + * + *
+     * Identifies the type of data in the report.
+     * 
+ * + * .google.analytics.data.v1alpha.Section section = 10; + * + * @param value The enum numeric value on the wire for section to set. + * @return This builder for chaining. + */ + public Builder setSectionValue(int value) { + section_ = value; + bitField0_ |= 0x00000080; + onChanged(); return this; } @@ -4750,30 +8598,39 @@ public Builder addSamplingMetadatas(com.google.analytics.data.v1alpha.SamplingMe * * *
-     * If this report results is
-     * [sampled](https://support.google.com/analytics/answer/13331292), this
-     * describes the percentage of events used in this report. One
-     * `samplingMetadatas` is populated for each date range. Each
-     * `samplingMetadatas` corresponds to a date range in order that date ranges
-     * were specified in the request.
+     * Identifies the type of data in the report.
+     * 
* - * However if the results are not sampled, this field will not be defined. + * .google.analytics.data.v1alpha.Section section = 10; + * + * @return The section. + */ + @java.lang.Override + public com.google.analytics.data.v1alpha.Section getSection() { + com.google.analytics.data.v1alpha.Section result = + com.google.analytics.data.v1alpha.Section.forNumber(section_); + return result == null ? com.google.analytics.data.v1alpha.Section.UNRECOGNIZED : result; + } + + /** + * + * + *
+     * Identifies the type of data in the report.
      * 
* - * repeated .google.analytics.data.v1alpha.SamplingMetadata sampling_metadatas = 9; + * .google.analytics.data.v1alpha.Section section = 10; + * + * @param value The section to set. + * @return This builder for chaining. */ - public Builder addSamplingMetadatas( - int index, com.google.analytics.data.v1alpha.SamplingMetadata value) { - if (samplingMetadatasBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSamplingMetadatasIsMutable(); - samplingMetadatas_.add(index, value); - onChanged(); - } else { - samplingMetadatasBuilder_.addMessage(index, value); + public Builder setSection(com.google.analytics.data.v1alpha.Section value) { + if (value == null) { + throw new NullPointerException(); } + bitField0_ |= 0x00000080; + section_ = value.getNumber(); + onChanged(); return this; } @@ -4781,82 +8638,145 @@ public Builder addSamplingMetadatas( * * *
-     * If this report results is
-     * [sampled](https://support.google.com/analytics/answer/13331292), this
-     * describes the percentage of events used in this report. One
-     * `samplingMetadatas` is populated for each date range. Each
-     * `samplingMetadatas` corresponds to a date range in order that date ranges
-     * were specified in the request.
+     * Identifies the type of data in the report.
+     * 
* - * However if the results are not sampled, this field will not be defined. + * .google.analytics.data.v1alpha.Section section = 10; + * + * @return This builder for chaining. + */ + public Builder clearSection() { + bitField0_ = (bitField0_ & ~0x00000080); + section_ = 0; + onChanged(); + return this; + } + + private java.util.List + dataTruncationReasons_ = java.util.Collections.emptyList(); + + private void ensureDataTruncationReasonsIsMutable() { + if (!((bitField0_ & 0x00000100) != 0)) { + dataTruncationReasons_ = + new java.util.ArrayList< + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason>( + dataTruncationReasons_); + bitField0_ |= 0x00000100; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason, + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.Builder, + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReasonOrBuilder> + dataTruncationReasonsBuilder_; + + /** + * + * + *
+     * If set, indicate there is data truncation in the report.
      * 
* - * repeated .google.analytics.data.v1alpha.SamplingMetadata sampling_metadatas = 9; + * + * repeated .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason data_truncation_reasons = 11; + * */ - public Builder addSamplingMetadatas( - com.google.analytics.data.v1alpha.SamplingMetadata.Builder builderForValue) { - if (samplingMetadatasBuilder_ == null) { - ensureSamplingMetadatasIsMutable(); - samplingMetadatas_.add(builderForValue.build()); - onChanged(); + public java.util.List + getDataTruncationReasonsList() { + if (dataTruncationReasonsBuilder_ == null) { + return java.util.Collections.unmodifiableList(dataTruncationReasons_); } else { - samplingMetadatasBuilder_.addMessage(builderForValue.build()); + return dataTruncationReasonsBuilder_.getMessageList(); } - return this; } /** * * *
-     * If this report results is
-     * [sampled](https://support.google.com/analytics/answer/13331292), this
-     * describes the percentage of events used in this report. One
-     * `samplingMetadatas` is populated for each date range. Each
-     * `samplingMetadatas` corresponds to a date range in order that date ranges
-     * were specified in the request.
+     * If set, indicate there is data truncation in the report.
+     * 
* - * However if the results are not sampled, this field will not be defined. + * + * repeated .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason data_truncation_reasons = 11; + * + */ + public int getDataTruncationReasonsCount() { + if (dataTruncationReasonsBuilder_ == null) { + return dataTruncationReasons_.size(); + } else { + return dataTruncationReasonsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * If set, indicate there is data truncation in the report.
      * 
* - * repeated .google.analytics.data.v1alpha.SamplingMetadata sampling_metadatas = 9; + * + * repeated .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason data_truncation_reasons = 11; + * */ - public Builder addSamplingMetadatas( - int index, com.google.analytics.data.v1alpha.SamplingMetadata.Builder builderForValue) { - if (samplingMetadatasBuilder_ == null) { - ensureSamplingMetadatasIsMutable(); - samplingMetadatas_.add(index, builderForValue.build()); - onChanged(); + public com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + getDataTruncationReasons(int index) { + if (dataTruncationReasonsBuilder_ == null) { + return dataTruncationReasons_.get(index); } else { - samplingMetadatasBuilder_.addMessage(index, builderForValue.build()); + return dataTruncationReasonsBuilder_.getMessage(index); } - return this; } /** * * *
-     * If this report results is
-     * [sampled](https://support.google.com/analytics/answer/13331292), this
-     * describes the percentage of events used in this report. One
-     * `samplingMetadatas` is populated for each date range. Each
-     * `samplingMetadatas` corresponds to a date range in order that date ranges
-     * were specified in the request.
+     * If set, indicate there is data truncation in the report.
+     * 
+ * + * + * repeated .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason data_truncation_reasons = 11; + * + */ + public Builder setDataTruncationReasons( + int index, com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason value) { + if (dataTruncationReasonsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataTruncationReasonsIsMutable(); + dataTruncationReasons_.set(index, value); + onChanged(); + } else { + dataTruncationReasonsBuilder_.setMessage(index, value); + } + return this; + } + + /** * - * However if the results are not sampled, this field will not be defined. + * + *
+     * If set, indicate there is data truncation in the report.
      * 
* - * repeated .google.analytics.data.v1alpha.SamplingMetadata sampling_metadatas = 9; + * + * repeated .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason data_truncation_reasons = 11; + * */ - public Builder addAllSamplingMetadatas( - java.lang.Iterable values) { - if (samplingMetadatasBuilder_ == null) { - ensureSamplingMetadatasIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, samplingMetadatas_); + public Builder setDataTruncationReasons( + int index, + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.Builder + builderForValue) { + if (dataTruncationReasonsBuilder_ == null) { + ensureDataTruncationReasonsIsMutable(); + dataTruncationReasons_.set(index, builderForValue.build()); onChanged(); } else { - samplingMetadatasBuilder_.addAllMessages(values); + dataTruncationReasonsBuilder_.setMessage(index, builderForValue.build()); } return this; } @@ -4865,25 +8785,24 @@ public Builder addAllSamplingMetadatas( * * *
-     * If this report results is
-     * [sampled](https://support.google.com/analytics/answer/13331292), this
-     * describes the percentage of events used in this report. One
-     * `samplingMetadatas` is populated for each date range. Each
-     * `samplingMetadatas` corresponds to a date range in order that date ranges
-     * were specified in the request.
-     *
-     * However if the results are not sampled, this field will not be defined.
+     * If set, indicate there is data truncation in the report.
      * 
* - * repeated .google.analytics.data.v1alpha.SamplingMetadata sampling_metadatas = 9; + * + * repeated .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason data_truncation_reasons = 11; + * */ - public Builder clearSamplingMetadatas() { - if (samplingMetadatasBuilder_ == null) { - samplingMetadatas_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000040); + public Builder addDataTruncationReasons( + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason value) { + if (dataTruncationReasonsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataTruncationReasonsIsMutable(); + dataTruncationReasons_.add(value); onChanged(); } else { - samplingMetadatasBuilder_.clear(); + dataTruncationReasonsBuilder_.addMessage(value); } return this; } @@ -4892,25 +8811,24 @@ public Builder clearSamplingMetadatas() { * * *
-     * If this report results is
-     * [sampled](https://support.google.com/analytics/answer/13331292), this
-     * describes the percentage of events used in this report. One
-     * `samplingMetadatas` is populated for each date range. Each
-     * `samplingMetadatas` corresponds to a date range in order that date ranges
-     * were specified in the request.
-     *
-     * However if the results are not sampled, this field will not be defined.
+     * If set, indicate there is data truncation in the report.
      * 
* - * repeated .google.analytics.data.v1alpha.SamplingMetadata sampling_metadatas = 9; + * + * repeated .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason data_truncation_reasons = 11; + * */ - public Builder removeSamplingMetadatas(int index) { - if (samplingMetadatasBuilder_ == null) { - ensureSamplingMetadatasIsMutable(); - samplingMetadatas_.remove(index); + public Builder addDataTruncationReasons( + int index, com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason value) { + if (dataTruncationReasonsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataTruncationReasonsIsMutable(); + dataTruncationReasons_.add(index, value); onChanged(); } else { - samplingMetadatasBuilder_.remove(index); + dataTruncationReasonsBuilder_.addMessage(index, value); } return this; } @@ -4919,252 +8837,252 @@ public Builder removeSamplingMetadatas(int index) { * * *
-     * If this report results is
-     * [sampled](https://support.google.com/analytics/answer/13331292), this
-     * describes the percentage of events used in this report. One
-     * `samplingMetadatas` is populated for each date range. Each
-     * `samplingMetadatas` corresponds to a date range in order that date ranges
-     * were specified in the request.
-     *
-     * However if the results are not sampled, this field will not be defined.
+     * If set, indicate there is data truncation in the report.
      * 
* - * repeated .google.analytics.data.v1alpha.SamplingMetadata sampling_metadatas = 9; + * + * repeated .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason data_truncation_reasons = 11; + * */ - public com.google.analytics.data.v1alpha.SamplingMetadata.Builder getSamplingMetadatasBuilder( - int index) { - return internalGetSamplingMetadatasFieldBuilder().getBuilder(index); + public Builder addDataTruncationReasons( + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.Builder + builderForValue) { + if (dataTruncationReasonsBuilder_ == null) { + ensureDataTruncationReasonsIsMutable(); + dataTruncationReasons_.add(builderForValue.build()); + onChanged(); + } else { + dataTruncationReasonsBuilder_.addMessage(builderForValue.build()); + } + return this; } /** * * *
-     * If this report results is
-     * [sampled](https://support.google.com/analytics/answer/13331292), this
-     * describes the percentage of events used in this report. One
-     * `samplingMetadatas` is populated for each date range. Each
-     * `samplingMetadatas` corresponds to a date range in order that date ranges
-     * were specified in the request.
-     *
-     * However if the results are not sampled, this field will not be defined.
+     * If set, indicate there is data truncation in the report.
      * 
* - * repeated .google.analytics.data.v1alpha.SamplingMetadata sampling_metadatas = 9; + * + * repeated .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason data_truncation_reasons = 11; + * */ - public com.google.analytics.data.v1alpha.SamplingMetadataOrBuilder - getSamplingMetadatasOrBuilder(int index) { - if (samplingMetadatasBuilder_ == null) { - return samplingMetadatas_.get(index); + public Builder addDataTruncationReasons( + int index, + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.Builder + builderForValue) { + if (dataTruncationReasonsBuilder_ == null) { + ensureDataTruncationReasonsIsMutable(); + dataTruncationReasons_.add(index, builderForValue.build()); + onChanged(); } else { - return samplingMetadatasBuilder_.getMessageOrBuilder(index); + dataTruncationReasonsBuilder_.addMessage(index, builderForValue.build()); } + return this; } /** * * *
-     * If this report results is
-     * [sampled](https://support.google.com/analytics/answer/13331292), this
-     * describes the percentage of events used in this report. One
-     * `samplingMetadatas` is populated for each date range. Each
-     * `samplingMetadatas` corresponds to a date range in order that date ranges
-     * were specified in the request.
-     *
-     * However if the results are not sampled, this field will not be defined.
+     * If set, indicate there is data truncation in the report.
      * 
* - * repeated .google.analytics.data.v1alpha.SamplingMetadata sampling_metadatas = 9; + * + * repeated .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason data_truncation_reasons = 11; + * */ - public java.util.List - getSamplingMetadatasOrBuilderList() { - if (samplingMetadatasBuilder_ != null) { - return samplingMetadatasBuilder_.getMessageOrBuilderList(); + public Builder addAllDataTruncationReasons( + java.lang.Iterable< + ? extends com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason> + values) { + if (dataTruncationReasonsBuilder_ == null) { + ensureDataTruncationReasonsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dataTruncationReasons_); + onChanged(); } else { - return java.util.Collections.unmodifiableList(samplingMetadatas_); + dataTruncationReasonsBuilder_.addAllMessages(values); } + return this; } /** * * *
-     * If this report results is
-     * [sampled](https://support.google.com/analytics/answer/13331292), this
-     * describes the percentage of events used in this report. One
-     * `samplingMetadatas` is populated for each date range. Each
-     * `samplingMetadatas` corresponds to a date range in order that date ranges
-     * were specified in the request.
-     *
-     * However if the results are not sampled, this field will not be defined.
+     * If set, indicate there is data truncation in the report.
      * 
* - * repeated .google.analytics.data.v1alpha.SamplingMetadata sampling_metadatas = 9; + * + * repeated .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason data_truncation_reasons = 11; + * */ - public com.google.analytics.data.v1alpha.SamplingMetadata.Builder - addSamplingMetadatasBuilder() { - return internalGetSamplingMetadatasFieldBuilder() - .addBuilder(com.google.analytics.data.v1alpha.SamplingMetadata.getDefaultInstance()); + public Builder clearDataTruncationReasons() { + if (dataTruncationReasonsBuilder_ == null) { + dataTruncationReasons_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + } else { + dataTruncationReasonsBuilder_.clear(); + } + return this; } /** * * *
-     * If this report results is
-     * [sampled](https://support.google.com/analytics/answer/13331292), this
-     * describes the percentage of events used in this report. One
-     * `samplingMetadatas` is populated for each date range. Each
-     * `samplingMetadatas` corresponds to a date range in order that date ranges
-     * were specified in the request.
-     *
-     * However if the results are not sampled, this field will not be defined.
+     * If set, indicate there is data truncation in the report.
      * 
* - * repeated .google.analytics.data.v1alpha.SamplingMetadata sampling_metadatas = 9; + * + * repeated .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason data_truncation_reasons = 11; + * */ - public com.google.analytics.data.v1alpha.SamplingMetadata.Builder addSamplingMetadatasBuilder( - int index) { - return internalGetSamplingMetadatasFieldBuilder() - .addBuilder( - index, com.google.analytics.data.v1alpha.SamplingMetadata.getDefaultInstance()); + public Builder removeDataTruncationReasons(int index) { + if (dataTruncationReasonsBuilder_ == null) { + ensureDataTruncationReasonsIsMutable(); + dataTruncationReasons_.remove(index); + onChanged(); + } else { + dataTruncationReasonsBuilder_.remove(index); + } + return this; } /** * * *
-     * If this report results is
-     * [sampled](https://support.google.com/analytics/answer/13331292), this
-     * describes the percentage of events used in this report. One
-     * `samplingMetadatas` is populated for each date range. Each
-     * `samplingMetadatas` corresponds to a date range in order that date ranges
-     * were specified in the request.
-     *
-     * However if the results are not sampled, this field will not be defined.
+     * If set, indicate there is data truncation in the report.
      * 
* - * repeated .google.analytics.data.v1alpha.SamplingMetadata sampling_metadatas = 9; + * + * repeated .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason data_truncation_reasons = 11; + * */ - public java.util.List - getSamplingMetadatasBuilderList() { - return internalGetSamplingMetadatasFieldBuilder().getBuilderList(); + public com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.Builder + getDataTruncationReasonsBuilder(int index) { + return internalGetDataTruncationReasonsFieldBuilder().getBuilder(index); } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.analytics.data.v1alpha.SamplingMetadata, - com.google.analytics.data.v1alpha.SamplingMetadata.Builder, - com.google.analytics.data.v1alpha.SamplingMetadataOrBuilder> - internalGetSamplingMetadatasFieldBuilder() { - if (samplingMetadatasBuilder_ == null) { - samplingMetadatasBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.analytics.data.v1alpha.SamplingMetadata, - com.google.analytics.data.v1alpha.SamplingMetadata.Builder, - com.google.analytics.data.v1alpha.SamplingMetadataOrBuilder>( - samplingMetadatas_, - ((bitField0_ & 0x00000040) != 0), - getParentForChildren(), - isClean()); - samplingMetadatas_ = null; - } - return samplingMetadatasBuilder_; - } - - private int section_ = 0; - /** * * *
-     * Identifies the type of data in the report.
+     * If set, indicate there is data truncation in the report.
      * 
* - * .google.analytics.data.v1alpha.Section section = 10; - * - * @return The enum numeric value on the wire for section. + * + * repeated .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason data_truncation_reasons = 11; + * */ - @java.lang.Override - public int getSectionValue() { - return section_; + public com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReasonOrBuilder + getDataTruncationReasonsOrBuilder(int index) { + if (dataTruncationReasonsBuilder_ == null) { + return dataTruncationReasons_.get(index); + } else { + return dataTruncationReasonsBuilder_.getMessageOrBuilder(index); + } } /** * * *
-     * Identifies the type of data in the report.
+     * If set, indicate there is data truncation in the report.
      * 
* - * .google.analytics.data.v1alpha.Section section = 10; - * - * @param value The enum numeric value on the wire for section to set. - * @return This builder for chaining. + * + * repeated .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason data_truncation_reasons = 11; + * */ - public Builder setSectionValue(int value) { - section_ = value; - bitField0_ |= 0x00000080; - onChanged(); - return this; + public java.util.List< + ? extends + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReasonOrBuilder> + getDataTruncationReasonsOrBuilderList() { + if (dataTruncationReasonsBuilder_ != null) { + return dataTruncationReasonsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(dataTruncationReasons_); + } } /** * * *
-     * Identifies the type of data in the report.
+     * If set, indicate there is data truncation in the report.
      * 
* - * .google.analytics.data.v1alpha.Section section = 10; - * - * @return The section. + * + * repeated .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason data_truncation_reasons = 11; + * */ - @java.lang.Override - public com.google.analytics.data.v1alpha.Section getSection() { - com.google.analytics.data.v1alpha.Section result = - com.google.analytics.data.v1alpha.Section.forNumber(section_); - return result == null ? com.google.analytics.data.v1alpha.Section.UNRECOGNIZED : result; + public com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.Builder + addDataTruncationReasonsBuilder() { + return internalGetDataTruncationReasonsFieldBuilder() + .addBuilder( + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .getDefaultInstance()); } /** * * *
-     * Identifies the type of data in the report.
+     * If set, indicate there is data truncation in the report.
      * 
* - * .google.analytics.data.v1alpha.Section section = 10; - * - * @param value The section to set. - * @return This builder for chaining. + * + * repeated .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason data_truncation_reasons = 11; + * */ - public Builder setSection(com.google.analytics.data.v1alpha.Section value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000080; - section_ = value.getNumber(); - onChanged(); - return this; + public com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.Builder + addDataTruncationReasonsBuilder(int index) { + return internalGetDataTruncationReasonsFieldBuilder() + .addBuilder( + index, + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason + .getDefaultInstance()); } /** * * *
-     * Identifies the type of data in the report.
+     * If set, indicate there is data truncation in the report.
      * 
* - * .google.analytics.data.v1alpha.Section section = 10; - * - * @return This builder for chaining. + * + * repeated .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason data_truncation_reasons = 11; + * */ - public Builder clearSection() { - bitField0_ = (bitField0_ & ~0x00000080); - section_ = 0; - onChanged(); - return this; + public java.util.List< + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.Builder> + getDataTruncationReasonsBuilderList() { + return internalGetDataTruncationReasonsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason, + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.Builder, + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReasonOrBuilder> + internalGetDataTruncationReasonsFieldBuilder() { + if (dataTruncationReasonsBuilder_ == null) { + dataTruncationReasonsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason, + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason.Builder, + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReasonOrBuilder>( + dataTruncationReasons_, + ((bitField0_ & 0x00000100) != 0), + getParentForChildren(), + isClean()); + dataTruncationReasons_ = null; + } + return dataTruncationReasonsBuilder_; } // @@protoc_insertion_point(builder_scope:google.analytics.data.v1alpha.ResponseMetaData) diff --git a/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/ResponseMetaDataOrBuilder.java b/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/ResponseMetaDataOrBuilder.java index 003c86c19cf6..f21f2732490b 100644 --- a/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/ResponseMetaDataOrBuilder.java +++ b/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/ResponseMetaDataOrBuilder.java @@ -413,4 +413,75 @@ com.google.analytics.data.v1alpha.SamplingMetadataOrBuilder getSamplingMetadatas * @return The section. */ com.google.analytics.data.v1alpha.Section getSection(); + + /** + * + * + *
+   * If set, indicate there is data truncation in the report.
+   * 
+ * + * + * repeated .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason data_truncation_reasons = 11; + * + */ + java.util.List + getDataTruncationReasonsList(); + + /** + * + * + *
+   * If set, indicate there is data truncation in the report.
+   * 
+ * + * + * repeated .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason data_truncation_reasons = 11; + * + */ + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason getDataTruncationReasons( + int index); + + /** + * + * + *
+   * If set, indicate there is data truncation in the report.
+   * 
+ * + * + * repeated .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason data_truncation_reasons = 11; + * + */ + int getDataTruncationReasonsCount(); + + /** + * + * + *
+   * If set, indicate there is data truncation in the report.
+   * 
+ * + * + * repeated .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason data_truncation_reasons = 11; + * + */ + java.util.List< + ? extends + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReasonOrBuilder> + getDataTruncationReasonsOrBuilderList(); + + /** + * + * + *
+   * If set, indicate there is data truncation in the report.
+   * 
+ * + * + * repeated .google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReason data_truncation_reasons = 11; + * + */ + com.google.analytics.data.v1alpha.ResponseMetaData.DataTruncationReasonOrBuilder + getDataTruncationReasonsOrBuilder(int index); } diff --git a/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/proto/google/analytics/data/v1alpha/analytics_data_api.proto b/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/proto/google/analytics/data/v1alpha/analytics_data_api.proto index c936b2d0ee6a..ba34efd6dac1 100644 --- a/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/proto/google/analytics/data/v1alpha/analytics_data_api.proto +++ b/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/proto/google/analytics/data/v1alpha/analytics_data_api.proto @@ -38,6 +38,7 @@ service AlphaAnalyticsData { option (google.api.default_host) = "analyticsdata.googleapis.com"; option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/analytics," + "https://www.googleapis.com/auth/analytics.chatbot.read," "https://www.googleapis.com/auth/analytics.readonly"; // Returns a customized funnel report of your Google Analytics event data. The @@ -301,6 +302,24 @@ service AlphaAnalyticsData { option (google.api.method_signature) = "parent"; } + // Provides a chat interface for interacting with Google Analytics data + // through the API. + // + // This product uses AI and may display inaccurate info. Your chat activity + // may be used to improve the product and your use is subject to Google's + // [Terms](https://policies.google.com/terms), + // [AI Use + // Policy](https://policies.google.com/terms/generative-ai/use-policy), and + // [Privacy Policy](https://policies.google.com/privacy). + // [Learn more about Chat AI + // Privacy](https://support.google.com/helpguide/answer/14185196). + rpc Chat(ChatRequest) returns (ChatResponse) { + option (google.api.http) = { + post: "/v1alpha/{property=properties/*}:chat" + body: "*" + }; + } + // Returns a customized report of your Google Analytics event data. Reports // contain statistics derived from data collected by the Google Analytics // tracking code. The data returned from the API is as a table with columns @@ -1240,6 +1259,45 @@ message ListReportTasksResponse { optional string next_page_token = 2; } +// Request message for the Chat method. +message ChatRequest { + // Required. The property to chat about. + // Format: properties/{property} + string property = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/Property" + } + ]; + + // Required. The user's query. + string user_query = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Provide this session ID to continue an existing conversation + // and maintain context. If this field is empty or unset, a new chat + // session is created. Invalid session IDs will result in an error. + optional string session_id = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If true, the response will include the current state of this + // Analytics Property's quota. Quota is returned in + // [PropertyChatQuota](#PropertyChatQuota). + bool return_property_quota = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for the Chat method. +message ChatResponse { + // The unique identifier for this chat session. Provide this ID in subsequent + // requests to maintain conversational context. + string session_id = 1; + + // The response blocks that make up the chat response. This can include text, + // tables, and lists. + repeated ResponseBlock blocks = 2; + + // This Analytics Property's quota state including this request. + PropertyChatQuota property_quota = 3; +} + // The request to generate a report. message RunReportRequest { // Required. A Google Analytics property identifier whose events are tracked. diff --git a/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/proto/google/analytics/data/v1alpha/data.proto b/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/proto/google/analytics/data/v1alpha/data.proto index 629c34ca7f1a..770cbad2b4cc 100644 --- a/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/proto/google/analytics/data/v1alpha/data.proto +++ b/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/proto/google/analytics/data/v1alpha/data.proto @@ -546,6 +546,73 @@ message ResponseMetaData { repeated ActiveMetricRestriction active_metric_restrictions = 1; } + // Describes a reason for data truncation in the report. + message DataTruncationReason { + // The type of data truncation. + enum DataTruncationType { + // Unspecified type. + DATA_TRUNCATION_TYPE_UNSPECIFIED = 0; + + // Data is truncated in attribution report for rules-based models golden + // date. + DATA_TRUNCATION_TYPE_RULES_BASED_MODELS = 1; + + // Data is truncated in attribution report for data driven attribution + // golden date. + DATA_TRUNCATION_TYPE_DATA_DRIVEN_ATTRIBUTION = 2; + + // Data is truncated because DV360 policy does not permit data older than + // 2 years from being returned. + DATA_TRUNCATION_TYPE_DV360 = 3; + + // Data is truncated because CM360 policy does not permit data older than + // 2 years from being returned. + DATA_TRUNCATION_TYPE_CM360 = 4; + + // New item-scoped ecommerce metrics only have data after a specific date. + DATA_TRUNCATION_TYPE_ITEM_SCOPED_ECOMMERCE_METRICS = 5; + + // New event-scoped ecommerce metrics only have data after a specific + // date. + DATA_TRUNCATION_TYPE_EVENT_SCOPED_ECOMMERCE_METRICS = 6; + + // Query date range may not be fully served. + DATA_TRUNCATION_TYPE_DATE_RANGE = 7; + + // Data truncated because the query attempts to read event data prior + // to its retention date. + DATA_TRUNCATION_TYPE_PROPERTY = 8; + + // Data is truncated in conversions report. + DATA_TRUNCATION_TYPE_CONVERSIONS = 9; + + // Data is truncated due to Google Ads 36 month retention policy. + DATA_TRUNCATION_TYPE_GOOGLE_ADS = 10; + } + + // Define the truncated date range from start_date to end_date. + message DataTruncationDateRange { + // The start date in the format YYYY-MM-DD (inclusive). + optional string start_date = 1; + + // The end date in the format YYYY-MM-DD (inclusive). + optional string end_date = 2; + } + + // The type of data truncation. + optional DataTruncationType data_truncation_type = 1; + + // A descriptive message explaining the data truncation. + optional string data_truncation_message = 2; + + // The data truncation date in the format YYYY-MM-DD. + // Indicates data before this date is truncated. + optional string data_truncation_date = 3; + + // The truncated date ranges. + repeated DataTruncationDateRange data_truncation_date_ranges = 4; + } + // If true, indicates some buckets of dimension combinations are rolled into // "(other)" row. This can happen for high cardinality reports. // @@ -610,6 +677,9 @@ message ResponseMetaData { // Identifies the type of data in the report. Section section = 10; + + // If set, indicate there is data truncation in the report. + repeated DataTruncationReason data_truncation_reasons = 11; } // Describes a dimension column in the report. Dimensions requested in a report @@ -849,6 +919,49 @@ message FunnelSubReport { FunnelResponseMetadata metadata = 4; } +// One block of structured data in chat response. +message ResponseBlock { + // A cell in a data table. + message DataTableCell { + // The value of the cell. + string value = 1; + } + + // Describes a column header in a DataTable. + message DataTableHeader { + // The header name. + string header = 1; + + // The data type. + string data_type = 2; + } + + // A row in a DataTable. + message DataTableRow { + // The cell values in the row. + repeated DataTableCell columns = 1; + } + + // A table of data. + message DataTable { + // Describes dimension columns. The number of headers and ordering of + // headers matches the dimensions present in rows. + repeated DataTableHeader headers = 1; + + // Rows of dimension value combinations and metric values in the report. + repeated DataTableRow rows = 2; + } + + // One block of structured data. + oneof block { + // A block of text. + string text = 1; + + // A block of table data. + DataTable table = 2; + } +} + // User segments are subsets of users who engaged with your site or app. For // example, users who have previously purchased; users who added items to their // shopping carts, but didn’t complete a purchase. @@ -1812,3 +1925,12 @@ message ConversionMetadata { // This conversion's name within the Google Analytics user interface. string display_name = 2; } + +// Property quota for chatbot specific fields. +message PropertyChatQuota { + // Chat tokens consumed per day. + QuotaStatus tokens_per_day = 1; + + // Chat tokens consumed per hour. + QuotaStatus tokens_per_hour = 2; +} diff --git a/java-analytics-data/samples/snippets/generated/com/google/analytics/data/v1alpha/alphaanalyticsdata/chat/AsyncChat.java b/java-analytics-data/samples/snippets/generated/com/google/analytics/data/v1alpha/alphaanalyticsdata/chat/AsyncChat.java new file mode 100644 index 000000000000..497b8dea2c34 --- /dev/null +++ b/java-analytics-data/samples/snippets/generated/com/google/analytics/data/v1alpha/alphaanalyticsdata/chat/AsyncChat.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.analytics.data.v1alpha.samples; + +// [START analyticsdata_v1alpha_generated_AlphaAnalyticsData_Chat_async] +import com.google.analytics.data.v1alpha.AlphaAnalyticsDataClient; +import com.google.analytics.data.v1alpha.ChatRequest; +import com.google.analytics.data.v1alpha.ChatResponse; +import com.google.analytics.data.v1alpha.PropertyName; +import com.google.api.core.ApiFuture; + +public class AsyncChat { + + public static void main(String[] args) throws Exception { + asyncChat(); + } + + public static void asyncChat() throws Exception { + // 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 (AlphaAnalyticsDataClient alphaAnalyticsDataClient = AlphaAnalyticsDataClient.create()) { + ChatRequest request = + ChatRequest.newBuilder() + .setProperty(PropertyName.of("[PROPERTY]").toString()) + .setUserQuery("userQuery326624189") + .setSessionId("sessionId607796817") + .setReturnPropertyQuota(true) + .build(); + ApiFuture future = alphaAnalyticsDataClient.chatCallable().futureCall(request); + // Do something. + ChatResponse response = future.get(); + } + } +} +// [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_Chat_async] diff --git a/java-analytics-data/samples/snippets/generated/com/google/analytics/data/v1alpha/alphaanalyticsdata/chat/SyncChat.java b/java-analytics-data/samples/snippets/generated/com/google/analytics/data/v1alpha/alphaanalyticsdata/chat/SyncChat.java new file mode 100644 index 000000000000..bdbaa931e645 --- /dev/null +++ b/java-analytics-data/samples/snippets/generated/com/google/analytics/data/v1alpha/alphaanalyticsdata/chat/SyncChat.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.analytics.data.v1alpha.samples; + +// [START analyticsdata_v1alpha_generated_AlphaAnalyticsData_Chat_sync] +import com.google.analytics.data.v1alpha.AlphaAnalyticsDataClient; +import com.google.analytics.data.v1alpha.ChatRequest; +import com.google.analytics.data.v1alpha.ChatResponse; +import com.google.analytics.data.v1alpha.PropertyName; + +public class SyncChat { + + public static void main(String[] args) throws Exception { + syncChat(); + } + + public static void syncChat() throws Exception { + // 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 (AlphaAnalyticsDataClient alphaAnalyticsDataClient = AlphaAnalyticsDataClient.create()) { + ChatRequest request = + ChatRequest.newBuilder() + .setProperty(PropertyName.of("[PROPERTY]").toString()) + .setUserQuery("userQuery326624189") + .setSessionId("sessionId607796817") + .setReturnPropertyQuota(true) + .build(); + ChatResponse response = alphaAnalyticsDataClient.chat(request); + } + } +} +// [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_Chat_sync] diff --git a/java-bigtable/test-proxy/src/main/java/com/google/cloud/bigtable/testproxy/CbtTestProxy.java b/java-bigtable/test-proxy/src/main/java/com/google/cloud/bigtable/testproxy/CbtTestProxy.java index e8cf7ae17db7..ddc9916a3a5f 100644 --- a/java-bigtable/test-proxy/src/main/java/com/google/cloud/bigtable/testproxy/CbtTestProxy.java +++ b/java-bigtable/test-proxy/src/main/java/com/google/cloud/bigtable/testproxy/CbtTestProxy.java @@ -321,10 +321,10 @@ public void bulkMutateRows( } catch (MutateRowsException e) { MutateRowsResult.Builder resultBuilder = MutateRowsResult.newBuilder(); com.google.rpc.Status topLevelStatus = - com.google.rpc.Status.newBuilder() - .setCode(e.getStatusCode().getCode().ordinal()) - .setMessage(e.getMessage()) - .build(); + com.google.rpc.Status.newBuilder() + .setCode(e.getStatusCode().getCode().ordinal()) + .setMessage(e.getMessage()) + .build(); for (MutateRowsException.FailedMutation failed : e.getFailedMutations()) { resultBuilder .addEntriesBuilder() @@ -335,15 +335,13 @@ public void bulkMutateRows( .setMessage(failed.getError().getMessage()) .build()); - topLevelStatus = com.google.rpc.Status.newBuilder() - .setCode(failed.getError().getStatusCode().getCode().ordinal()) - .setMessage(failed.getError().getMessage()) - .build(); + topLevelStatus = + com.google.rpc.Status.newBuilder() + .setCode(failed.getError().getStatusCode().getCode().ordinal()) + .setMessage(failed.getError().getMessage()) + .build(); } - responseObserver.onNext( - resultBuilder - .setStatus(topLevelStatus) - .build()); + responseObserver.onNext(resultBuilder.setStatus(topLevelStatus).build()); responseObserver.onCompleted(); return; } catch (ApiException e) { diff --git a/java-chat/google-cloud-chat/src/main/java/com/google/chat/v1/ChatServiceClient.java b/java-chat/google-cloud-chat/src/main/java/com/google/chat/v1/ChatServiceClient.java index f7ff426a02d4..04b6ef102a3c 100644 --- a/java-chat/google-cloud-chat/src/main/java/com/google/chat/v1/ChatServiceClient.java +++ b/java-chat/google-cloud-chat/src/main/java/com/google/chat/v1/ChatServiceClient.java @@ -655,6 +655,70 @@ * * * + *

ListMessagePins + *

Lists message pins in a space. Users can pin important messages in spaces for easy access. For more information, see [Pin or unpin a conversation in Google Chat](https://support.google.com/chat/answer/15622437). + *

Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) with one of the following [authorization scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + *

- `https://www.googleapis.com/auth/chat.spaces.pins.readonly` - `https://www.googleapis.com/auth/chat.spaces.pins` - `https://www.googleapis.com/auth/chat.spaces.readonly` - `https://www.googleapis.com/auth/chat.spaces` + * + *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listMessagePins(ListMessagePinsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listMessagePins(SpaceName parent) + *

  • listMessagePins(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listMessagePinsPagedCallable() + *

  • listMessagePinsCallable() + *

+ * + * + * + *

CreateMessagePin + *

Creates a message pin. + *

Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) with one of the following [authorization scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + *

- `https://www.googleapis.com/auth/chat.spaces.pins` - `https://www.googleapis.com/auth/chat.spaces` + * + *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createMessagePin(CreateMessagePinRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • createMessagePin(SpaceName parent, MessagePin messagePin) + *

  • createMessagePin(String parent, MessagePin messagePin) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createMessagePinCallable() + *

+ * + * + * + *

DeleteMessagePin + *

Deletes a message pin. + *

Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) with one of the following [authorization scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + *

- `https://www.googleapis.com/auth/chat.spaces.pins` - `https://www.googleapis.com/auth/chat.spaces` + * + *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteMessagePin(DeleteMessagePinRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • deleteMessagePin(MessagePinName name) + *

  • deleteMessagePin(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteMessagePinCallable() + *

+ * + * + * *

CreateCustomEmoji *

Creates a custom emoji. *

Custom emojis are only available for Google Workspace accounts, and the administrator must turn custom emojis on for the organization. For more information, see [Learn about custom emojis in Google Chat](https://support.google.com/chat/answer/12800149) and [Manage custom emoji permissions](https://support.google.com/a/answer/12850085). @@ -2957,11 +3021,13 @@ public final UnaryCallable deleteMessageCallable() * member. - `space.display_name`: Supports the operator `:` (has) and filters spaces based on * a partial match of their display name. Results are limited to the top five space matches. * For example, `space.display_name:Project` searches for messages in the top five spaces that - * contain the word "Project" in their display names. - `attachment`: Supports the operator - * `:*` (has any) to check for the presence of attachments. If `attachment:*` is - * specified, only messages that have at least one attachment are returned. - - * `annotations.user_mentions.user.name`: The resource name of the mentioned user - * (`users/{user}`). Only supports `:` (has). For example: + * contain the word "Project" in their display names. - `space.space_type`: The type of the + * space. Only supports `=`. For example, `space.space_type="DIRECT_MESSAGE"` returns only + * messages from direct messages. The possible values are `DIRECT_MESSAGE`, `GROUP_CHAT`, and + * `SPACE`. - `attachment`: Supports the operator `:*` (has any) to check for the presence + * of attachments. If `attachment:*` is specified, only messages that have at least one + * attachment are returned. - `annotations.user_mentions.user.name`: The resource name of the + * mentioned user (`users/{user}`). Only supports `:` (has). For example: * `annotations.user_mentions.user.name:"users/1234567890"` returns only messages that contain * a mention to the specified user. Alternatively, the alias `me` can be used to filter for * messages that mention the caller user, for example: @@ -2970,8 +3036,8 @@ public final UnaryCallable deleteMessageCallable() *

For advanced filtering, the following functions are also available: *

- `has_link()`: Returns only messages that have at least one hyperlink in the message * text. - `is_unread()`: Filters out messages that have been read by the calling user. - *

Using the `space.display_name` filter requires that the calling credentials include one - * of the following [authorization + *

Using the `space.display_name` or the `space.space_type` filters requires that the + * calling credentials include one of the following [authorization * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): *

- `https://www.googleapis.com/auth/chat.spaces.readonly` - * `https://www.googleapis.com/auth/chat.spaces` @@ -2996,6 +3062,8 @@ public final UnaryCallable deleteMessageCallable() * returns messages that are in spaces with display names containing both `Project` and * `Tasks`, whereas `space.display_name:Project OR space.display_name:Tasks` returns messages * that are in spaces with display names containing either `Project` or `Tasks` or both. - + * `space.space_type` supports only the `OR` operator, for example: `space.space_type = + * "DIRECT_MESSAGE" OR space.space_type = "GROUP_CHAT"`. - * `annotations.user_mentions.user.name` supports the operators `AND` and `OR`, but not a mix * of both. For example: `annotations.user_mentions.user.name:"users/1234567890" AND * annotations.user_mentions.user.name:"users/0987654321"` returns only messages that mentions @@ -3093,11 +3161,13 @@ public final SearchMessagesPagedResponse searchMessages( * member. - `space.display_name`: Supports the operator `:` (has) and filters spaces based on * a partial match of their display name. Results are limited to the top five space matches. * For example, `space.display_name:Project` searches for messages in the top five spaces that - * contain the word "Project" in their display names. - `attachment`: Supports the operator - * `:*` (has any) to check for the presence of attachments. If `attachment:*` is - * specified, only messages that have at least one attachment are returned. - - * `annotations.user_mentions.user.name`: The resource name of the mentioned user - * (`users/{user}`). Only supports `:` (has). For example: + * contain the word "Project" in their display names. - `space.space_type`: The type of the + * space. Only supports `=`. For example, `space.space_type="DIRECT_MESSAGE"` returns only + * messages from direct messages. The possible values are `DIRECT_MESSAGE`, `GROUP_CHAT`, and + * `SPACE`. - `attachment`: Supports the operator `:*` (has any) to check for the presence + * of attachments. If `attachment:*` is specified, only messages that have at least one + * attachment are returned. - `annotations.user_mentions.user.name`: The resource name of the + * mentioned user (`users/{user}`). Only supports `:` (has). For example: * `annotations.user_mentions.user.name:"users/1234567890"` returns only messages that contain * a mention to the specified user. Alternatively, the alias `me` can be used to filter for * messages that mention the caller user, for example: @@ -3106,8 +3176,8 @@ public final SearchMessagesPagedResponse searchMessages( *

For advanced filtering, the following functions are also available: *

- `has_link()`: Returns only messages that have at least one hyperlink in the message * text. - `is_unread()`: Filters out messages that have been read by the calling user. - *

Using the `space.display_name` filter requires that the calling credentials include one - * of the following [authorization + *

Using the `space.display_name` or the `space.space_type` filters requires that the + * calling credentials include one of the following [authorization * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): *

- `https://www.googleapis.com/auth/chat.spaces.readonly` - * `https://www.googleapis.com/auth/chat.spaces` @@ -3132,6 +3202,8 @@ public final SearchMessagesPagedResponse searchMessages( * returns messages that are in spaces with display names containing both `Project` and * `Tasks`, whereas `space.display_name:Project OR space.display_name:Tasks` returns messages * that are in spaces with display names containing either `Project` or `Tasks` or both. - + * `space.space_type` supports only the `OR` operator, for example: `space.space_type = + * "DIRECT_MESSAGE" OR space.space_type = "GROUP_CHAT"`. - * `annotations.user_mentions.user.name` supports the operators `AND` and `OR`, but not a mix * of both. For example: `annotations.user_mentions.user.name:"users/1234567890" AND * annotations.user_mentions.user.name:"users/0987654321"` returns only messages that mentions @@ -6569,6 +6641,527 @@ public final UnaryCallable deleteReactionCallable( return stub.deleteReactionCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists message pins in a space. Users can pin important messages in spaces for easy access. For + * more information, see [Pin or unpin a conversation in Google + * Chat](https://support.google.com/chat/answer/15622437). + * + *

Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * with one of the following [authorization + * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + * + *

- `https://www.googleapis.com/auth/chat.spaces.pins.readonly` - + * `https://www.googleapis.com/auth/chat.spaces.pins` - + * `https://www.googleapis.com/auth/chat.spaces.readonly` - + * `https://www.googleapis.com/auth/chat.spaces` + * + *

Sample code: + * + *

{@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 (ChatServiceClient chatServiceClient = ChatServiceClient.create()) {
+   *   SpaceName parent = SpaceName.of("[SPACE]");
+   *   for (MessagePin element : chatServiceClient.listMessagePins(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent space which owns the collection of pinned items Format: + * `spaces/{space}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListMessagePinsPagedResponse listMessagePins(@Nullable SpaceName parent) { + ListMessagePinsRequest request = + ListMessagePinsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listMessagePins(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists message pins in a space. Users can pin important messages in spaces for easy access. For + * more information, see [Pin or unpin a conversation in Google + * Chat](https://support.google.com/chat/answer/15622437). + * + *

Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * with one of the following [authorization + * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + * + *

- `https://www.googleapis.com/auth/chat.spaces.pins.readonly` - + * `https://www.googleapis.com/auth/chat.spaces.pins` - + * `https://www.googleapis.com/auth/chat.spaces.readonly` - + * `https://www.googleapis.com/auth/chat.spaces` + * + *

Sample code: + * + *

{@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 (ChatServiceClient chatServiceClient = ChatServiceClient.create()) {
+   *   String parent = SpaceName.of("[SPACE]").toString();
+   *   for (MessagePin element : chatServiceClient.listMessagePins(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent space which owns the collection of pinned items Format: + * `spaces/{space}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListMessagePinsPagedResponse listMessagePins(String parent) { + ListMessagePinsRequest request = ListMessagePinsRequest.newBuilder().setParent(parent).build(); + return listMessagePins(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists message pins in a space. Users can pin important messages in spaces for easy access. For + * more information, see [Pin or unpin a conversation in Google + * Chat](https://support.google.com/chat/answer/15622437). + * + *

Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * with one of the following [authorization + * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + * + *

- `https://www.googleapis.com/auth/chat.spaces.pins.readonly` - + * `https://www.googleapis.com/auth/chat.spaces.pins` - + * `https://www.googleapis.com/auth/chat.spaces.readonly` - + * `https://www.googleapis.com/auth/chat.spaces` + * + *

Sample code: + * + *

{@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 (ChatServiceClient chatServiceClient = ChatServiceClient.create()) {
+   *   ListMessagePinsRequest request =
+   *       ListMessagePinsRequest.newBuilder()
+   *           .setParent(SpaceName.of("[SPACE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (MessagePin element : chatServiceClient.listMessagePins(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param 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 + */ + public final ListMessagePinsPagedResponse listMessagePins(ListMessagePinsRequest request) { + return listMessagePinsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists message pins in a space. Users can pin important messages in spaces for easy access. For + * more information, see [Pin or unpin a conversation in Google + * Chat](https://support.google.com/chat/answer/15622437). + * + *

Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * with one of the following [authorization + * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + * + *

- `https://www.googleapis.com/auth/chat.spaces.pins.readonly` - + * `https://www.googleapis.com/auth/chat.spaces.pins` - + * `https://www.googleapis.com/auth/chat.spaces.readonly` - + * `https://www.googleapis.com/auth/chat.spaces` + * + *

Sample code: + * + *

{@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 (ChatServiceClient chatServiceClient = ChatServiceClient.create()) {
+   *   ListMessagePinsRequest request =
+   *       ListMessagePinsRequest.newBuilder()
+   *           .setParent(SpaceName.of("[SPACE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       chatServiceClient.listMessagePinsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (MessagePin element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listMessagePinsPagedCallable() { + return stub.listMessagePinsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists message pins in a space. Users can pin important messages in spaces for easy access. For + * more information, see [Pin or unpin a conversation in Google + * Chat](https://support.google.com/chat/answer/15622437). + * + *

Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * with one of the following [authorization + * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + * + *

- `https://www.googleapis.com/auth/chat.spaces.pins.readonly` - + * `https://www.googleapis.com/auth/chat.spaces.pins` - + * `https://www.googleapis.com/auth/chat.spaces.readonly` - + * `https://www.googleapis.com/auth/chat.spaces` + * + *

Sample code: + * + *

{@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 (ChatServiceClient chatServiceClient = ChatServiceClient.create()) {
+   *   ListMessagePinsRequest request =
+   *       ListMessagePinsRequest.newBuilder()
+   *           .setParent(SpaceName.of("[SPACE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListMessagePinsResponse response =
+   *         chatServiceClient.listMessagePinsCallable().call(request);
+   *     for (MessagePin element : response.getMessagePinsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listMessagePinsCallable() { + return stub.listMessagePinsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a message pin. + * + *

Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * with one of the following [authorization + * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + * + *

- `https://www.googleapis.com/auth/chat.spaces.pins` - + * `https://www.googleapis.com/auth/chat.spaces` + * + *

Sample code: + * + *

{@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 (ChatServiceClient chatServiceClient = ChatServiceClient.create()) {
+   *   SpaceName parent = SpaceName.of("[SPACE]");
+   *   MessagePin messagePin = MessagePin.newBuilder().build();
+   *   MessagePin response = chatServiceClient.createMessagePin(parent, messagePin);
+   * }
+   * }
+ * + * @param parent Required. The parent space in which to create the message pin. Format: + * spaces/{space} + * @param messagePin Required. The MessagePin to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final MessagePin createMessagePin(@Nullable SpaceName parent, MessagePin messagePin) { + CreateMessagePinRequest request = + CreateMessagePinRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setMessagePin(messagePin) + .build(); + return createMessagePin(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a message pin. + * + *

Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * with one of the following [authorization + * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + * + *

- `https://www.googleapis.com/auth/chat.spaces.pins` - + * `https://www.googleapis.com/auth/chat.spaces` + * + *

Sample code: + * + *

{@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 (ChatServiceClient chatServiceClient = ChatServiceClient.create()) {
+   *   String parent = SpaceName.of("[SPACE]").toString();
+   *   MessagePin messagePin = MessagePin.newBuilder().build();
+   *   MessagePin response = chatServiceClient.createMessagePin(parent, messagePin);
+   * }
+   * }
+ * + * @param parent Required. The parent space in which to create the message pin. Format: + * spaces/{space} + * @param messagePin Required. The MessagePin to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final MessagePin createMessagePin(String parent, MessagePin messagePin) { + CreateMessagePinRequest request = + CreateMessagePinRequest.newBuilder().setParent(parent).setMessagePin(messagePin).build(); + return createMessagePin(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a message pin. + * + *

Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * with one of the following [authorization + * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + * + *

- `https://www.googleapis.com/auth/chat.spaces.pins` - + * `https://www.googleapis.com/auth/chat.spaces` + * + *

Sample code: + * + *

{@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 (ChatServiceClient chatServiceClient = ChatServiceClient.create()) {
+   *   CreateMessagePinRequest request =
+   *       CreateMessagePinRequest.newBuilder()
+   *           .setParent(SpaceName.of("[SPACE]").toString())
+   *           .setMessagePin(MessagePin.newBuilder().build())
+   *           .build();
+   *   MessagePin response = chatServiceClient.createMessagePin(request);
+   * }
+   * }
+ * + * @param 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 + */ + public final MessagePin createMessagePin(CreateMessagePinRequest request) { + return createMessagePinCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a message pin. + * + *

Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * with one of the following [authorization + * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + * + *

- `https://www.googleapis.com/auth/chat.spaces.pins` - + * `https://www.googleapis.com/auth/chat.spaces` + * + *

Sample code: + * + *

{@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 (ChatServiceClient chatServiceClient = ChatServiceClient.create()) {
+   *   CreateMessagePinRequest request =
+   *       CreateMessagePinRequest.newBuilder()
+   *           .setParent(SpaceName.of("[SPACE]").toString())
+   *           .setMessagePin(MessagePin.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       chatServiceClient.createMessagePinCallable().futureCall(request);
+   *   // Do something.
+   *   MessagePin response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createMessagePinCallable() { + return stub.createMessagePinCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a message pin. + * + *

Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * with one of the following [authorization + * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + * + *

- `https://www.googleapis.com/auth/chat.spaces.pins` - + * `https://www.googleapis.com/auth/chat.spaces` + * + *

Sample code: + * + *

{@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 (ChatServiceClient chatServiceClient = ChatServiceClient.create()) {
+   *   MessagePinName name = MessagePinName.of("[SPACE]", "[MESSAGE_PIN]");
+   *   chatServiceClient.deleteMessagePin(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the message pin to remove. Format: + * spaces/{space}/messagePins/{message_pin} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteMessagePin(@Nullable MessagePinName name) { + DeleteMessagePinRequest request = + DeleteMessagePinRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteMessagePin(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a message pin. + * + *

Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * with one of the following [authorization + * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + * + *

- `https://www.googleapis.com/auth/chat.spaces.pins` - + * `https://www.googleapis.com/auth/chat.spaces` + * + *

Sample code: + * + *

{@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 (ChatServiceClient chatServiceClient = ChatServiceClient.create()) {
+   *   String name = MessagePinName.of("[SPACE]", "[MESSAGE_PIN]").toString();
+   *   chatServiceClient.deleteMessagePin(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the message pin to remove. Format: + * spaces/{space}/messagePins/{message_pin} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteMessagePin(String name) { + DeleteMessagePinRequest request = DeleteMessagePinRequest.newBuilder().setName(name).build(); + deleteMessagePin(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a message pin. + * + *

Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * with one of the following [authorization + * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + * + *

- `https://www.googleapis.com/auth/chat.spaces.pins` - + * `https://www.googleapis.com/auth/chat.spaces` + * + *

Sample code: + * + *

{@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 (ChatServiceClient chatServiceClient = ChatServiceClient.create()) {
+   *   DeleteMessagePinRequest request =
+   *       DeleteMessagePinRequest.newBuilder()
+   *           .setName(MessagePinName.of("[SPACE]", "[MESSAGE_PIN]").toString())
+   *           .build();
+   *   chatServiceClient.deleteMessagePin(request);
+   * }
+   * }
+ * + * @param 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 + */ + public final void deleteMessagePin(DeleteMessagePinRequest request) { + deleteMessagePinCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a message pin. + * + *

Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * with one of the following [authorization + * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + * + *

- `https://www.googleapis.com/auth/chat.spaces.pins` - + * `https://www.googleapis.com/auth/chat.spaces` + * + *

Sample code: + * + *

{@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 (ChatServiceClient chatServiceClient = ChatServiceClient.create()) {
+   *   DeleteMessagePinRequest request =
+   *       DeleteMessagePinRequest.newBuilder()
+   *           .setName(MessagePinName.of("[SPACE]", "[MESSAGE_PIN]").toString())
+   *           .build();
+   *   ApiFuture future = chatServiceClient.deleteMessagePinCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteMessagePinCallable() { + return stub.deleteMessagePinCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a custom emoji. @@ -10952,6 +11545,83 @@ protected ListReactionsFixedSizeCollection createCollection( } } + public static class ListMessagePinsPagedResponse + extends AbstractPagedListResponse< + ListMessagePinsRequest, + ListMessagePinsResponse, + MessagePin, + ListMessagePinsPage, + ListMessagePinsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListMessagePinsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListMessagePinsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListMessagePinsPagedResponse(ListMessagePinsPage page) { + super(page, ListMessagePinsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListMessagePinsPage + extends AbstractPage< + ListMessagePinsRequest, ListMessagePinsResponse, MessagePin, ListMessagePinsPage> { + + private ListMessagePinsPage( + @Nullable PageContext context, + @Nullable ListMessagePinsResponse response) { + super(context, response); + } + + private static ListMessagePinsPage createEmptyPage() { + return new ListMessagePinsPage(null, null); + } + + @Override + protected ListMessagePinsPage createPage( + @Nullable PageContext context, + @Nullable ListMessagePinsResponse response) { + return new ListMessagePinsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + @Nullable PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListMessagePinsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListMessagePinsRequest, + ListMessagePinsResponse, + MessagePin, + ListMessagePinsPage, + ListMessagePinsFixedSizeCollection> { + + private ListMessagePinsFixedSizeCollection( + @Nullable List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListMessagePinsFixedSizeCollection createEmptyCollection() { + return new ListMessagePinsFixedSizeCollection(null, 0); + } + + @Override + protected ListMessagePinsFixedSizeCollection createCollection( + @Nullable List pages, int collectionSize) { + return new ListMessagePinsFixedSizeCollection(pages, collectionSize); + } + } + public static class ListCustomEmojisPagedResponse extends AbstractPagedListResponse< ListCustomEmojisRequest, diff --git a/java-chat/google-cloud-chat/src/main/java/com/google/chat/v1/ChatServiceSettings.java b/java-chat/google-cloud-chat/src/main/java/com/google/chat/v1/ChatServiceSettings.java index ee82d80a0203..ef886401b1e5 100644 --- a/java-chat/google-cloud-chat/src/main/java/com/google/chat/v1/ChatServiceSettings.java +++ b/java-chat/google-cloud-chat/src/main/java/com/google/chat/v1/ChatServiceSettings.java @@ -19,6 +19,7 @@ import static com.google.chat.v1.ChatServiceClient.FindGroupChatsPagedResponse; import static com.google.chat.v1.ChatServiceClient.ListCustomEmojisPagedResponse; import static com.google.chat.v1.ChatServiceClient.ListMembershipsPagedResponse; +import static com.google.chat.v1.ChatServiceClient.ListMessagePinsPagedResponse; import static com.google.chat.v1.ChatServiceClient.ListMessagesPagedResponse; import static com.google.chat.v1.ChatServiceClient.ListReactionsPagedResponse; import static com.google.chat.v1.ChatServiceClient.ListSectionItemsPagedResponse; @@ -243,6 +244,23 @@ public UnaryCallSettings deleteReactionSettings() return ((ChatServiceStubSettings) getStubSettings()).deleteReactionSettings(); } + /** Returns the object with the settings used for calls to listMessagePins. */ + public PagedCallSettings< + ListMessagePinsRequest, ListMessagePinsResponse, ListMessagePinsPagedResponse> + listMessagePinsSettings() { + return ((ChatServiceStubSettings) getStubSettings()).listMessagePinsSettings(); + } + + /** Returns the object with the settings used for calls to createMessagePin. */ + public UnaryCallSettings createMessagePinSettings() { + return ((ChatServiceStubSettings) getStubSettings()).createMessagePinSettings(); + } + + /** Returns the object with the settings used for calls to deleteMessagePin. */ + public UnaryCallSettings deleteMessagePinSettings() { + return ((ChatServiceStubSettings) getStubSettings()).deleteMessagePinSettings(); + } + /** Returns the object with the settings used for calls to createCustomEmoji. */ public UnaryCallSettings createCustomEmojiSettings() { return ((ChatServiceStubSettings) getStubSettings()).createCustomEmojiSettings(); @@ -630,6 +648,24 @@ public UnaryCallSettings.Builder deleteReactionSet return getStubSettingsBuilder().deleteReactionSettings(); } + /** Returns the builder for the settings used for calls to listMessagePins. */ + public PagedCallSettings.Builder< + ListMessagePinsRequest, ListMessagePinsResponse, ListMessagePinsPagedResponse> + listMessagePinsSettings() { + return getStubSettingsBuilder().listMessagePinsSettings(); + } + + /** Returns the builder for the settings used for calls to createMessagePin. */ + public UnaryCallSettings.Builder + createMessagePinSettings() { + return getStubSettingsBuilder().createMessagePinSettings(); + } + + /** Returns the builder for the settings used for calls to deleteMessagePin. */ + public UnaryCallSettings.Builder deleteMessagePinSettings() { + return getStubSettingsBuilder().deleteMessagePinSettings(); + } + /** Returns the builder for the settings used for calls to createCustomEmoji. */ public UnaryCallSettings.Builder createCustomEmojiSettings() { diff --git a/java-chat/google-cloud-chat/src/main/java/com/google/chat/v1/gapic_metadata.json b/java-chat/google-cloud-chat/src/main/java/com/google/chat/v1/gapic_metadata.json index ecbc31975d85..9ab0abf62c61 100644 --- a/java-chat/google-cloud-chat/src/main/java/com/google/chat/v1/gapic_metadata.json +++ b/java-chat/google-cloud-chat/src/main/java/com/google/chat/v1/gapic_metadata.json @@ -22,6 +22,9 @@ "CreateMessage": { "methods": ["createMessage", "createMessage", "createMessage", "createMessageCallable"] }, + "CreateMessagePin": { + "methods": ["createMessagePin", "createMessagePin", "createMessagePin", "createMessagePinCallable"] + }, "CreateReaction": { "methods": ["createReaction", "createReaction", "createReaction", "createReactionCallable"] }, @@ -40,6 +43,9 @@ "DeleteMessage": { "methods": ["deleteMessage", "deleteMessage", "deleteMessage", "deleteMessageCallable"] }, + "DeleteMessagePin": { + "methods": ["deleteMessagePin", "deleteMessagePin", "deleteMessagePin", "deleteMessagePinCallable"] + }, "DeleteReaction": { "methods": ["deleteReaction", "deleteReaction", "deleteReaction", "deleteReactionCallable"] }, @@ -91,6 +97,9 @@ "ListMemberships": { "methods": ["listMemberships", "listMemberships", "listMemberships", "listMembershipsPagedCallable", "listMembershipsCallable"] }, + "ListMessagePins": { + "methods": ["listMessagePins", "listMessagePins", "listMessagePins", "listMessagePinsPagedCallable", "listMessagePinsCallable"] + }, "ListMessages": { "methods": ["listMessages", "listMessages", "listMessages", "listMessagesPagedCallable", "listMessagesCallable"] }, diff --git a/java-chat/google-cloud-chat/src/main/java/com/google/chat/v1/stub/ChatServiceStub.java b/java-chat/google-cloud-chat/src/main/java/com/google/chat/v1/stub/ChatServiceStub.java index b47b22b8f381..e60b54d8b0b2 100644 --- a/java-chat/google-cloud-chat/src/main/java/com/google/chat/v1/stub/ChatServiceStub.java +++ b/java-chat/google-cloud-chat/src/main/java/com/google/chat/v1/stub/ChatServiceStub.java @@ -19,6 +19,7 @@ import static com.google.chat.v1.ChatServiceClient.FindGroupChatsPagedResponse; import static com.google.chat.v1.ChatServiceClient.ListCustomEmojisPagedResponse; import static com.google.chat.v1.ChatServiceClient.ListMembershipsPagedResponse; +import static com.google.chat.v1.ChatServiceClient.ListMessagePinsPagedResponse; import static com.google.chat.v1.ChatServiceClient.ListMessagesPagedResponse; import static com.google.chat.v1.ChatServiceClient.ListReactionsPagedResponse; import static com.google.chat.v1.ChatServiceClient.ListSectionItemsPagedResponse; @@ -36,6 +37,7 @@ import com.google.chat.v1.CompleteImportSpaceResponse; import com.google.chat.v1.CreateCustomEmojiRequest; import com.google.chat.v1.CreateMembershipRequest; +import com.google.chat.v1.CreateMessagePinRequest; import com.google.chat.v1.CreateMessageRequest; import com.google.chat.v1.CreateReactionRequest; import com.google.chat.v1.CreateSectionRequest; @@ -43,6 +45,7 @@ import com.google.chat.v1.CustomEmoji; import com.google.chat.v1.DeleteCustomEmojiRequest; import com.google.chat.v1.DeleteMembershipRequest; +import com.google.chat.v1.DeleteMessagePinRequest; import com.google.chat.v1.DeleteMessageRequest; import com.google.chat.v1.DeleteReactionRequest; import com.google.chat.v1.DeleteSectionRequest; @@ -64,6 +67,8 @@ import com.google.chat.v1.ListCustomEmojisResponse; import com.google.chat.v1.ListMembershipsRequest; import com.google.chat.v1.ListMembershipsResponse; +import com.google.chat.v1.ListMessagePinsRequest; +import com.google.chat.v1.ListMessagePinsResponse; import com.google.chat.v1.ListMessagesRequest; import com.google.chat.v1.ListMessagesResponse; import com.google.chat.v1.ListReactionsRequest; @@ -81,6 +86,7 @@ import com.google.chat.v1.MarkAsDoNotDisturbRequest; import com.google.chat.v1.Membership; import com.google.chat.v1.Message; +import com.google.chat.v1.MessagePin; import com.google.chat.v1.MoveSectionItemRequest; import com.google.chat.v1.MoveSectionItemResponse; import com.google.chat.v1.PositionSectionRequest; @@ -258,6 +264,23 @@ public UnaryCallable deleteReactionCallable() { throw new UnsupportedOperationException("Not implemented: deleteReactionCallable()"); } + public UnaryCallable + listMessagePinsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listMessagePinsPagedCallable()"); + } + + public UnaryCallable listMessagePinsCallable() { + throw new UnsupportedOperationException("Not implemented: listMessagePinsCallable()"); + } + + public UnaryCallable createMessagePinCallable() { + throw new UnsupportedOperationException("Not implemented: createMessagePinCallable()"); + } + + public UnaryCallable deleteMessagePinCallable() { + throw new UnsupportedOperationException("Not implemented: deleteMessagePinCallable()"); + } + public UnaryCallable createCustomEmojiCallable() { throw new UnsupportedOperationException("Not implemented: createCustomEmojiCallable()"); } diff --git a/java-chat/google-cloud-chat/src/main/java/com/google/chat/v1/stub/ChatServiceStubSettings.java b/java-chat/google-cloud-chat/src/main/java/com/google/chat/v1/stub/ChatServiceStubSettings.java index 1682446e1d32..ce502326f913 100644 --- a/java-chat/google-cloud-chat/src/main/java/com/google/chat/v1/stub/ChatServiceStubSettings.java +++ b/java-chat/google-cloud-chat/src/main/java/com/google/chat/v1/stub/ChatServiceStubSettings.java @@ -19,6 +19,7 @@ import static com.google.chat.v1.ChatServiceClient.FindGroupChatsPagedResponse; import static com.google.chat.v1.ChatServiceClient.ListCustomEmojisPagedResponse; import static com.google.chat.v1.ChatServiceClient.ListMembershipsPagedResponse; +import static com.google.chat.v1.ChatServiceClient.ListMessagePinsPagedResponse; import static com.google.chat.v1.ChatServiceClient.ListMessagesPagedResponse; import static com.google.chat.v1.ChatServiceClient.ListReactionsPagedResponse; import static com.google.chat.v1.ChatServiceClient.ListSectionItemsPagedResponse; @@ -61,6 +62,7 @@ import com.google.chat.v1.CompleteImportSpaceResponse; import com.google.chat.v1.CreateCustomEmojiRequest; import com.google.chat.v1.CreateMembershipRequest; +import com.google.chat.v1.CreateMessagePinRequest; import com.google.chat.v1.CreateMessageRequest; import com.google.chat.v1.CreateReactionRequest; import com.google.chat.v1.CreateSectionRequest; @@ -68,6 +70,7 @@ import com.google.chat.v1.CustomEmoji; import com.google.chat.v1.DeleteCustomEmojiRequest; import com.google.chat.v1.DeleteMembershipRequest; +import com.google.chat.v1.DeleteMessagePinRequest; import com.google.chat.v1.DeleteMessageRequest; import com.google.chat.v1.DeleteReactionRequest; import com.google.chat.v1.DeleteSectionRequest; @@ -89,6 +92,8 @@ import com.google.chat.v1.ListCustomEmojisResponse; import com.google.chat.v1.ListMembershipsRequest; import com.google.chat.v1.ListMembershipsResponse; +import com.google.chat.v1.ListMessagePinsRequest; +import com.google.chat.v1.ListMessagePinsResponse; import com.google.chat.v1.ListMessagesRequest; import com.google.chat.v1.ListMessagesResponse; import com.google.chat.v1.ListReactionsRequest; @@ -106,6 +111,7 @@ import com.google.chat.v1.MarkAsDoNotDisturbRequest; import com.google.chat.v1.Membership; import com.google.chat.v1.Message; +import com.google.chat.v1.MessagePin; import com.google.chat.v1.MoveSectionItemRequest; import com.google.chat.v1.MoveSectionItemResponse; import com.google.chat.v1.PositionSectionRequest; @@ -233,6 +239,8 @@ public class ChatServiceStubSettings extends StubSettings listReactionsSettings; private final UnaryCallSettings deleteReactionSettings; + private final PagedCallSettings< + ListMessagePinsRequest, ListMessagePinsResponse, ListMessagePinsPagedResponse> + listMessagePinsSettings; + private final UnaryCallSettings createMessagePinSettings; + private final UnaryCallSettings deleteMessagePinSettings; private final UnaryCallSettings createCustomEmojiSettings; private final UnaryCallSettings getCustomEmojiSettings; private final PagedCallSettings< @@ -570,6 +583,43 @@ public Iterable extractResources(ListReactionsResponse payload) { } }; + private static final PagedListDescriptor< + ListMessagePinsRequest, ListMessagePinsResponse, MessagePin> + LIST_MESSAGE_PINS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListMessagePinsRequest injectToken( + ListMessagePinsRequest payload, String token) { + return ListMessagePinsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListMessagePinsRequest injectPageSize( + ListMessagePinsRequest payload, int pageSize) { + return ListMessagePinsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListMessagePinsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListMessagePinsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListMessagePinsResponse payload) { + return payload.getMessagePinsList(); + } + }; + private static final PagedListDescriptor< ListCustomEmojisRequest, ListCustomEmojisResponse, CustomEmoji> LIST_CUSTOM_EMOJIS_PAGE_STR_DESC = @@ -837,6 +887,23 @@ public ApiFuture getFuturePagedResponse( } }; + private static final PagedListResponseFactory< + ListMessagePinsRequest, ListMessagePinsResponse, ListMessagePinsPagedResponse> + LIST_MESSAGE_PINS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListMessagePinsRequest, ListMessagePinsResponse, ListMessagePinsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListMessagePinsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_MESSAGE_PINS_PAGE_STR_DESC, request, context); + return ListMessagePinsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + private static final PagedListResponseFactory< ListCustomEmojisRequest, ListCustomEmojisResponse, ListCustomEmojisPagedResponse> LIST_CUSTOM_EMOJIS_PAGE_STR_FACT = @@ -1051,6 +1118,23 @@ public UnaryCallSettings deleteReactionSettings() return deleteReactionSettings; } + /** Returns the object with the settings used for calls to listMessagePins. */ + public PagedCallSettings< + ListMessagePinsRequest, ListMessagePinsResponse, ListMessagePinsPagedResponse> + listMessagePinsSettings() { + return listMessagePinsSettings; + } + + /** Returns the object with the settings used for calls to createMessagePin. */ + public UnaryCallSettings createMessagePinSettings() { + return createMessagePinSettings; + } + + /** Returns the object with the settings used for calls to deleteMessagePin. */ + public UnaryCallSettings deleteMessagePinSettings() { + return deleteMessagePinSettings; + } + /** Returns the object with the settings used for calls to createCustomEmoji. */ public UnaryCallSettings createCustomEmojiSettings() { return createCustomEmojiSettings; @@ -1316,6 +1400,9 @@ protected ChatServiceStubSettings(Builder settingsBuilder) throws IOException { createReactionSettings = settingsBuilder.createReactionSettings().build(); listReactionsSettings = settingsBuilder.listReactionsSettings().build(); deleteReactionSettings = settingsBuilder.deleteReactionSettings().build(); + listMessagePinsSettings = settingsBuilder.listMessagePinsSettings().build(); + createMessagePinSettings = settingsBuilder.createMessagePinSettings().build(); + deleteMessagePinSettings = settingsBuilder.deleteMessagePinSettings().build(); createCustomEmojiSettings = settingsBuilder.createCustomEmojiSettings().build(); getCustomEmojiSettings = settingsBuilder.getCustomEmojiSettings().build(); listCustomEmojisSettings = settingsBuilder.listCustomEmojisSettings().build(); @@ -1401,6 +1488,13 @@ public static class Builder extends StubSettings.Builder listReactionsSettings; private final UnaryCallSettings.Builder deleteReactionSettings; + private final PagedCallSettings.Builder< + ListMessagePinsRequest, ListMessagePinsResponse, ListMessagePinsPagedResponse> + listMessagePinsSettings; + private final UnaryCallSettings.Builder + createMessagePinSettings; + private final UnaryCallSettings.Builder + deleteMessagePinSettings; private final UnaryCallSettings.Builder createCustomEmojiSettings; private final UnaryCallSettings.Builder @@ -1456,6 +1550,7 @@ public static class Builder extends StubSettings.BuildernewArrayList(StatusCode.Code.UNAVAILABLE))); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); RETRYABLE_CODE_DEFINITIONS = definitions.build(); } @@ -1475,6 +1570,8 @@ public static class Builder extends StubSettings.Builder deleteReactionSet return deleteReactionSettings; } + /** Returns the builder for the settings used for calls to listMessagePins. */ + public PagedCallSettings.Builder< + ListMessagePinsRequest, ListMessagePinsResponse, ListMessagePinsPagedResponse> + listMessagePinsSettings() { + return listMessagePinsSettings; + } + + /** Returns the builder for the settings used for calls to createMessagePin. */ + public UnaryCallSettings.Builder + createMessagePinSettings() { + return createMessagePinSettings; + } + + /** Returns the builder for the settings used for calls to deleteMessagePin. */ + public UnaryCallSettings.Builder deleteMessagePinSettings() { + return deleteMessagePinSettings; + } + /** Returns the builder for the settings used for calls to createCustomEmoji. */ public UnaryCallSettings.Builder createCustomEmojiSettings() { diff --git a/java-chat/google-cloud-chat/src/main/java/com/google/chat/v1/stub/GrpcChatServiceStub.java b/java-chat/google-cloud-chat/src/main/java/com/google/chat/v1/stub/GrpcChatServiceStub.java index 48c01a0ae7ae..dce4416c2ff5 100644 --- a/java-chat/google-cloud-chat/src/main/java/com/google/chat/v1/stub/GrpcChatServiceStub.java +++ b/java-chat/google-cloud-chat/src/main/java/com/google/chat/v1/stub/GrpcChatServiceStub.java @@ -19,6 +19,7 @@ import static com.google.chat.v1.ChatServiceClient.FindGroupChatsPagedResponse; import static com.google.chat.v1.ChatServiceClient.ListCustomEmojisPagedResponse; import static com.google.chat.v1.ChatServiceClient.ListMembershipsPagedResponse; +import static com.google.chat.v1.ChatServiceClient.ListMessagePinsPagedResponse; import static com.google.chat.v1.ChatServiceClient.ListMessagesPagedResponse; import static com.google.chat.v1.ChatServiceClient.ListReactionsPagedResponse; import static com.google.chat.v1.ChatServiceClient.ListSectionItemsPagedResponse; @@ -41,6 +42,7 @@ import com.google.chat.v1.CompleteImportSpaceResponse; import com.google.chat.v1.CreateCustomEmojiRequest; import com.google.chat.v1.CreateMembershipRequest; +import com.google.chat.v1.CreateMessagePinRequest; import com.google.chat.v1.CreateMessageRequest; import com.google.chat.v1.CreateReactionRequest; import com.google.chat.v1.CreateSectionRequest; @@ -48,6 +50,7 @@ import com.google.chat.v1.CustomEmoji; import com.google.chat.v1.DeleteCustomEmojiRequest; import com.google.chat.v1.DeleteMembershipRequest; +import com.google.chat.v1.DeleteMessagePinRequest; import com.google.chat.v1.DeleteMessageRequest; import com.google.chat.v1.DeleteReactionRequest; import com.google.chat.v1.DeleteSectionRequest; @@ -69,6 +72,8 @@ import com.google.chat.v1.ListCustomEmojisResponse; import com.google.chat.v1.ListMembershipsRequest; import com.google.chat.v1.ListMembershipsResponse; +import com.google.chat.v1.ListMessagePinsRequest; +import com.google.chat.v1.ListMessagePinsResponse; import com.google.chat.v1.ListMessagesRequest; import com.google.chat.v1.ListMessagesResponse; import com.google.chat.v1.ListReactionsRequest; @@ -86,6 +91,7 @@ import com.google.chat.v1.MarkAsDoNotDisturbRequest; import com.google.chat.v1.Membership; import com.google.chat.v1.Message; +import com.google.chat.v1.MessagePin; import com.google.chat.v1.MoveSectionItemRequest; import com.google.chat.v1.MoveSectionItemResponse; import com.google.chat.v1.PositionSectionRequest; @@ -406,6 +412,40 @@ public class GrpcChatServiceStub extends ChatServiceStub { .setSampledToLocalTracing(true) .build(); + private static final MethodDescriptor + listMessagePinsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.chat.v1.ChatService/ListMessagePins") + .setRequestMarshaller( + ProtoUtils.marshaller(ListMessagePinsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListMessagePinsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + createMessagePinMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.chat.v1.ChatService/CreateMessagePin") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateMessagePinRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(MessagePin.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + deleteMessagePinMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.chat.v1.ChatService/DeleteMessagePin") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteMessagePinRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + private static final MethodDescriptor createCustomEmojiMethodDescriptor = MethodDescriptor.newBuilder() @@ -708,6 +748,12 @@ public class GrpcChatServiceStub extends ChatServiceStub { private final UnaryCallable listReactionsPagedCallable; private final UnaryCallable deleteReactionCallable; + private final UnaryCallable + listMessagePinsCallable; + private final UnaryCallable + listMessagePinsPagedCallable; + private final UnaryCallable createMessagePinCallable; + private final UnaryCallable deleteMessagePinCallable; private final UnaryCallable createCustomEmojiCallable; private final UnaryCallable getCustomEmojiCallable; private final UnaryCallable @@ -1037,6 +1083,40 @@ protected GrpcChatServiceStub( }) .setResourceNameExtractor(request -> request.getName()) .build(); + GrpcCallSettings + listMessagePinsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listMessagePinsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings createMessagePinTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createMessagePinMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings deleteMessagePinTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteMessagePinMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); GrpcCallSettings createCustomEmojiTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createCustomEmojiMethodDescriptor) @@ -1392,6 +1472,18 @@ protected GrpcChatServiceStub( this.deleteReactionCallable = callableFactory.createUnaryCallable( deleteReactionTransportSettings, settings.deleteReactionSettings(), clientContext); + this.listMessagePinsCallable = + callableFactory.createUnaryCallable( + listMessagePinsTransportSettings, settings.listMessagePinsSettings(), clientContext); + this.listMessagePinsPagedCallable = + callableFactory.createPagedCallable( + listMessagePinsTransportSettings, settings.listMessagePinsSettings(), clientContext); + this.createMessagePinCallable = + callableFactory.createUnaryCallable( + createMessagePinTransportSettings, settings.createMessagePinSettings(), clientContext); + this.deleteMessagePinCallable = + callableFactory.createUnaryCallable( + deleteMessagePinTransportSettings, settings.deleteMessagePinSettings(), clientContext); this.createCustomEmojiCallable = callableFactory.createUnaryCallable( createCustomEmojiTransportSettings, @@ -1671,6 +1763,27 @@ public UnaryCallable deleteReactionCallable() { return deleteReactionCallable; } + @Override + public UnaryCallable listMessagePinsCallable() { + return listMessagePinsCallable; + } + + @Override + public UnaryCallable + listMessagePinsPagedCallable() { + return listMessagePinsPagedCallable; + } + + @Override + public UnaryCallable createMessagePinCallable() { + return createMessagePinCallable; + } + + @Override + public UnaryCallable deleteMessagePinCallable() { + return deleteMessagePinCallable; + } + @Override public UnaryCallable createCustomEmojiCallable() { return createCustomEmojiCallable; diff --git a/java-chat/google-cloud-chat/src/main/java/com/google/chat/v1/stub/HttpJsonChatServiceStub.java b/java-chat/google-cloud-chat/src/main/java/com/google/chat/v1/stub/HttpJsonChatServiceStub.java index e30b9e842bd5..2debff5c7da4 100644 --- a/java-chat/google-cloud-chat/src/main/java/com/google/chat/v1/stub/HttpJsonChatServiceStub.java +++ b/java-chat/google-cloud-chat/src/main/java/com/google/chat/v1/stub/HttpJsonChatServiceStub.java @@ -19,6 +19,7 @@ import static com.google.chat.v1.ChatServiceClient.FindGroupChatsPagedResponse; import static com.google.chat.v1.ChatServiceClient.ListCustomEmojisPagedResponse; import static com.google.chat.v1.ChatServiceClient.ListMembershipsPagedResponse; +import static com.google.chat.v1.ChatServiceClient.ListMessagePinsPagedResponse; import static com.google.chat.v1.ChatServiceClient.ListMessagesPagedResponse; import static com.google.chat.v1.ChatServiceClient.ListReactionsPagedResponse; import static com.google.chat.v1.ChatServiceClient.ListSectionItemsPagedResponse; @@ -46,6 +47,7 @@ import com.google.chat.v1.CompleteImportSpaceResponse; import com.google.chat.v1.CreateCustomEmojiRequest; import com.google.chat.v1.CreateMembershipRequest; +import com.google.chat.v1.CreateMessagePinRequest; import com.google.chat.v1.CreateMessageRequest; import com.google.chat.v1.CreateReactionRequest; import com.google.chat.v1.CreateSectionRequest; @@ -53,6 +55,7 @@ import com.google.chat.v1.CustomEmoji; import com.google.chat.v1.DeleteCustomEmojiRequest; import com.google.chat.v1.DeleteMembershipRequest; +import com.google.chat.v1.DeleteMessagePinRequest; import com.google.chat.v1.DeleteMessageRequest; import com.google.chat.v1.DeleteReactionRequest; import com.google.chat.v1.DeleteSectionRequest; @@ -74,6 +77,8 @@ import com.google.chat.v1.ListCustomEmojisResponse; import com.google.chat.v1.ListMembershipsRequest; import com.google.chat.v1.ListMembershipsResponse; +import com.google.chat.v1.ListMessagePinsRequest; +import com.google.chat.v1.ListMessagePinsResponse; import com.google.chat.v1.ListMessagesRequest; import com.google.chat.v1.ListMessagesResponse; import com.google.chat.v1.ListReactionsRequest; @@ -91,6 +96,7 @@ import com.google.chat.v1.MarkAsDoNotDisturbRequest; import com.google.chat.v1.Membership; import com.google.chat.v1.Message; +import com.google.chat.v1.MessagePin; import com.google.chat.v1.MoveSectionItemRequest; import com.google.chat.v1.MoveSectionItemResponse; import com.google.chat.v1.PositionSectionRequest; @@ -1110,6 +1116,113 @@ public class HttpJsonChatServiceStub extends ChatServiceStub { .build()) .build(); + private static final ApiMethodDescriptor + listMessagePinsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.chat.v1.ChatService/ListMessagePins") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=spaces/*}/messagePins", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListMessagePinsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createMessagePinMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.chat.v1.ChatService/CreateMessagePin") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=spaces/*}/messagePins", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("messagePin", request.getMessagePin(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(MessagePin.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteMessagePinMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.chat.v1.ChatService/DeleteMessagePin") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=spaces/*/messagePins/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + private static final ApiMethodDescriptor createCustomEmojiMethodDescriptor = ApiMethodDescriptor.newBuilder() @@ -1995,6 +2108,12 @@ public class HttpJsonChatServiceStub extends ChatServiceStub { private final UnaryCallable listReactionsPagedCallable; private final UnaryCallable deleteReactionCallable; + private final UnaryCallable + listMessagePinsCallable; + private final UnaryCallable + listMessagePinsPagedCallable; + private final UnaryCallable createMessagePinCallable; + private final UnaryCallable deleteMessagePinCallable; private final UnaryCallable createCustomEmojiCallable; private final UnaryCallable getCustomEmojiCallable; private final UnaryCallable @@ -2352,6 +2471,43 @@ protected HttpJsonChatServiceStub( }) .setResourceNameExtractor(request -> request.getName()) .build(); + HttpJsonCallSettings + listMessagePinsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listMessagePinsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings createMessagePinTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createMessagePinMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings deleteMessagePinTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteMessagePinMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); HttpJsonCallSettings createCustomEmojiTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(createCustomEmojiMethodDescriptor) @@ -2733,6 +2889,18 @@ protected HttpJsonChatServiceStub( this.deleteReactionCallable = callableFactory.createUnaryCallable( deleteReactionTransportSettings, settings.deleteReactionSettings(), clientContext); + this.listMessagePinsCallable = + callableFactory.createUnaryCallable( + listMessagePinsTransportSettings, settings.listMessagePinsSettings(), clientContext); + this.listMessagePinsPagedCallable = + callableFactory.createPagedCallable( + listMessagePinsTransportSettings, settings.listMessagePinsSettings(), clientContext); + this.createMessagePinCallable = + callableFactory.createUnaryCallable( + createMessagePinTransportSettings, settings.createMessagePinSettings(), clientContext); + this.deleteMessagePinCallable = + callableFactory.createUnaryCallable( + deleteMessagePinTransportSettings, settings.deleteMessagePinSettings(), clientContext); this.createCustomEmojiCallable = callableFactory.createUnaryCallable( createCustomEmojiTransportSettings, @@ -2866,6 +3034,9 @@ public static List getMethodDescriptors() { methodDescriptors.add(createReactionMethodDescriptor); methodDescriptors.add(listReactionsMethodDescriptor); methodDescriptors.add(deleteReactionMethodDescriptor); + methodDescriptors.add(listMessagePinsMethodDescriptor); + methodDescriptors.add(createMessagePinMethodDescriptor); + methodDescriptors.add(deleteMessagePinMethodDescriptor); methodDescriptors.add(createCustomEmojiMethodDescriptor); methodDescriptors.add(getCustomEmojiMethodDescriptor); methodDescriptors.add(listCustomEmojisMethodDescriptor); @@ -3063,6 +3234,27 @@ public UnaryCallable deleteReactionCallable() { return deleteReactionCallable; } + @Override + public UnaryCallable listMessagePinsCallable() { + return listMessagePinsCallable; + } + + @Override + public UnaryCallable + listMessagePinsPagedCallable() { + return listMessagePinsPagedCallable; + } + + @Override + public UnaryCallable createMessagePinCallable() { + return createMessagePinCallable; + } + + @Override + public UnaryCallable deleteMessagePinCallable() { + return deleteMessagePinCallable; + } + @Override public UnaryCallable createCustomEmojiCallable() { return createCustomEmojiCallable; diff --git a/java-chat/google-cloud-chat/src/main/resources/META-INF/native-image/com.google.chat.v1/reflect-config.json b/java-chat/google-cloud-chat/src/main/resources/META-INF/native-image/com.google.chat.v1/reflect-config.json index aaeb71985837..cc014d8ad8b0 100644 --- a/java-chat/google-cloud-chat/src/main/resources/META-INF/native-image/com.google.chat.v1/reflect-config.json +++ b/java-chat/google-cloud-chat/src/main/resources/META-INF/native-image/com.google.chat.v1/reflect-config.json @@ -1628,6 +1628,33 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.chat.v1.AppCommandMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.chat.v1.AppCommandMetadata$AppCommandType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.chat.v1.AppCommandMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.chat.v1.AttachedGif", "queryAllDeclaredConstructors": true, @@ -1988,6 +2015,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.chat.v1.CreateMessagePinRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.chat.v1.CreateMessagePinRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.chat.v1.CreateMessageRequest", "queryAllDeclaredConstructors": true, @@ -2177,6 +2222,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.chat.v1.DeleteMessagePinRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.chat.v1.DeleteMessagePinRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.chat.v1.DeleteMessageRequest", "queryAllDeclaredConstructors": true, @@ -2753,6 +2816,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.chat.v1.ListMessagePinsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.chat.v1.ListMessagePinsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.chat.v1.ListMessagePinsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.chat.v1.ListMessagePinsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.chat.v1.ListMessagesRequest", "queryAllDeclaredConstructors": true, @@ -3347,6 +3446,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.chat.v1.MessagePin", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.chat.v1.MessagePin$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.chat.v1.MessageUpdatedEventData", "queryAllDeclaredConstructors": true, diff --git a/java-chat/google-cloud-chat/src/test/java/com/google/chat/v1/ChatServiceClientHttpJsonTest.java b/java-chat/google-cloud-chat/src/test/java/com/google/chat/v1/ChatServiceClientHttpJsonTest.java index d70c3f2f465a..bd96c780d106 100644 --- a/java-chat/google-cloud-chat/src/test/java/com/google/chat/v1/ChatServiceClientHttpJsonTest.java +++ b/java-chat/google-cloud-chat/src/test/java/com/google/chat/v1/ChatServiceClientHttpJsonTest.java @@ -19,6 +19,7 @@ import static com.google.chat.v1.ChatServiceClient.FindGroupChatsPagedResponse; import static com.google.chat.v1.ChatServiceClient.ListCustomEmojisPagedResponse; import static com.google.chat.v1.ChatServiceClient.ListMembershipsPagedResponse; +import static com.google.chat.v1.ChatServiceClient.ListMessagePinsPagedResponse; import static com.google.chat.v1.ChatServiceClient.ListMessagesPagedResponse; import static com.google.chat.v1.ChatServiceClient.ListReactionsPagedResponse; import static com.google.chat.v1.ChatServiceClient.ListSectionItemsPagedResponse; @@ -2360,6 +2361,280 @@ public void deleteReactionExceptionTest2() throws Exception { } } + @Test + public void listMessagePinsTest() throws Exception { + MessagePin responsesElement = MessagePin.newBuilder().build(); + ListMessagePinsResponse expectedResponse = + ListMessagePinsResponse.newBuilder() + .setNextPageToken("") + .addAllMessagePins(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + SpaceName parent = SpaceName.of("[SPACE]"); + + ListMessagePinsPagedResponse pagedListResponse = client.listMessagePins(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getMessagePinsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listMessagePinsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SpaceName parent = SpaceName.of("[SPACE]"); + client.listMessagePins(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listMessagePinsTest2() throws Exception { + MessagePin responsesElement = MessagePin.newBuilder().build(); + ListMessagePinsResponse expectedResponse = + ListMessagePinsResponse.newBuilder() + .setNextPageToken("") + .addAllMessagePins(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "spaces/space-3870"; + + ListMessagePinsPagedResponse pagedListResponse = client.listMessagePins(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getMessagePinsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listMessagePinsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "spaces/space-3870"; + client.listMessagePins(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createMessagePinTest() throws Exception { + MessagePin expectedResponse = + MessagePin.newBuilder() + .setName(MessagePinName.of("[SPACE]", "[MESSAGE_PIN]").toString()) + .setMessage(MessageName.of("[SPACE]", "[MESSAGE]").toString()) + .build(); + mockService.addResponse(expectedResponse); + + SpaceName parent = SpaceName.of("[SPACE]"); + MessagePin messagePin = MessagePin.newBuilder().build(); + + MessagePin actualResponse = client.createMessagePin(parent, messagePin); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createMessagePinExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SpaceName parent = SpaceName.of("[SPACE]"); + MessagePin messagePin = MessagePin.newBuilder().build(); + client.createMessagePin(parent, messagePin); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createMessagePinTest2() throws Exception { + MessagePin expectedResponse = + MessagePin.newBuilder() + .setName(MessagePinName.of("[SPACE]", "[MESSAGE_PIN]").toString()) + .setMessage(MessageName.of("[SPACE]", "[MESSAGE]").toString()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "spaces/space-3870"; + MessagePin messagePin = MessagePin.newBuilder().build(); + + MessagePin actualResponse = client.createMessagePin(parent, messagePin); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createMessagePinExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "spaces/space-3870"; + MessagePin messagePin = MessagePin.newBuilder().build(); + client.createMessagePin(parent, messagePin); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteMessagePinTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + MessagePinName name = MessagePinName.of("[SPACE]", "[MESSAGE_PIN]"); + + client.deleteMessagePin(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteMessagePinExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + MessagePinName name = MessagePinName.of("[SPACE]", "[MESSAGE_PIN]"); + client.deleteMessagePin(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteMessagePinTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = "spaces/space-4524/messagePins/messagePin-4524"; + + client.deleteMessagePin(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteMessagePinExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "spaces/space-4524/messagePins/messagePin-4524"; + client.deleteMessagePin(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void createCustomEmojiTest() throws Exception { CustomEmoji expectedResponse = diff --git a/java-chat/google-cloud-chat/src/test/java/com/google/chat/v1/ChatServiceClientTest.java b/java-chat/google-cloud-chat/src/test/java/com/google/chat/v1/ChatServiceClientTest.java index 72336cfa4a72..e1bd0a4b5252 100644 --- a/java-chat/google-cloud-chat/src/test/java/com/google/chat/v1/ChatServiceClientTest.java +++ b/java-chat/google-cloud-chat/src/test/java/com/google/chat/v1/ChatServiceClientTest.java @@ -19,6 +19,7 @@ import static com.google.chat.v1.ChatServiceClient.FindGroupChatsPagedResponse; import static com.google.chat.v1.ChatServiceClient.ListCustomEmojisPagedResponse; import static com.google.chat.v1.ChatServiceClient.ListMembershipsPagedResponse; +import static com.google.chat.v1.ChatServiceClient.ListMessagePinsPagedResponse; import static com.google.chat.v1.ChatServiceClient.ListMessagesPagedResponse; import static com.google.chat.v1.ChatServiceClient.ListReactionsPagedResponse; import static com.google.chat.v1.ChatServiceClient.ListSectionItemsPagedResponse; @@ -2028,6 +2029,246 @@ public void deleteReactionExceptionTest2() throws Exception { } } + @Test + public void listMessagePinsTest() throws Exception { + MessagePin responsesElement = MessagePin.newBuilder().build(); + ListMessagePinsResponse expectedResponse = + ListMessagePinsResponse.newBuilder() + .setNextPageToken("") + .addAllMessagePins(Arrays.asList(responsesElement)) + .build(); + mockChatService.addResponse(expectedResponse); + + SpaceName parent = SpaceName.of("[SPACE]"); + + ListMessagePinsPagedResponse pagedListResponse = client.listMessagePins(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getMessagePinsList().get(0), resources.get(0)); + + List actualRequests = mockChatService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListMessagePinsRequest actualRequest = ((ListMessagePinsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listMessagePinsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockChatService.addException(exception); + + try { + SpaceName parent = SpaceName.of("[SPACE]"); + client.listMessagePins(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listMessagePinsTest2() throws Exception { + MessagePin responsesElement = MessagePin.newBuilder().build(); + ListMessagePinsResponse expectedResponse = + ListMessagePinsResponse.newBuilder() + .setNextPageToken("") + .addAllMessagePins(Arrays.asList(responsesElement)) + .build(); + mockChatService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListMessagePinsPagedResponse pagedListResponse = client.listMessagePins(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getMessagePinsList().get(0), resources.get(0)); + + List actualRequests = mockChatService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListMessagePinsRequest actualRequest = ((ListMessagePinsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listMessagePinsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockChatService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listMessagePins(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createMessagePinTest() throws Exception { + MessagePin expectedResponse = + MessagePin.newBuilder() + .setName(MessagePinName.of("[SPACE]", "[MESSAGE_PIN]").toString()) + .setMessage(MessageName.of("[SPACE]", "[MESSAGE]").toString()) + .build(); + mockChatService.addResponse(expectedResponse); + + SpaceName parent = SpaceName.of("[SPACE]"); + MessagePin messagePin = MessagePin.newBuilder().build(); + + MessagePin actualResponse = client.createMessagePin(parent, messagePin); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockChatService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateMessagePinRequest actualRequest = ((CreateMessagePinRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(messagePin, actualRequest.getMessagePin()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createMessagePinExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockChatService.addException(exception); + + try { + SpaceName parent = SpaceName.of("[SPACE]"); + MessagePin messagePin = MessagePin.newBuilder().build(); + client.createMessagePin(parent, messagePin); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createMessagePinTest2() throws Exception { + MessagePin expectedResponse = + MessagePin.newBuilder() + .setName(MessagePinName.of("[SPACE]", "[MESSAGE_PIN]").toString()) + .setMessage(MessageName.of("[SPACE]", "[MESSAGE]").toString()) + .build(); + mockChatService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + MessagePin messagePin = MessagePin.newBuilder().build(); + + MessagePin actualResponse = client.createMessagePin(parent, messagePin); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockChatService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateMessagePinRequest actualRequest = ((CreateMessagePinRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(messagePin, actualRequest.getMessagePin()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createMessagePinExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockChatService.addException(exception); + + try { + String parent = "parent-995424086"; + MessagePin messagePin = MessagePin.newBuilder().build(); + client.createMessagePin(parent, messagePin); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteMessagePinTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockChatService.addResponse(expectedResponse); + + MessagePinName name = MessagePinName.of("[SPACE]", "[MESSAGE_PIN]"); + + client.deleteMessagePin(name); + + List actualRequests = mockChatService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteMessagePinRequest actualRequest = ((DeleteMessagePinRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteMessagePinExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockChatService.addException(exception); + + try { + MessagePinName name = MessagePinName.of("[SPACE]", "[MESSAGE_PIN]"); + client.deleteMessagePin(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteMessagePinTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockChatService.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteMessagePin(name); + + List actualRequests = mockChatService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteMessagePinRequest actualRequest = ((DeleteMessagePinRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteMessagePinExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockChatService.addException(exception); + + try { + String name = "name3373707"; + client.deleteMessagePin(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void createCustomEmojiTest() throws Exception { CustomEmoji expectedResponse = diff --git a/java-chat/google-cloud-chat/src/test/java/com/google/chat/v1/MockChatServiceImpl.java b/java-chat/google-cloud-chat/src/test/java/com/google/chat/v1/MockChatServiceImpl.java index 82b8ec772ecd..a86e6cd77d11 100644 --- a/java-chat/google-cloud-chat/src/test/java/com/google/chat/v1/MockChatServiceImpl.java +++ b/java-chat/google-cloud-chat/src/test/java/com/google/chat/v1/MockChatServiceImpl.java @@ -599,6 +599,69 @@ public void deleteReaction( } } + @Override + public void listMessagePins( + ListMessagePinsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListMessagePinsResponse) { + requests.add(request); + responseObserver.onNext(((ListMessagePinsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListMessagePins, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListMessagePinsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createMessagePin( + CreateMessagePinRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof MessagePin) { + requests.add(request); + responseObserver.onNext(((MessagePin) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateMessagePin, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + MessagePin.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteMessagePin( + DeleteMessagePinRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteMessagePin, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + @Override public void createCustomEmoji( CreateCustomEmojiRequest request, StreamObserver responseObserver) { diff --git a/java-chat/grpc-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ChatServiceGrpc.java b/java-chat/grpc-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ChatServiceGrpc.java index a50bbb395f7e..8316e136a920 100644 --- a/java-chat/grpc-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ChatServiceGrpc.java +++ b/java-chat/grpc-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ChatServiceGrpc.java @@ -1078,6 +1078,129 @@ private ChatServiceGrpc() {} return getDeleteReactionMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.chat.v1.ListMessagePinsRequest, com.google.chat.v1.ListMessagePinsResponse> + getListMessagePinsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListMessagePins", + requestType = com.google.chat.v1.ListMessagePinsRequest.class, + responseType = com.google.chat.v1.ListMessagePinsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.chat.v1.ListMessagePinsRequest, com.google.chat.v1.ListMessagePinsResponse> + getListMessagePinsMethod() { + io.grpc.MethodDescriptor< + com.google.chat.v1.ListMessagePinsRequest, com.google.chat.v1.ListMessagePinsResponse> + getListMessagePinsMethod; + if ((getListMessagePinsMethod = ChatServiceGrpc.getListMessagePinsMethod) == null) { + synchronized (ChatServiceGrpc.class) { + if ((getListMessagePinsMethod = ChatServiceGrpc.getListMessagePinsMethod) == null) { + ChatServiceGrpc.getListMessagePinsMethod = + getListMessagePinsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListMessagePins")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.chat.v1.ListMessagePinsRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.chat.v1.ListMessagePinsResponse.getDefaultInstance())) + .setSchemaDescriptor( + new ChatServiceMethodDescriptorSupplier("ListMessagePins")) + .build(); + } + } + } + return getListMessagePinsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.chat.v1.CreateMessagePinRequest, com.google.chat.v1.MessagePin> + getCreateMessagePinMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateMessagePin", + requestType = com.google.chat.v1.CreateMessagePinRequest.class, + responseType = com.google.chat.v1.MessagePin.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.chat.v1.CreateMessagePinRequest, com.google.chat.v1.MessagePin> + getCreateMessagePinMethod() { + io.grpc.MethodDescriptor< + com.google.chat.v1.CreateMessagePinRequest, com.google.chat.v1.MessagePin> + getCreateMessagePinMethod; + if ((getCreateMessagePinMethod = ChatServiceGrpc.getCreateMessagePinMethod) == null) { + synchronized (ChatServiceGrpc.class) { + if ((getCreateMessagePinMethod = ChatServiceGrpc.getCreateMessagePinMethod) == null) { + ChatServiceGrpc.getCreateMessagePinMethod = + getCreateMessagePinMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateMessagePin")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.chat.v1.CreateMessagePinRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.chat.v1.MessagePin.getDefaultInstance())) + .setSchemaDescriptor( + new ChatServiceMethodDescriptorSupplier("CreateMessagePin")) + .build(); + } + } + } + return getCreateMessagePinMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.chat.v1.DeleteMessagePinRequest, com.google.protobuf.Empty> + getDeleteMessagePinMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteMessagePin", + requestType = com.google.chat.v1.DeleteMessagePinRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.chat.v1.DeleteMessagePinRequest, com.google.protobuf.Empty> + getDeleteMessagePinMethod() { + io.grpc.MethodDescriptor + getDeleteMessagePinMethod; + if ((getDeleteMessagePinMethod = ChatServiceGrpc.getDeleteMessagePinMethod) == null) { + synchronized (ChatServiceGrpc.class) { + if ((getDeleteMessagePinMethod = ChatServiceGrpc.getDeleteMessagePinMethod) == null) { + ChatServiceGrpc.getDeleteMessagePinMethod = + getDeleteMessagePinMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteMessagePin")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.chat.v1.DeleteMessagePinRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new ChatServiceMethodDescriptorSupplier("DeleteMessagePin")) + .build(); + } + } + } + return getDeleteMessagePinMethod; + } + private static volatile io.grpc.MethodDescriptor< com.google.chat.v1.CreateCustomEmojiRequest, com.google.chat.v1.CustomEmoji> getCreateCustomEmojiMethod; @@ -3026,6 +3149,70 @@ default void deleteReaction( getDeleteReactionMethod(), responseObserver); } + /** + * + * + *
+     * Lists message pins in a space. Users can pin important messages in spaces
+     * for easy access. For more information, see [Pin or unpin a conversation in
+     * Google Chat](https://support.google.com/chat/answer/15622437).
+     * Requires [user
+     * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
+     * with one of the following [authorization
+     * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+     *   - `https://www.googleapis.com/auth/chat.spaces.pins.readonly`
+     *   - `https://www.googleapis.com/auth/chat.spaces.pins`
+     *   - `https://www.googleapis.com/auth/chat.spaces.readonly`
+     *   - `https://www.googleapis.com/auth/chat.spaces`
+     * 
+ */ + default void listMessagePins( + com.google.chat.v1.ListMessagePinsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListMessagePinsMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a message pin.
+     * Requires [user
+     * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
+     * with one of the following [authorization
+     * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+     *   - `https://www.googleapis.com/auth/chat.spaces.pins`
+     *   - `https://www.googleapis.com/auth/chat.spaces`
+     * 
+ */ + default void createMessagePin( + com.google.chat.v1.CreateMessagePinRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateMessagePinMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a message pin.
+     * Requires [user
+     * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
+     * with one of the following [authorization
+     * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+     *   - `https://www.googleapis.com/auth/chat.spaces.pins`
+     *   - `https://www.googleapis.com/auth/chat.spaces`
+     * 
+ */ + default void deleteMessagePin( + com.google.chat.v1.DeleteMessagePinRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteMessagePinMethod(), responseObserver); + } + /** * * @@ -4616,6 +4803,76 @@ public void deleteReaction( responseObserver); } + /** + * + * + *
+     * Lists message pins in a space. Users can pin important messages in spaces
+     * for easy access. For more information, see [Pin or unpin a conversation in
+     * Google Chat](https://support.google.com/chat/answer/15622437).
+     * Requires [user
+     * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
+     * with one of the following [authorization
+     * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+     *   - `https://www.googleapis.com/auth/chat.spaces.pins.readonly`
+     *   - `https://www.googleapis.com/auth/chat.spaces.pins`
+     *   - `https://www.googleapis.com/auth/chat.spaces.readonly`
+     *   - `https://www.googleapis.com/auth/chat.spaces`
+     * 
+ */ + public void listMessagePins( + com.google.chat.v1.ListMessagePinsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListMessagePinsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a message pin.
+     * Requires [user
+     * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
+     * with one of the following [authorization
+     * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+     *   - `https://www.googleapis.com/auth/chat.spaces.pins`
+     *   - `https://www.googleapis.com/auth/chat.spaces`
+     * 
+ */ + public void createMessagePin( + com.google.chat.v1.CreateMessagePinRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateMessagePinMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a message pin.
+     * Requires [user
+     * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
+     * with one of the following [authorization
+     * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+     *   - `https://www.googleapis.com/auth/chat.spaces.pins`
+     *   - `https://www.googleapis.com/auth/chat.spaces`
+     * 
+ */ + public void deleteMessagePin( + com.google.chat.v1.DeleteMessagePinRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteMessagePinMethod(), getCallOptions()), + request, + responseObserver); + } + /** * * @@ -6164,6 +6421,67 @@ public com.google.protobuf.Empty deleteReaction( getChannel(), getDeleteReactionMethod(), getCallOptions(), request); } + /** + * + * + *
+     * Lists message pins in a space. Users can pin important messages in spaces
+     * for easy access. For more information, see [Pin or unpin a conversation in
+     * Google Chat](https://support.google.com/chat/answer/15622437).
+     * Requires [user
+     * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
+     * with one of the following [authorization
+     * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+     *   - `https://www.googleapis.com/auth/chat.spaces.pins.readonly`
+     *   - `https://www.googleapis.com/auth/chat.spaces.pins`
+     *   - `https://www.googleapis.com/auth/chat.spaces.readonly`
+     *   - `https://www.googleapis.com/auth/chat.spaces`
+     * 
+ */ + public com.google.chat.v1.ListMessagePinsResponse listMessagePins( + com.google.chat.v1.ListMessagePinsRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListMessagePinsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a message pin.
+     * Requires [user
+     * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
+     * with one of the following [authorization
+     * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+     *   - `https://www.googleapis.com/auth/chat.spaces.pins`
+     *   - `https://www.googleapis.com/auth/chat.spaces`
+     * 
+ */ + public com.google.chat.v1.MessagePin createMessagePin( + com.google.chat.v1.CreateMessagePinRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCreateMessagePinMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a message pin.
+     * Requires [user
+     * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
+     * with one of the following [authorization
+     * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+     *   - `https://www.googleapis.com/auth/chat.spaces.pins`
+     *   - `https://www.googleapis.com/auth/chat.spaces`
+     * 
+ */ + public com.google.protobuf.Empty deleteMessagePin( + com.google.chat.v1.DeleteMessagePinRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDeleteMessagePinMethod(), getCallOptions(), request); + } + /** * * @@ -7641,6 +7959,67 @@ public com.google.protobuf.Empty deleteReaction( getChannel(), getDeleteReactionMethod(), getCallOptions(), request); } + /** + * + * + *
+     * Lists message pins in a space. Users can pin important messages in spaces
+     * for easy access. For more information, see [Pin or unpin a conversation in
+     * Google Chat](https://support.google.com/chat/answer/15622437).
+     * Requires [user
+     * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
+     * with one of the following [authorization
+     * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+     *   - `https://www.googleapis.com/auth/chat.spaces.pins.readonly`
+     *   - `https://www.googleapis.com/auth/chat.spaces.pins`
+     *   - `https://www.googleapis.com/auth/chat.spaces.readonly`
+     *   - `https://www.googleapis.com/auth/chat.spaces`
+     * 
+ */ + public com.google.chat.v1.ListMessagePinsResponse listMessagePins( + com.google.chat.v1.ListMessagePinsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListMessagePinsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a message pin.
+     * Requires [user
+     * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
+     * with one of the following [authorization
+     * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+     *   - `https://www.googleapis.com/auth/chat.spaces.pins`
+     *   - `https://www.googleapis.com/auth/chat.spaces`
+     * 
+ */ + public com.google.chat.v1.MessagePin createMessagePin( + com.google.chat.v1.CreateMessagePinRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateMessagePinMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a message pin.
+     * Requires [user
+     * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
+     * with one of the following [authorization
+     * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+     *   - `https://www.googleapis.com/auth/chat.spaces.pins`
+     *   - `https://www.googleapis.com/auth/chat.spaces`
+     * 
+ */ + public com.google.protobuf.Empty deleteMessagePin( + com.google.chat.v1.DeleteMessagePinRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteMessagePinMethod(), getCallOptions(), request); + } + /** * * @@ -9130,6 +9509,68 @@ public com.google.common.util.concurrent.ListenableFuture + * Lists message pins in a space. Users can pin important messages in spaces + * for easy access. For more information, see [Pin or unpin a conversation in + * Google Chat](https://support.google.com/chat/answer/15622437). + * Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * with one of the following [authorization + * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + * - `https://www.googleapis.com/auth/chat.spaces.pins.readonly` + * - `https://www.googleapis.com/auth/chat.spaces.pins` + * - `https://www.googleapis.com/auth/chat.spaces.readonly` + * - `https://www.googleapis.com/auth/chat.spaces` + * + */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.chat.v1.ListMessagePinsResponse> + listMessagePins(com.google.chat.v1.ListMessagePinsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListMessagePinsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a message pin.
+     * Requires [user
+     * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
+     * with one of the following [authorization
+     * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+     *   - `https://www.googleapis.com/auth/chat.spaces.pins`
+     *   - `https://www.googleapis.com/auth/chat.spaces`
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createMessagePin(com.google.chat.v1.CreateMessagePinRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateMessagePinMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a message pin.
+     * Requires [user
+     * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
+     * with one of the following [authorization
+     * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+     *   - `https://www.googleapis.com/auth/chat.spaces.pins`
+     *   - `https://www.googleapis.com/auth/chat.spaces`
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteMessagePin(com.google.chat.v1.DeleteMessagePinRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteMessagePinMethod(), getCallOptions()), request); + } + /** * * @@ -9728,29 +10169,32 @@ public com.google.common.util.concurrent.ListenableFuture implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -9908,6 +10352,22 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (com.google.chat.v1.DeleteReactionRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_LIST_MESSAGE_PINS: + serviceImpl.listMessagePins( + (com.google.chat.v1.ListMessagePinsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_MESSAGE_PIN: + serviceImpl.createMessagePin( + (com.google.chat.v1.CreateMessagePinRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_MESSAGE_PIN: + serviceImpl.deleteMessagePin( + (com.google.chat.v1.DeleteMessagePinRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; case METHODID_CREATE_CUSTOM_EMOJI: serviceImpl.createCustomEmoji( (com.google.chat.v1.CreateCustomEmojiRequest) request, @@ -10204,6 +10664,25 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser new MethodHandlers< com.google.chat.v1.DeleteReactionRequest, com.google.protobuf.Empty>( service, METHODID_DELETE_REACTION))) + .addMethod( + getListMessagePinsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.chat.v1.ListMessagePinsRequest, + com.google.chat.v1.ListMessagePinsResponse>( + service, METHODID_LIST_MESSAGE_PINS))) + .addMethod( + getCreateMessagePinMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.chat.v1.CreateMessagePinRequest, com.google.chat.v1.MessagePin>( + service, METHODID_CREATE_MESSAGE_PIN))) + .addMethod( + getDeleteMessagePinMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.chat.v1.DeleteMessagePinRequest, com.google.protobuf.Empty>( + service, METHODID_DELETE_MESSAGE_PIN))) .addMethod( getCreateCustomEmojiMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -10426,6 +10905,9 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getCreateReactionMethod()) .addMethod(getListReactionsMethod()) .addMethod(getDeleteReactionMethod()) + .addMethod(getListMessagePinsMethod()) + .addMethod(getCreateMessagePinMethod()) + .addMethod(getDeleteMessagePinMethod()) .addMethod(getCreateCustomEmojiMethod()) .addMethod(getGetCustomEmojiMethod()) .addMethod(getListCustomEmojisMethod()) diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/Annotation.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/Annotation.java index 8c38a88c30f3..ac0d028b6a68 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/Annotation.java +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/Annotation.java @@ -24,10 +24,10 @@ * * *
- * Output only. Annotations can be associated with the plain-text body of the
- * message or with chips that link to Google Workspace resources like Google
- * Docs or Sheets with `start_index` and `length` of 0. To add basic formatting
- * to a text message, see [Format text
+ * Annotations can be associated with the plain-text body of the message or
+ * with chips that link to Google Workspace resources like Google Docs or Sheets
+ * with `start_index` and `length` of 0. To add basic formatting to a text
+ * message, see [Format text
  * messages](https://developers.google.com/workspace/chat/format-messages).
  *
  * Example plain-text message body:
@@ -715,10 +715,10 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.Builder
    *
    *
    * 
-   * Output only. Annotations can be associated with the plain-text body of the
-   * message or with chips that link to Google Workspace resources like Google
-   * Docs or Sheets with `start_index` and `length` of 0. To add basic formatting
-   * to a text message, see [Format text
+   * Annotations can be associated with the plain-text body of the message or
+   * with chips that link to Google Workspace resources like Google Docs or Sheets
+   * with `start_index` and `length` of 0. To add basic formatting to a text
+   * message, see [Format text
    * messages](https://developers.google.com/workspace/chat/format-messages).
    *
    * Example plain-text message body:
diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/AppCommandMetadata.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/AppCommandMetadata.java
new file mode 100644
index 000000000000..294bb864df26
--- /dev/null
+++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/AppCommandMetadata.java
@@ -0,0 +1,863 @@
+/*
+ * Copyright 2026 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+// Generated by the protocol buffer compiler.  DO NOT EDIT!
+// NO CHECKED-IN PROTOBUF GENCODE
+// source: google/chat/v1/app_command_metadata.proto
+// Protobuf Java Version: 4.33.6
+
+package com.google.chat.v1;
+
+/**
+ *
+ *
+ * 
+ * Metadata about a [Chat app
+ * command](https://developers.google.com/workspace/chat/commands).
+ * 
+ * + * Protobuf type {@code google.chat.v1.AppCommandMetadata} + */ +@com.google.protobuf.Generated +public final class AppCommandMetadata extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.chat.v1.AppCommandMetadata) + AppCommandMetadataOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "AppCommandMetadata"); + } + + // Use AppCommandMetadata.newBuilder() to construct. + private AppCommandMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AppCommandMetadata() { + appCommandType_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.chat.v1.AppCommandMetadataProto + .internal_static_google_chat_v1_AppCommandMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.chat.v1.AppCommandMetadataProto + .internal_static_google_chat_v1_AppCommandMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.chat.v1.AppCommandMetadata.class, + com.google.chat.v1.AppCommandMetadata.Builder.class); + } + + /** + * + * + *
+   * The type of Chat app command. For details, see [Types of Chat
+   * app commands](https://developers.google.com/workspace/chat/commands#types).
+   * 
+ * + * Protobuf enum {@code google.chat.v1.AppCommandMetadata.AppCommandType} + */ + public enum AppCommandType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default value. Unspecified.
+     * 
+ * + * APP_COMMAND_TYPE_UNSPECIFIED = 0; + */ + APP_COMMAND_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * A slash command. The user sends the command in a Chat message.
+     * 
+ * + * SLASH_COMMAND = 1; + */ + SLASH_COMMAND(1), + /** + * + * + *
+     * A quick command. The user selects the command from the Chat menu
+     * in the message reply area.
+     * 
+ * + * QUICK_COMMAND = 3; + */ + QUICK_COMMAND(3), + /** + * + * + *
+     * A message action. The user selects the command from the message context
+     * menu in Chat.
+     * 
+ * + * MESSAGE_ACTION = 4; + */ + MESSAGE_ACTION(4), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "AppCommandType"); + } + + /** + * + * + *
+     * Default value. Unspecified.
+     * 
+ * + * APP_COMMAND_TYPE_UNSPECIFIED = 0; + */ + public static final int APP_COMMAND_TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * A slash command. The user sends the command in a Chat message.
+     * 
+ * + * SLASH_COMMAND = 1; + */ + public static final int SLASH_COMMAND_VALUE = 1; + + /** + * + * + *
+     * A quick command. The user selects the command from the Chat menu
+     * in the message reply area.
+     * 
+ * + * QUICK_COMMAND = 3; + */ + public static final int QUICK_COMMAND_VALUE = 3; + + /** + * + * + *
+     * A message action. The user selects the command from the message context
+     * menu in Chat.
+     * 
+ * + * MESSAGE_ACTION = 4; + */ + public static final int MESSAGE_ACTION_VALUE = 4; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static AppCommandType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static AppCommandType forNumber(int value) { + switch (value) { + case 0: + return APP_COMMAND_TYPE_UNSPECIFIED; + case 1: + return SLASH_COMMAND; + case 3: + return QUICK_COMMAND; + case 4: + return MESSAGE_ACTION; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public AppCommandType findValueByNumber(int number) { + return AppCommandType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.chat.v1.AppCommandMetadata.getDescriptor().getEnumTypes().get(0); + } + + private static final AppCommandType[] VALUES = values(); + + public static AppCommandType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private AppCommandType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.chat.v1.AppCommandMetadata.AppCommandType) + } + + public static final int APP_COMMAND_ID_FIELD_NUMBER = 1; + private int appCommandId_ = 0; + + /** + * + * + *
+   * The ID for the command specified in the Chat API configuration.
+   * 
+ * + * int32 app_command_id = 1; + * + * @return The appCommandId. + */ + @java.lang.Override + public int getAppCommandId() { + return appCommandId_; + } + + public static final int APP_COMMAND_TYPE_FIELD_NUMBER = 2; + private int appCommandType_ = 0; + + /** + * + * + *
+   * The type of Chat app command.
+   * 
+ * + * .google.chat.v1.AppCommandMetadata.AppCommandType app_command_type = 2; + * + * @return The enum numeric value on the wire for appCommandType. + */ + @java.lang.Override + public int getAppCommandTypeValue() { + return appCommandType_; + } + + /** + * + * + *
+   * The type of Chat app command.
+   * 
+ * + * .google.chat.v1.AppCommandMetadata.AppCommandType app_command_type = 2; + * + * @return The appCommandType. + */ + @java.lang.Override + public com.google.chat.v1.AppCommandMetadata.AppCommandType getAppCommandType() { + com.google.chat.v1.AppCommandMetadata.AppCommandType result = + com.google.chat.v1.AppCommandMetadata.AppCommandType.forNumber(appCommandType_); + return result == null + ? com.google.chat.v1.AppCommandMetadata.AppCommandType.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (appCommandId_ != 0) { + output.writeInt32(1, appCommandId_); + } + if (appCommandType_ + != com.google.chat.v1.AppCommandMetadata.AppCommandType.APP_COMMAND_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, appCommandType_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (appCommandId_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, appCommandId_); + } + if (appCommandType_ + != com.google.chat.v1.AppCommandMetadata.AppCommandType.APP_COMMAND_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, appCommandType_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.chat.v1.AppCommandMetadata)) { + return super.equals(obj); + } + com.google.chat.v1.AppCommandMetadata other = (com.google.chat.v1.AppCommandMetadata) obj; + + if (getAppCommandId() != other.getAppCommandId()) return false; + if (appCommandType_ != other.appCommandType_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + APP_COMMAND_ID_FIELD_NUMBER; + hash = (53 * hash) + getAppCommandId(); + hash = (37 * hash) + APP_COMMAND_TYPE_FIELD_NUMBER; + hash = (53 * hash) + appCommandType_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.chat.v1.AppCommandMetadata parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.chat.v1.AppCommandMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.chat.v1.AppCommandMetadata parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.chat.v1.AppCommandMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.chat.v1.AppCommandMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.chat.v1.AppCommandMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.chat.v1.AppCommandMetadata parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.chat.v1.AppCommandMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.chat.v1.AppCommandMetadata parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.chat.v1.AppCommandMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.chat.v1.AppCommandMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.chat.v1.AppCommandMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.chat.v1.AppCommandMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Metadata about a [Chat app
+   * command](https://developers.google.com/workspace/chat/commands).
+   * 
+ * + * Protobuf type {@code google.chat.v1.AppCommandMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.chat.v1.AppCommandMetadata) + com.google.chat.v1.AppCommandMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.chat.v1.AppCommandMetadataProto + .internal_static_google_chat_v1_AppCommandMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.chat.v1.AppCommandMetadataProto + .internal_static_google_chat_v1_AppCommandMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.chat.v1.AppCommandMetadata.class, + com.google.chat.v1.AppCommandMetadata.Builder.class); + } + + // Construct using com.google.chat.v1.AppCommandMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + appCommandId_ = 0; + appCommandType_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.chat.v1.AppCommandMetadataProto + .internal_static_google_chat_v1_AppCommandMetadata_descriptor; + } + + @java.lang.Override + public com.google.chat.v1.AppCommandMetadata getDefaultInstanceForType() { + return com.google.chat.v1.AppCommandMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.chat.v1.AppCommandMetadata build() { + com.google.chat.v1.AppCommandMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.chat.v1.AppCommandMetadata buildPartial() { + com.google.chat.v1.AppCommandMetadata result = + new com.google.chat.v1.AppCommandMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.chat.v1.AppCommandMetadata result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.appCommandId_ = appCommandId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.appCommandType_ = appCommandType_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.chat.v1.AppCommandMetadata) { + return mergeFrom((com.google.chat.v1.AppCommandMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.chat.v1.AppCommandMetadata other) { + if (other == com.google.chat.v1.AppCommandMetadata.getDefaultInstance()) return this; + if (other.getAppCommandId() != 0) { + setAppCommandId(other.getAppCommandId()); + } + if (other.appCommandType_ != 0) { + setAppCommandTypeValue(other.getAppCommandTypeValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + appCommandId_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + appCommandType_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int appCommandId_; + + /** + * + * + *
+     * The ID for the command specified in the Chat API configuration.
+     * 
+ * + * int32 app_command_id = 1; + * + * @return The appCommandId. + */ + @java.lang.Override + public int getAppCommandId() { + return appCommandId_; + } + + /** + * + * + *
+     * The ID for the command specified in the Chat API configuration.
+     * 
+ * + * int32 app_command_id = 1; + * + * @param value The appCommandId to set. + * @return This builder for chaining. + */ + public Builder setAppCommandId(int value) { + + appCommandId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The ID for the command specified in the Chat API configuration.
+     * 
+ * + * int32 app_command_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearAppCommandId() { + bitField0_ = (bitField0_ & ~0x00000001); + appCommandId_ = 0; + onChanged(); + return this; + } + + private int appCommandType_ = 0; + + /** + * + * + *
+     * The type of Chat app command.
+     * 
+ * + * .google.chat.v1.AppCommandMetadata.AppCommandType app_command_type = 2; + * + * @return The enum numeric value on the wire for appCommandType. + */ + @java.lang.Override + public int getAppCommandTypeValue() { + return appCommandType_; + } + + /** + * + * + *
+     * The type of Chat app command.
+     * 
+ * + * .google.chat.v1.AppCommandMetadata.AppCommandType app_command_type = 2; + * + * @param value The enum numeric value on the wire for appCommandType to set. + * @return This builder for chaining. + */ + public Builder setAppCommandTypeValue(int value) { + appCommandType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * The type of Chat app command.
+     * 
+ * + * .google.chat.v1.AppCommandMetadata.AppCommandType app_command_type = 2; + * + * @return The appCommandType. + */ + @java.lang.Override + public com.google.chat.v1.AppCommandMetadata.AppCommandType getAppCommandType() { + com.google.chat.v1.AppCommandMetadata.AppCommandType result = + com.google.chat.v1.AppCommandMetadata.AppCommandType.forNumber(appCommandType_); + return result == null + ? com.google.chat.v1.AppCommandMetadata.AppCommandType.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * The type of Chat app command.
+     * 
+ * + * .google.chat.v1.AppCommandMetadata.AppCommandType app_command_type = 2; + * + * @param value The appCommandType to set. + * @return This builder for chaining. + */ + public Builder setAppCommandType(com.google.chat.v1.AppCommandMetadata.AppCommandType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + appCommandType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * The type of Chat app command.
+     * 
+ * + * .google.chat.v1.AppCommandMetadata.AppCommandType app_command_type = 2; + * + * @return This builder for chaining. + */ + public Builder clearAppCommandType() { + bitField0_ = (bitField0_ & ~0x00000002); + appCommandType_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.chat.v1.AppCommandMetadata) + } + + // @@protoc_insertion_point(class_scope:google.chat.v1.AppCommandMetadata) + private static final com.google.chat.v1.AppCommandMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.chat.v1.AppCommandMetadata(); + } + + public static com.google.chat.v1.AppCommandMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AppCommandMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.chat.v1.AppCommandMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/AppCommandMetadataOrBuilder.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/AppCommandMetadataOrBuilder.java new file mode 100644 index 000000000000..8a2c6a2c9ea6 --- /dev/null +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/AppCommandMetadataOrBuilder.java @@ -0,0 +1,67 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/chat/v1/app_command_metadata.proto +// Protobuf Java Version: 4.33.6 + +package com.google.chat.v1; + +@com.google.protobuf.Generated +public interface AppCommandMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.chat.v1.AppCommandMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The ID for the command specified in the Chat API configuration.
+   * 
+ * + * int32 app_command_id = 1; + * + * @return The appCommandId. + */ + int getAppCommandId(); + + /** + * + * + *
+   * The type of Chat app command.
+   * 
+ * + * .google.chat.v1.AppCommandMetadata.AppCommandType app_command_type = 2; + * + * @return The enum numeric value on the wire for appCommandType. + */ + int getAppCommandTypeValue(); + + /** + * + * + *
+   * The type of Chat app command.
+   * 
+ * + * .google.chat.v1.AppCommandMetadata.AppCommandType app_command_type = 2; + * + * @return The appCommandType. + */ + com.google.chat.v1.AppCommandMetadata.AppCommandType getAppCommandType(); +} diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/AppCommandMetadataProto.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/AppCommandMetadataProto.java new file mode 100644 index 000000000000..1ab674b1ffc6 --- /dev/null +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/AppCommandMetadataProto.java @@ -0,0 +1,84 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/chat/v1/app_command_metadata.proto +// Protobuf Java Version: 4.33.6 + +package com.google.chat.v1; + +@com.google.protobuf.Generated +public final class AppCommandMetadataProto extends com.google.protobuf.GeneratedFile { + private AppCommandMetadataProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "AppCommandMetadataProto"); + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_chat_v1_AppCommandMetadata_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_chat_v1_AppCommandMetadata_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n)google/chat/v1/app_command_metadata.pr" + + "oto\022\016google.chat.v1\"\347\001\n\022AppCommandMetada" + + "ta\022\026\n\016app_command_id\030\001 \001(\005\022K\n\020app_comman" + + "d_type\030\002 \001(\01621.google.chat.v1.AppCommand" + + "Metadata.AppCommandType\"l\n\016AppCommandTyp" + + "e\022 \n\034APP_COMMAND_TYPE_UNSPECIFIED\020\000\022\021\n\rS" + + "LASH_COMMAND\020\001\022\021\n\rQUICK_COMMAND\020\003\022\022\n\016MES" + + "SAGE_ACTION\020\004B\242\001\n\022com.google.chat.v1B\027Ap" + + "pCommandMetadataProtoP\001Z,cloud.google.co" + + "m/go/chat/apiv1/chatpb;chatpb\252\002\023Google.A" + + "pps.Chat.V1\312\002\023Google\\Apps\\Chat\\V1\352\002\026Goog" + + "le::Apps::Chat::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); + internal_static_google_chat_v1_AppCommandMetadata_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_chat_v1_AppCommandMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_chat_v1_AppCommandMetadata_descriptor, + new java.lang.String[] { + "AppCommandId", "AppCommandType", + }); + descriptor.resolveAllFeaturesImmutable(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ChatServiceProto.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ChatServiceProto.java index 0bb68e601132..58e6b9c6a477 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ChatServiceProto.java +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ChatServiceProto.java @@ -53,258 +53,273 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "o\032\027google/api/client.proto\032\037google/chat/" + "v1/attachment.proto\032!google/chat/v1/avai" + "lability.proto\032\037google/chat/v1/membershi" - + "p.proto\032\034google/chat/v1/message.proto\032\035g" - + "oogle/chat/v1/reaction.proto\032\034google/cha" - + "t/v1/section.proto\032\032google/chat/v1/space" - + ".proto\032 google/chat/v1/space_event.proto" - + "\032/google/chat/v1/space_notification_sett" - + "ing.proto\032%google/chat/v1/space_read_sta" - + "te.proto\032 google/chat/v1/space_setup.pro" - + "to\032&google/chat/v1/thread_read_state.pro" - + "to\032\033google/protobuf/empty.proto2\250J\n\013Chat" - + "Service\022\233\001\n\rCreateMessage\022$.google.chat." - + "v1.CreateMessageRequest\032\027.google.chat.v1" - + ".Message\"K\332A\031parent,message,message_id\202\323" - + "\344\223\002)\"\036/v1/{parent=spaces/*}/messages:\007me" - + "ssage\022\212\001\n\014ListMessages\022#.google.chat.v1." - + "ListMessagesRequest\032$.google.chat.v1.Lis" - + "tMessagesResponse\"/\332A\006parent\202\323\344\223\002 \022\036/v1/" - + "{parent=spaces/*}/messages\022\222\001\n\017ListMembe" - + "rships\022&.google.chat.v1.ListMembershipsR" - + "equest\032\'.google.chat.v1.ListMembershipsR" - + "esponse\".\332A\006parent\202\323\344\223\002\037\022\035/v1/{parent=sp" - + "aces/*}/members\022\177\n\rGetMembership\022$.googl" - + "e.chat.v1.GetMembershipRequest\032\032.google." - + "chat.v1.Membership\",\332A\004name\202\323\344\223\002\037\022\035/v1/{" - + "name=spaces/*/members/*}\022w\n\nGetMessage\022!" - + ".google.chat.v1.GetMessageRequest\032\027.goog" - + "le.chat.v1.Message\"-\332A\004name\202\323\344\223\002 \022\036/v1/{" - + "name=spaces/*/messages/*}\022\321\001\n\rUpdateMess" - + "age\022$.google.chat.v1.UpdateMessageReques" - + "t\032\027.google.chat.v1.Message\"\200\001\332A\023message," - + "update_mask\202\323\344\223\002d\032&/v1/{message.name=spa" - + "ces/*/messages/*}:\007messageZ12&/v1/{messa" - + "ge.name=spaces/*/messages/*}:\007message\022|\n" - + "\rDeleteMessage\022$.google.chat.v1.DeleteMe" - + "ssageRequest\032\026.google.protobuf.Empty\"-\332A" - + "\004name\202\323\344\223\002 *\036/v1/{name=spaces/*/messages" - + "/*}\022\241\001\n\016SearchMessages\022%.google.chat.v1." - + "SearchMessagesRequest\032&.google.chat.v1.S" - + "earchMessagesResponse\"@\332A\rparent,filter\202" - + "\323\344\223\002*\"%/v1/{parent=spaces/*}/messages:se" - + "arch:\001*\022\216\001\n\rGetAttachment\022$.google.chat." - + "v1.GetAttachmentRequest\032\032.google.chat.v1" - + ".Attachment\";\332A\004name\202\323\344\223\002.\022,/v1/{name=sp" - + "aces/*/messages/*/attachments/*}\022\232\001\n\020Upl" - + "oadAttachment\022\'.google.chat.v1.UploadAtt" - + "achmentRequest\032(.google.chat.v1.UploadAt" - + "tachmentResponse\"3\202\323\344\223\002-\"(/v1/{parent=sp" - + "aces/*}/attachments:upload:\001*\022j\n\nListSpa" - + "ces\022!.google.chat.v1.ListSpacesRequest\032\"" - + ".google.chat.v1.ListSpacesResponse\"\025\332A\000\202" - + "\323\344\223\002\014\022\n/v1/spaces\022w\n\014SearchSpaces\022#.goog" - + "le.chat.v1.SearchSpacesRequest\032$.google." - + "chat.v1.SearchSpacesResponse\"\034\332A\000\202\323\344\223\002\023\022" - + "\021/v1/spaces:search\022f\n\010GetSpace\022\037.google." - + "chat.v1.GetSpaceRequest\032\025.google.chat.v1" - + ".Space\"\"\332A\004name\202\323\344\223\002\025\022\023/v1/{name=spaces/" - + "*}\022k\n\013CreateSpace\022\".google.chat.v1.Creat" - + "eSpaceRequest\032\025.google.chat.v1.Space\"!\332A" - + "\005space\202\323\344\223\002\023\"\n/v1/spaces:\005space\022c\n\nSetUp" - + "Space\022!.google.chat.v1.SetUpSpaceRequest" - + "\032\025.google.chat.v1.Space\"\033\202\323\344\223\002\025\"\020/v1/spa" - + "ces:setup:\001*\022\206\001\n\013UpdateSpace\022\".google.ch" - + "at.v1.UpdateSpaceRequest\032\025.google.chat.v" - + "1.Space\"<\332A\021space,update_mask\202\323\344\223\002\"2\031/v1" - + "/{space.name=spaces/*}:\005space\022m\n\013DeleteS" - + "pace\022\".google.chat.v1.DeleteSpaceRequest" - + "\032\026.google.protobuf.Empty\"\"\332A\004name\202\323\344\223\002\025*" - + "\023/v1/{name=spaces/*}\022\235\001\n\023CompleteImportS" - + "pace\022*.google.chat.v1.CompleteImportSpac" - + "eRequest\032+.google.chat.v1.CompleteImport" - + "SpaceResponse\"-\202\323\344\223\002\'\"\"/v1/{name=spaces/" - + "*}:completeImport:\001*\022z\n\021FindDirectMessag" - + "e\022(.google.chat.v1.FindDirectMessageRequ" - + "est\032\025.google.chat.v1.Space\"$\202\323\344\223\002\036\022\034/v1/" - + "spaces:findDirectMessage\022\202\001\n\016FindGroupCh" - + "ats\022%.google.chat.v1.FindGroupChatsReque" - + "st\032&.google.chat.v1.FindGroupChatsRespon" - + "se\"!\202\323\344\223\002\033\022\031/v1/spaces:findGroupChats\022\236\001" - + "\n\020CreateMembership\022\'.google.chat.v1.Crea" - + "teMembershipRequest\032\032.google.chat.v1.Mem" - + "bership\"E\332A\021parent,membership\202\323\344\223\002+\"\035/v1" - + "/{parent=spaces/*}/members:\nmembership\022\256" - + "\001\n\020UpdateMembership\022\'.google.chat.v1.Upd" - + "ateMembershipRequest\032\032.google.chat.v1.Me" - + "mbership\"U\332A\026membership,update_mask\202\323\344\223\002" - + "62(/v1/{membership.name=spaces/*/members" - + "/*}:\nmembership\022\205\001\n\020DeleteMembership\022\'.g" - + "oogle.chat.v1.DeleteMembershipRequest\032\032." - + "google.chat.v1.Membership\",\332A\004name\202\323\344\223\002\037" - + "*\035/v1/{name=spaces/*/members/*}\022\241\001\n\016Crea" - + "teReaction\022%.google.chat.v1.CreateReacti" - + "onRequest\032\030.google.chat.v1.Reaction\"N\332A\017" - + "parent,reaction\202\323\344\223\0026\"*/v1/{parent=space" - + "s/*/messages/*}/reactions:\010reaction\022\231\001\n\r" - + "ListReactions\022$.google.chat.v1.ListReact" - + "ionsRequest\032%.google.chat.v1.ListReactio" - + "nsResponse\";\332A\006parent\202\323\344\223\002,\022*/v1/{parent" - + "=spaces/*/messages/*}/reactions\022\212\001\n\016Dele" - + "teReaction\022%.google.chat.v1.DeleteReacti" - + "onRequest\032\026.google.protobuf.Empty\"9\332A\004na" - + "me\202\323\344\223\002,**/v1/{name=spaces/*/messages/*/" - + "reactions/*}\022\221\001\n\021CreateCustomEmoji\022(.goo" - + "gle.chat.v1.CreateCustomEmojiRequest\032\033.g" - + "oogle.chat.v1.CustomEmoji\"5\332A\014custom_emo" - + "ji\202\323\344\223\002 \"\020/v1/customEmojis:\014custom_emoji" - + "\022~\n\016GetCustomEmoji\022%.google.chat.v1.GetC" - + "ustomEmojiRequest\032\033.google.chat.v1.Custo" - + "mEmoji\"(\332A\004name\202\323\344\223\002\033\022\031/v1/{name=customE" - + "mojis/*}\022\202\001\n\020ListCustomEmojis\022\'.google.c" - + "hat.v1.ListCustomEmojisRequest\032(.google." - + "chat.v1.ListCustomEmojisResponse\"\033\332A\000\202\323\344" - + "\223\002\022\022\020/v1/customEmojis\022\177\n\021DeleteCustomEmo" - + "ji\022(.google.chat.v1.DeleteCustomEmojiReq" - + "uest\032\026.google.protobuf.Empty\"(\332A\004name\202\323\344" - + "\223\002\033*\031/v1/{name=customEmojis/*}\022\230\001\n\021GetSp" - + "aceReadState\022(.google.chat.v1.GetSpaceRe" - + "adStateRequest\032\036.google.chat.v1.SpaceRea" - + "dState\"9\332A\004name\202\323\344\223\002,\022*/v1/{name=users/*" - + "/spaces/*/spaceReadState}\022\331\001\n\024UpdateSpac" - + "eReadState\022+.google.chat.v1.UpdateSpaceR" - + "eadStateRequest\032\036.google.chat.v1.SpaceRe" - + "adState\"t\332A\034space_read_state,update_mask" - + "\202\323\344\223\002O2;/v1/{space_read_state.name=users" - + "/*/spaces/*/spaceReadState}:\020space_read_" - + "state\022\246\001\n\022GetThreadReadState\022).google.ch" - + "at.v1.GetThreadReadStateRequest\032\037.google" - + ".chat.v1.ThreadReadState\"D\332A\004name\202\323\344\223\0027\022" - + "5/v1/{name=users/*/spaces/*/threads/*/th" - + "readReadState}\022\207\001\n\017GetAvailability\022&.goo" - + "gle.chat.v1.GetAvailabilityRequest\032\034.goo" - + "gle.chat.v1.Availability\".\332A\004name\202\323\344\223\002!\022" - + "\037/v1/{name=users/*/availability}\022\212\001\n\014Mar" - + "kAsActive\022#.google.chat.v1.MarkAsActiveR" - + "equest\032\034.google.chat.v1.Availability\"7\202\323" - + "\344\223\0021\",/v1/{name=users/*/availability}:ma" - + "rkAsActive:\001*\022\204\001\n\nMarkAsAway\022!.google.ch" - + "at.v1.MarkAsAwayRequest\032\034.google.chat.v1" - + ".Availability\"5\202\323\344\223\002/\"*/v1/{name=users/*" - + "/availability}:markAsAway:\001*\022\234\001\n\022MarkAsD" - + "oNotDisturb\022).google.chat.v1.MarkAsDoNot" - + "DisturbRequest\032\034.google.chat.v1.Availabi" - + "lity\"=\202\323\344\223\0027\"2/v1/{name=users/*/availabi" - + "lity}:markAsDoNotDisturb:\001*\022\274\001\n\022UpdateAv" - + "ailability\022).google.chat.v1.UpdateAvaila" - + "bilityRequest\032\034.google.chat.v1.Availabil" - + "ity\"]\332A\030availability,update_mask\202\323\344\223\002<2," - + "/v1/{availability.name=users/*/availabil" - + "ity}:\014availability\022\203\001\n\rGetSpaceEvent\022$.g" - + "oogle.chat.v1.GetSpaceEventRequest\032\032.goo" - + "gle.chat.v1.SpaceEvent\"0\332A\004name\202\323\344\223\002#\022!/" - + "v1/{name=spaces/*/spaceEvents/*}\022\235\001\n\017Lis" - + "tSpaceEvents\022&.google.chat.v1.ListSpaceE" - + "ventsRequest\032\'.google.chat.v1.ListSpaceE" - + "ventsResponse\"9\332A\rparent,filter\202\323\344\223\002#\022!/" - + "v1/{parent=spaces/*}/spaceEvents\022\300\001\n\033Get" - + "SpaceNotificationSetting\0222.google.chat.v" - + "1.GetSpaceNotificationSettingRequest\032(.g" - + "oogle.chat.v1.SpaceNotificationSetting\"C" - + "\332A\004name\202\323\344\223\0026\0224/v1/{name=users/*/spaces/" - + "*/spaceNotificationSetting}\022\240\002\n\036UpdateSp" - + "aceNotificationSetting\0225.google.chat.v1." - + "UpdateSpaceNotificationSettingRequest\032(." - + "google.chat.v1.SpaceNotificationSetting\"" - + "\234\001\332A&space_notification_setting,update_m" - + "ask\202\323\344\223\002m2O/v1/{space_notification_setti" - + "ng.name=users/*/spaces/*/spaceNotificati" - + "onSetting}:\032space_notification_setting\022\217" - + "\001\n\rCreateSection\022$.google.chat.v1.Create" - + "SectionRequest\032\027.google.chat.v1.Section\"" - + "?\332A\016parent,section\202\323\344\223\002(\"\035/v1/{parent=us" - + "ers/*}/sections:\007section\022{\n\rDeleteSectio" - + "n\022$.google.chat.v1.DeleteSectionRequest\032" - + "\026.google.protobuf.Empty\",\332A\004name\202\323\344\223\002\037*\035" - + "/v1/{name=users/*/sections/*}\022\234\001\n\rUpdate" - + "Section\022$.google.chat.v1.UpdateSectionRe" - + "quest\032\027.google.chat.v1.Section\"L\332A\023secti" - + "on,update_mask\202\323\344\223\00202%/v1/{section.name=" - + "users/*/sections/*}:\007section\022\211\001\n\014ListSec" - + "tions\022#.google.chat.v1.ListSectionsReque" - + "st\032$.google.chat.v1.ListSectionsResponse" - + "\".\332A\006parent\202\323\344\223\002\037\022\035/v1/{parent=users/*}/" - + "sections\022\225\001\n\017PositionSection\022&.google.ch" - + "at.v1.PositionSectionRequest\032\'.google.ch" - + "at.v1.PositionSectionResponse\"1\202\323\344\223\002+\"&/" - + "v1/{name=users/*/sections/*}:position:\001*" - + "\022\235\001\n\020ListSectionItems\022\'.google.chat.v1.L" - + "istSectionItemsRequest\032(.google.chat.v1." - + "ListSectionItemsResponse\"6\332A\006parent\202\323\344\223\002" - + "\'\022%/v1/{parent=users/*/sections/*}/items" - + "\022\257\001\n\017MoveSectionItem\022&.google.chat.v1.Mo" - + "veSectionItemRequest\032\'.google.chat.v1.Mo" - + "veSectionItemResponse\"K\332A\023name,target_se" - + "ction\202\323\344\223\002/\"*/v1/{name=users/*/sections/" - + "*/items/*}:move:\001*\032\365\020\312A\023chat.googleapis." - + "com\322A\333\020https://www.googleapis.com/auth/c" - + "hat.admin.delete,https://www.googleapis." - + "com/auth/chat.admin.memberships,https://" - + "www.googleapis.com/auth/chat.admin.membe" - + "rships.readonly,https://www.googleapis.c" - + "om/auth/chat.admin.spaces,https://www.go" - + "ogleapis.com/auth/chat.admin.spaces.read" + + "p.proto\032\034google/chat/v1/message.proto\032 g" + + "oogle/chat/v1/message_pin.proto\032\035google/" + + "chat/v1/reaction.proto\032\034google/chat/v1/s" + + "ection.proto\032\032google/chat/v1/space.proto" + + "\032 google/chat/v1/space_event.proto\032/goog" + + "le/chat/v1/space_notification_setting.pr" + + "oto\032%google/chat/v1/space_read_state.pro" + + "to\032 google/chat/v1/space_setup.proto\032&go" + + "ogle/chat/v1/thread_read_state.proto\032\033go" + + "ogle/protobuf/empty.proto2\333N\n\013ChatServic" + + "e\022\233\001\n\rCreateMessage\022$.google.chat.v1.Cre" + + "ateMessageRequest\032\027.google.chat.v1.Messa" + + "ge\"K\332A\031parent,message,message_id\202\323\344\223\002)\"\036" + + "/v1/{parent=spaces/*}/messages:\007message\022" + + "\212\001\n\014ListMessages\022#.google.chat.v1.ListMe" + + "ssagesRequest\032$.google.chat.v1.ListMessa" + + "gesResponse\"/\332A\006parent\202\323\344\223\002 \022\036/v1/{paren" + + "t=spaces/*}/messages\022\222\001\n\017ListMemberships" + + "\022&.google.chat.v1.ListMembershipsRequest" + + "\032\'.google.chat.v1.ListMembershipsRespons" + + "e\".\332A\006parent\202\323\344\223\002\037\022\035/v1/{parent=spaces/*" + + "}/members\022\177\n\rGetMembership\022$.google.chat" + + ".v1.GetMembershipRequest\032\032.google.chat.v" + + "1.Membership\",\332A\004name\202\323\344\223\002\037\022\035/v1/{name=s" + + "paces/*/members/*}\022w\n\nGetMessage\022!.googl" + + "e.chat.v1.GetMessageRequest\032\027.google.cha" + + "t.v1.Message\"-\332A\004name\202\323\344\223\002 \022\036/v1/{name=s" + + "paces/*/messages/*}\022\321\001\n\rUpdateMessage\022$." + + "google.chat.v1.UpdateMessageRequest\032\027.go" + + "ogle.chat.v1.Message\"\200\001\332A\023message,update" + + "_mask\202\323\344\223\002d\032&/v1/{message.name=spaces/*/" + + "messages/*}:\007messageZ12&/v1/{message.nam" + + "e=spaces/*/messages/*}:\007message\022|\n\rDelet" + + "eMessage\022$.google.chat.v1.DeleteMessageR" + + "equest\032\026.google.protobuf.Empty\"-\332A\004name\202" + + "\323\344\223\002 *\036/v1/{name=spaces/*/messages/*}\022\241\001" + + "\n\016SearchMessages\022%.google.chat.v1.Search" + + "MessagesRequest\032&.google.chat.v1.SearchM" + + "essagesResponse\"@\332A\rparent,filter\202\323\344\223\002*\"" + + "%/v1/{parent=spaces/*}/messages:search:\001" + + "*\022\216\001\n\rGetAttachment\022$.google.chat.v1.Get" + + "AttachmentRequest\032\032.google.chat.v1.Attac" + + "hment\";\332A\004name\202\323\344\223\002.\022,/v1/{name=spaces/*" + + "/messages/*/attachments/*}\022\232\001\n\020UploadAtt" + + "achment\022\'.google.chat.v1.UploadAttachmen" + + "tRequest\032(.google.chat.v1.UploadAttachme" + + "ntResponse\"3\202\323\344\223\002-\"(/v1/{parent=spaces/*" + + "}/attachments:upload:\001*\022j\n\nListSpaces\022!." + + "google.chat.v1.ListSpacesRequest\032\".googl" + + "e.chat.v1.ListSpacesResponse\"\025\332A\000\202\323\344\223\002\014\022" + + "\n/v1/spaces\022w\n\014SearchSpaces\022#.google.cha" + + "t.v1.SearchSpacesRequest\032$.google.chat.v" + + "1.SearchSpacesResponse\"\034\332A\000\202\323\344\223\002\023\022\021/v1/s" + + "paces:search\022f\n\010GetSpace\022\037.google.chat.v" + + "1.GetSpaceRequest\032\025.google.chat.v1.Space" + + "\"\"\332A\004name\202\323\344\223\002\025\022\023/v1/{name=spaces/*}\022k\n\013" + + "CreateSpace\022\".google.chat.v1.CreateSpace" + + "Request\032\025.google.chat.v1.Space\"!\332A\005space" + + "\202\323\344\223\002\023\"\n/v1/spaces:\005space\022c\n\nSetUpSpace\022" + + "!.google.chat.v1.SetUpSpaceRequest\032\025.goo" + + "gle.chat.v1.Space\"\033\202\323\344\223\002\025\"\020/v1/spaces:se" + + "tup:\001*\022\206\001\n\013UpdateSpace\022\".google.chat.v1." + + "UpdateSpaceRequest\032\025.google.chat.v1.Spac" + + "e\"<\332A\021space,update_mask\202\323\344\223\002\"2\031/v1/{spac" + + "e.name=spaces/*}:\005space\022m\n\013DeleteSpace\022\"" + + ".google.chat.v1.DeleteSpaceRequest\032\026.goo" + + "gle.protobuf.Empty\"\"\332A\004name\202\323\344\223\002\025*\023/v1/{" + + "name=spaces/*}\022\235\001\n\023CompleteImportSpace\022*" + + ".google.chat.v1.CompleteImportSpaceReque" + + "st\032+.google.chat.v1.CompleteImportSpaceR" + + "esponse\"-\202\323\344\223\002\'\"\"/v1/{name=spaces/*}:com" + + "pleteImport:\001*\022z\n\021FindDirectMessage\022(.go" + + "ogle.chat.v1.FindDirectMessageRequest\032\025." + + "google.chat.v1.Space\"$\202\323\344\223\002\036\022\034/v1/spaces" + + ":findDirectMessage\022\202\001\n\016FindGroupChats\022%." + + "google.chat.v1.FindGroupChatsRequest\032&.g" + + "oogle.chat.v1.FindGroupChatsResponse\"!\202\323" + + "\344\223\002\033\022\031/v1/spaces:findGroupChats\022\236\001\n\020Crea" + + "teMembership\022\'.google.chat.v1.CreateMemb" + + "ershipRequest\032\032.google.chat.v1.Membershi" + + "p\"E\332A\021parent,membership\202\323\344\223\002+\"\035/v1/{pare" + + "nt=spaces/*}/members:\nmembership\022\256\001\n\020Upd" + + "ateMembership\022\'.google.chat.v1.UpdateMem" + + "bershipRequest\032\032.google.chat.v1.Membersh" + + "ip\"U\332A\026membership,update_mask\202\323\344\223\00262(/v1" + + "/{membership.name=spaces/*/members/*}:\nm" + + "embership\022\205\001\n\020DeleteMembership\022\'.google." + + "chat.v1.DeleteMembershipRequest\032\032.google" + + ".chat.v1.Membership\",\332A\004name\202\323\344\223\002\037*\035/v1/" + + "{name=spaces/*/members/*}\022\241\001\n\016CreateReac" + + "tion\022%.google.chat.v1.CreateReactionRequ" + + "est\032\030.google.chat.v1.Reaction\"N\332A\017parent" + + ",reaction\202\323\344\223\0026\"*/v1/{parent=spaces/*/me" + + "ssages/*}/reactions:\010reaction\022\231\001\n\rListRe" + + "actions\022$.google.chat.v1.ListReactionsRe" + + "quest\032%.google.chat.v1.ListReactionsResp" + + "onse\";\332A\006parent\202\323\344\223\002,\022*/v1/{parent=space" + + "s/*/messages/*}/reactions\022\212\001\n\016DeleteReac" + + "tion\022%.google.chat.v1.DeleteReactionRequ" + + "est\032\026.google.protobuf.Empty\"9\332A\004name\202\323\344\223" + + "\002,**/v1/{name=spaces/*/messages/*/reacti" + + "ons/*}\022\226\001\n\017ListMessagePins\022&.google.chat" + + ".v1.ListMessagePinsRequest\032\'.google.chat" + + ".v1.ListMessagePinsResponse\"2\332A\006parent\202\323" + + "\344\223\002#\022!/v1/{parent=spaces/*}/messagePins\022" + + "\244\001\n\020CreateMessagePin\022\'.google.chat.v1.Cr" + + "eateMessagePinRequest\032\032.google.chat.v1.M" + + "essagePin\"K\332A\022parent,message_pin\202\323\344\223\0020\"!" + + "/v1/{parent=spaces/*}/messagePins:\013messa" + + "ge_pin\022\205\001\n\020DeleteMessagePin\022\'.google.cha" + + "t.v1.DeleteMessagePinRequest\032\026.google.pr" + + "otobuf.Empty\"0\332A\004name\202\323\344\223\002#*!/v1/{name=s" + + "paces/*/messagePins/*}\022\221\001\n\021CreateCustomE" + + "moji\022(.google.chat.v1.CreateCustomEmojiR" + + "equest\032\033.google.chat.v1.CustomEmoji\"5\332A\014" + + "custom_emoji\202\323\344\223\002 \"\020/v1/customEmojis:\014cu" + + "stom_emoji\022~\n\016GetCustomEmoji\022%.google.ch" + + "at.v1.GetCustomEmojiRequest\032\033.google.cha" + + "t.v1.CustomEmoji\"(\332A\004name\202\323\344\223\002\033\022\031/v1/{na" + + "me=customEmojis/*}\022\202\001\n\020ListCustomEmojis\022" + + "\'.google.chat.v1.ListCustomEmojisRequest" + + "\032(.google.chat.v1.ListCustomEmojisRespon" + + "se\"\033\332A\000\202\323\344\223\002\022\022\020/v1/customEmojis\022\177\n\021Delet" + + "eCustomEmoji\022(.google.chat.v1.DeleteCust" + + "omEmojiRequest\032\026.google.protobuf.Empty\"(" + + "\332A\004name\202\323\344\223\002\033*\031/v1/{name=customEmojis/*}" + + "\022\230\001\n\021GetSpaceReadState\022(.google.chat.v1." + + "GetSpaceReadStateRequest\032\036.google.chat.v" + + "1.SpaceReadState\"9\332A\004name\202\323\344\223\002,\022*/v1/{na" + + "me=users/*/spaces/*/spaceReadState}\022\331\001\n\024" + + "UpdateSpaceReadState\022+.google.chat.v1.Up" + + "dateSpaceReadStateRequest\032\036.google.chat." + + "v1.SpaceReadState\"t\332A\034space_read_state,u" + + "pdate_mask\202\323\344\223\002O2;/v1/{space_read_state." + + "name=users/*/spaces/*/spaceReadState}:\020s" + + "pace_read_state\022\246\001\n\022GetThreadReadState\022)" + + ".google.chat.v1.GetThreadReadStateReques" + + "t\032\037.google.chat.v1.ThreadReadState\"D\332A\004n" + + "ame\202\323\344\223\0027\0225/v1/{name=users/*/spaces/*/th" + + "reads/*/threadReadState}\022\207\001\n\017GetAvailabi" + + "lity\022&.google.chat.v1.GetAvailabilityReq" + + "uest\032\034.google.chat.v1.Availability\".\332A\004n" + + "ame\202\323\344\223\002!\022\037/v1/{name=users/*/availabilit" + + "y}\022\212\001\n\014MarkAsActive\022#.google.chat.v1.Mar" + + "kAsActiveRequest\032\034.google.chat.v1.Availa" + + "bility\"7\202\323\344\223\0021\",/v1/{name=users/*/availa" + + "bility}:markAsActive:\001*\022\204\001\n\nMarkAsAway\022!" + + ".google.chat.v1.MarkAsAwayRequest\032\034.goog" + + "le.chat.v1.Availability\"5\202\323\344\223\002/\"*/v1/{na" + + "me=users/*/availability}:markAsAway:\001*\022\234" + + "\001\n\022MarkAsDoNotDisturb\022).google.chat.v1.M" + + "arkAsDoNotDisturbRequest\032\034.google.chat.v" + + "1.Availability\"=\202\323\344\223\0027\"2/v1/{name=users/" + + "*/availability}:markAsDoNotDisturb:\001*\022\274\001" + + "\n\022UpdateAvailability\022).google.chat.v1.Up" + + "dateAvailabilityRequest\032\034.google.chat.v1" + + ".Availability\"]\332A\030availability,update_ma" + + "sk\202\323\344\223\002<2,/v1/{availability.name=users/*" + + "/availability}:\014availability\022\203\001\n\rGetSpac" + + "eEvent\022$.google.chat.v1.GetSpaceEventReq" + + "uest\032\032.google.chat.v1.SpaceEvent\"0\332A\004nam" + + "e\202\323\344\223\002#\022!/v1/{name=spaces/*/spaceEvents/" + + "*}\022\235\001\n\017ListSpaceEvents\022&.google.chat.v1." + + "ListSpaceEventsRequest\032\'.google.chat.v1." + + "ListSpaceEventsResponse\"9\332A\rparent,filte" + + "r\202\323\344\223\002#\022!/v1/{parent=spaces/*}/spaceEven" + + "ts\022\300\001\n\033GetSpaceNotificationSetting\0222.goo" + + "gle.chat.v1.GetSpaceNotificationSettingR" + + "equest\032(.google.chat.v1.SpaceNotificatio" + + "nSetting\"C\332A\004name\202\323\344\223\0026\0224/v1/{name=users" + + "/*/spaces/*/spaceNotificationSetting}\022\240\002" + + "\n\036UpdateSpaceNotificationSetting\0225.googl" + + "e.chat.v1.UpdateSpaceNotificationSetting" + + "Request\032(.google.chat.v1.SpaceNotificati" + + "onSetting\"\234\001\332A&space_notification_settin" + + "g,update_mask\202\323\344\223\002m2O/v1/{space_notifica" + + "tion_setting.name=users/*/spaces/*/space" + + "NotificationSetting}:\032space_notification" + + "_setting\022\217\001\n\rCreateSection\022$.google.chat" + + ".v1.CreateSectionRequest\032\027.google.chat.v" + + "1.Section\"?\332A\016parent,section\202\323\344\223\002(\"\035/v1/" + + "{parent=users/*}/sections:\007section\022{\n\rDe" + + "leteSection\022$.google.chat.v1.DeleteSecti" + + "onRequest\032\026.google.protobuf.Empty\",\332A\004na" + + "me\202\323\344\223\002\037*\035/v1/{name=users/*/sections/*}\022" + + "\234\001\n\rUpdateSection\022$.google.chat.v1.Updat" + + "eSectionRequest\032\027.google.chat.v1.Section" + + "\"L\332A\023section,update_mask\202\323\344\223\00202%/v1/{sec" + + "tion.name=users/*/sections/*}:\007section\022\211" + + "\001\n\014ListSections\022#.google.chat.v1.ListSec" + + "tionsRequest\032$.google.chat.v1.ListSectio" + + "nsResponse\".\332A\006parent\202\323\344\223\002\037\022\035/v1/{parent" + + "=users/*}/sections\022\225\001\n\017PositionSection\022&" + + ".google.chat.v1.PositionSectionRequest\032\'" + + ".google.chat.v1.PositionSectionResponse\"" + + "1\202\323\344\223\002+\"&/v1/{name=users/*/sections/*}:p" + + "osition:\001*\022\235\001\n\020ListSectionItems\022\'.google" + + ".chat.v1.ListSectionItemsRequest\032(.googl" + + "e.chat.v1.ListSectionItemsResponse\"6\332A\006p" + + "arent\202\323\344\223\002\'\022%/v1/{parent=users/*/section" + + "s/*}/items\022\257\001\n\017MoveSectionItem\022&.google." + + "chat.v1.MoveSectionItemRequest\032\'.google." + + "chat.v1.MoveSectionItemResponse\"K\332A\023name" + + ",target_section\202\323\344\223\002/\"*/v1/{name=users/*" + + "/sections/*/items/*}:move:\001*\032\340\021\312A\023chat.g" + + "oogleapis.com\322A\306\021https://www.googleapis." + + "com/auth/chat.admin.delete,https://www.g" + + "oogleapis.com/auth/chat.admin.membership" + + "s,https://www.googleapis.com/auth/chat.a" + + "dmin.memberships.readonly,https://www.go" + + "ogleapis.com/auth/chat.admin.spaces,http" + + "s://www.googleapis.com/auth/chat.admin.s" + + "paces.readonly,https://www.googleapis.co" + + "m/auth/chat.app.all.memberships.readonly" + + ",https://www.googleapis.com/auth/chat.ap" + + "p.all.messages.readonly,https://www.goog" + + "leapis.com/auth/chat.app.all.spaces.read" + "only,https://www.googleapis.com/auth/cha" - + "t.app.all.memberships.readonly,https://w" - + "ww.googleapis.com/auth/chat.app.all.mess" - + "ages.readonly,https://www.googleapis.com" - + "/auth/chat.app.all.spaces.readonly,https" - + "://www.googleapis.com/auth/chat.app.dele" + + "t.app.delete,https://www.googleapis.com/" + + "auth/chat.app.memberships,https://www.go" + + "ogleapis.com/auth/chat.app.memberships.r" + + "eadonly,https://www.googleapis.com/auth/" + + "chat.app.messages.readonly,https://www.g" + + "oogleapis.com/auth/chat.app.spaces,https" + + "://www.googleapis.com/auth/chat.app.spac" + + "es.create,https://www.googleapis.com/aut" + + "h/chat.app.spaces.readonly,https://www.g" + + "oogleapis.com/auth/chat.bot,https://www." + + "googleapis.com/auth/chat.customemojis,ht" + + "tps://www.googleapis.com/auth/chat.custo" + + "memojis.readonly,https://www.googleapis." + + "com/auth/chat.delete,https://www.googlea" + + "pis.com/auth/chat.import,https://www.goo" + + "gleapis.com/auth/chat.memberships,https:" + + "//www.googleapis.com/auth/chat.membershi" + + "ps.app,https://www.googleapis.com/auth/c" + + "hat.memberships.readonly,https://www.goo" + + "gleapis.com/auth/chat.messages,https://w" + + "ww.googleapis.com/auth/chat.messages.cre" + + "ate,https://www.googleapis.com/auth/chat" + + ".messages.reactions,https://www.googleap" + + "is.com/auth/chat.messages.reactions.crea" + "te,https://www.googleapis.com/auth/chat." - + "app.memberships,https://www.googleapis.c" - + "om/auth/chat.app.memberships.readonly,ht" - + "tps://www.googleapis.com/auth/chat.app.m" - + "essages.readonly,https://www.googleapis." - + "com/auth/chat.app.spaces,https://www.goo" - + "gleapis.com/auth/chat.app.spaces.create," - + "https://www.googleapis.com/auth/chat.app" - + ".spaces.readonly,https://www.googleapis." - + "com/auth/chat.bot,https://www.googleapis" - + ".com/auth/chat.customemojis,https://www." - + "googleapis.com/auth/chat.customemojis.re" + + "messages.reactions.readonly,https://www." + + "googleapis.com/auth/chat.messages.readon" + + "ly,https://www.googleapis.com/auth/chat." + + "spaces,https://www.googleapis.com/auth/c" + + "hat.spaces.create,https://www.googleapis" + + ".com/auth/chat.spaces.pins,https://www.g" + + "oogleapis.com/auth/chat.spaces.pins.read" + + "only,https://www.googleapis.com/auth/cha" + + "t.spaces.readonly,https://www.googleapis" + + ".com/auth/chat.users.availability,https:" + + "//www.googleapis.com/auth/chat.users.ava" + + "ilability.readonly,https://www.googleapi" + + "s.com/auth/chat.users.readstate,https://" + + "www.googleapis.com/auth/chat.users.reads" + + "tate.readonly,https://www.googleapis.com" + + "/auth/chat.users.sections,https://www.go" + + "ogleapis.com/auth/chat.users.sections.re" + "adonly,https://www.googleapis.com/auth/c" - + "hat.delete,https://www.googleapis.com/au" - + "th/chat.import,https://www.googleapis.co" - + "m/auth/chat.memberships,https://www.goog" - + "leapis.com/auth/chat.memberships.app,htt" - + "ps://www.googleapis.com/auth/chat.member" - + "ships.readonly,https://www.googleapis.co" - + "m/auth/chat.messages,https://www.googlea" - + "pis.com/auth/chat.messages.create,https:" - + "//www.googleapis.com/auth/chat.messages." - + "reactions,https://www.googleapis.com/aut" - + "h/chat.messages.reactions.create,https:/" - + "/www.googleapis.com/auth/chat.messages.r" - + "eactions.readonly,https://www.googleapis" - + ".com/auth/chat.messages.readonly,https:/" - + "/www.googleapis.com/auth/chat.spaces,htt" - + "ps://www.googleapis.com/auth/chat.spaces" - + ".create,https://www.googleapis.com/auth/" - + "chat.spaces.readonly,https://www.googlea" - + "pis.com/auth/chat.users.availability,htt" - + "ps://www.googleapis.com/auth/chat.users." - + "availability.readonly,https://www.google" - + "apis.com/auth/chat.users.readstate,https" - + "://www.googleapis.com/auth/chat.users.re" - + "adstate.readonly,https://www.googleapis." - + "com/auth/chat.users.sections,https://www" - + ".googleapis.com/auth/chat.users.sections" - + ".readonly,https://www.googleapis.com/aut" - + "h/chat.users.spacesettingsB\251\001\n\022com.googl" - + "e.chat.v1B\020ChatServiceProtoP\001Z,cloud.goo" - + "gle.com/go/chat/apiv1/chatpb;chatpb\242\002\013DY" - + "NAPIProto\252\002\023Google.Apps.Chat.V1\312\002\023Google" - + "\\Apps\\Chat\\V1\352\002\026Google::Apps::Chat::V1b\006" - + "proto3" + + "hat.users.spacesettingsB\251\001\n\022com.google.c" + + "hat.v1B\020ChatServiceProtoP\001Z,cloud.google" + + ".com/go/chat/apiv1/chatpb;chatpb\242\002\013DYNAP" + + "IProto\252\002\023Google.Apps.Chat.V1\312\002\023Google\\Ap" + + "ps\\Chat\\V1\352\002\026Google::Apps::Chat::V1b\006pro" + + "to3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -316,6 +331,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.chat.v1.AvailabilityProto.getDescriptor(), com.google.chat.v1.MembershipProto.getDescriptor(), com.google.chat.v1.MessageProto.getDescriptor(), + com.google.chat.v1.MessagePinProto.getDescriptor(), com.google.chat.v1.ReactionProto.getDescriptor(), com.google.chat.v1.SectionProto.getDescriptor(), com.google.chat.v1.SpaceProto.getDescriptor(), @@ -333,6 +349,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.chat.v1.AvailabilityProto.getDescriptor(); com.google.chat.v1.MembershipProto.getDescriptor(); com.google.chat.v1.MessageProto.getDescriptor(); + com.google.chat.v1.MessagePinProto.getDescriptor(); com.google.chat.v1.ReactionProto.getDescriptor(); com.google.chat.v1.SectionProto.getDescriptor(); com.google.chat.v1.SpaceProto.getDescriptor(); diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/CreateMessagePinRequest.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/CreateMessagePinRequest.java new file mode 100644 index 000000000000..cd549f3fa264 --- /dev/null +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/CreateMessagePinRequest.java @@ -0,0 +1,916 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/chat/v1/message_pin.proto +// Protobuf Java Version: 4.33.6 + +package com.google.chat.v1; + +/** + * + * + *
+ * Request message for creating a message pin.
+ * 
+ * + * Protobuf type {@code google.chat.v1.CreateMessagePinRequest} + */ +@com.google.protobuf.Generated +public final class CreateMessagePinRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.chat.v1.CreateMessagePinRequest) + CreateMessagePinRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "CreateMessagePinRequest"); + } + + // Use CreateMessagePinRequest.newBuilder() to construct. + private CreateMessagePinRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CreateMessagePinRequest() { + parent_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.chat.v1.MessagePinProto + .internal_static_google_chat_v1_CreateMessagePinRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.chat.v1.MessagePinProto + .internal_static_google_chat_v1_CreateMessagePinRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.chat.v1.CreateMessagePinRequest.class, + com.google.chat.v1.CreateMessagePinRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The parent space in which to create the message pin.
+   * Format: spaces/{space}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The parent space in which to create the message pin.
+   * Format: spaces/{space}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MESSAGE_PIN_FIELD_NUMBER = 2; + private com.google.chat.v1.MessagePin messagePin_; + + /** + * + * + *
+   * Required. The MessagePin to create.
+   * 
+ * + * .google.chat.v1.MessagePin message_pin = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the messagePin field is set. + */ + @java.lang.Override + public boolean hasMessagePin() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The MessagePin to create.
+   * 
+ * + * .google.chat.v1.MessagePin message_pin = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The messagePin. + */ + @java.lang.Override + public com.google.chat.v1.MessagePin getMessagePin() { + return messagePin_ == null ? com.google.chat.v1.MessagePin.getDefaultInstance() : messagePin_; + } + + /** + * + * + *
+   * Required. The MessagePin to create.
+   * 
+ * + * .google.chat.v1.MessagePin message_pin = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.chat.v1.MessagePinOrBuilder getMessagePinOrBuilder() { + return messagePin_ == null ? com.google.chat.v1.MessagePin.getDefaultInstance() : messagePin_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getMessagePin()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getMessagePin()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.chat.v1.CreateMessagePinRequest)) { + return super.equals(obj); + } + com.google.chat.v1.CreateMessagePinRequest other = + (com.google.chat.v1.CreateMessagePinRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasMessagePin() != other.hasMessagePin()) return false; + if (hasMessagePin()) { + if (!getMessagePin().equals(other.getMessagePin())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasMessagePin()) { + hash = (37 * hash) + MESSAGE_PIN_FIELD_NUMBER; + hash = (53 * hash) + getMessagePin().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.chat.v1.CreateMessagePinRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.chat.v1.CreateMessagePinRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.chat.v1.CreateMessagePinRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.chat.v1.CreateMessagePinRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.chat.v1.CreateMessagePinRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.chat.v1.CreateMessagePinRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.chat.v1.CreateMessagePinRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.chat.v1.CreateMessagePinRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.chat.v1.CreateMessagePinRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.chat.v1.CreateMessagePinRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.chat.v1.CreateMessagePinRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.chat.v1.CreateMessagePinRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.chat.v1.CreateMessagePinRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for creating a message pin.
+   * 
+ * + * Protobuf type {@code google.chat.v1.CreateMessagePinRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.chat.v1.CreateMessagePinRequest) + com.google.chat.v1.CreateMessagePinRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.chat.v1.MessagePinProto + .internal_static_google_chat_v1_CreateMessagePinRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.chat.v1.MessagePinProto + .internal_static_google_chat_v1_CreateMessagePinRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.chat.v1.CreateMessagePinRequest.class, + com.google.chat.v1.CreateMessagePinRequest.Builder.class); + } + + // Construct using com.google.chat.v1.CreateMessagePinRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetMessagePinFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + messagePin_ = null; + if (messagePinBuilder_ != null) { + messagePinBuilder_.dispose(); + messagePinBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.chat.v1.MessagePinProto + .internal_static_google_chat_v1_CreateMessagePinRequest_descriptor; + } + + @java.lang.Override + public com.google.chat.v1.CreateMessagePinRequest getDefaultInstanceForType() { + return com.google.chat.v1.CreateMessagePinRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.chat.v1.CreateMessagePinRequest build() { + com.google.chat.v1.CreateMessagePinRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.chat.v1.CreateMessagePinRequest buildPartial() { + com.google.chat.v1.CreateMessagePinRequest result = + new com.google.chat.v1.CreateMessagePinRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.chat.v1.CreateMessagePinRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.messagePin_ = messagePinBuilder_ == null ? messagePin_ : messagePinBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.chat.v1.CreateMessagePinRequest) { + return mergeFrom((com.google.chat.v1.CreateMessagePinRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.chat.v1.CreateMessagePinRequest other) { + if (other == com.google.chat.v1.CreateMessagePinRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasMessagePin()) { + mergeMessagePin(other.getMessagePin()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetMessagePinFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. The parent space in which to create the message pin.
+     * Format: spaces/{space}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The parent space in which to create the message pin.
+     * Format: spaces/{space}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The parent space in which to create the message pin.
+     * Format: spaces/{space}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The parent space in which to create the message pin.
+     * Format: spaces/{space}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The parent space in which to create the message pin.
+     * Format: spaces/{space}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.chat.v1.MessagePin messagePin_; + private com.google.protobuf.SingleFieldBuilder< + com.google.chat.v1.MessagePin, + com.google.chat.v1.MessagePin.Builder, + com.google.chat.v1.MessagePinOrBuilder> + messagePinBuilder_; + + /** + * + * + *
+     * Required. The MessagePin to create.
+     * 
+ * + * .google.chat.v1.MessagePin message_pin = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the messagePin field is set. + */ + public boolean hasMessagePin() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Required. The MessagePin to create.
+     * 
+ * + * .google.chat.v1.MessagePin message_pin = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The messagePin. + */ + public com.google.chat.v1.MessagePin getMessagePin() { + if (messagePinBuilder_ == null) { + return messagePin_ == null + ? com.google.chat.v1.MessagePin.getDefaultInstance() + : messagePin_; + } else { + return messagePinBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The MessagePin to create.
+     * 
+ * + * .google.chat.v1.MessagePin message_pin = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setMessagePin(com.google.chat.v1.MessagePin value) { + if (messagePinBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + messagePin_ = value; + } else { + messagePinBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The MessagePin to create.
+     * 
+ * + * .google.chat.v1.MessagePin message_pin = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setMessagePin(com.google.chat.v1.MessagePin.Builder builderForValue) { + if (messagePinBuilder_ == null) { + messagePin_ = builderForValue.build(); + } else { + messagePinBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The MessagePin to create.
+     * 
+ * + * .google.chat.v1.MessagePin message_pin = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeMessagePin(com.google.chat.v1.MessagePin value) { + if (messagePinBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && messagePin_ != null + && messagePin_ != com.google.chat.v1.MessagePin.getDefaultInstance()) { + getMessagePinBuilder().mergeFrom(value); + } else { + messagePin_ = value; + } + } else { + messagePinBuilder_.mergeFrom(value); + } + if (messagePin_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The MessagePin to create.
+     * 
+ * + * .google.chat.v1.MessagePin message_pin = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearMessagePin() { + bitField0_ = (bitField0_ & ~0x00000002); + messagePin_ = null; + if (messagePinBuilder_ != null) { + messagePinBuilder_.dispose(); + messagePinBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The MessagePin to create.
+     * 
+ * + * .google.chat.v1.MessagePin message_pin = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.chat.v1.MessagePin.Builder getMessagePinBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetMessagePinFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The MessagePin to create.
+     * 
+ * + * .google.chat.v1.MessagePin message_pin = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.chat.v1.MessagePinOrBuilder getMessagePinOrBuilder() { + if (messagePinBuilder_ != null) { + return messagePinBuilder_.getMessageOrBuilder(); + } else { + return messagePin_ == null + ? com.google.chat.v1.MessagePin.getDefaultInstance() + : messagePin_; + } + } + + /** + * + * + *
+     * Required. The MessagePin to create.
+     * 
+ * + * .google.chat.v1.MessagePin message_pin = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.chat.v1.MessagePin, + com.google.chat.v1.MessagePin.Builder, + com.google.chat.v1.MessagePinOrBuilder> + internalGetMessagePinFieldBuilder() { + if (messagePinBuilder_ == null) { + messagePinBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.chat.v1.MessagePin, + com.google.chat.v1.MessagePin.Builder, + com.google.chat.v1.MessagePinOrBuilder>( + getMessagePin(), getParentForChildren(), isClean()); + messagePin_ = null; + } + return messagePinBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.chat.v1.CreateMessagePinRequest) + } + + // @@protoc_insertion_point(class_scope:google.chat.v1.CreateMessagePinRequest) + private static final com.google.chat.v1.CreateMessagePinRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.chat.v1.CreateMessagePinRequest(); + } + + public static com.google.chat.v1.CreateMessagePinRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateMessagePinRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.chat.v1.CreateMessagePinRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/CreateMessagePinRequestOrBuilder.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/CreateMessagePinRequestOrBuilder.java new file mode 100644 index 000000000000..ecc8e1383d84 --- /dev/null +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/CreateMessagePinRequestOrBuilder.java @@ -0,0 +1,100 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/chat/v1/message_pin.proto +// Protobuf Java Version: 4.33.6 + +package com.google.chat.v1; + +@com.google.protobuf.Generated +public interface CreateMessagePinRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.chat.v1.CreateMessagePinRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent space in which to create the message pin.
+   * Format: spaces/{space}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The parent space in which to create the message pin.
+   * Format: spaces/{space}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The MessagePin to create.
+   * 
+ * + * .google.chat.v1.MessagePin message_pin = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the messagePin field is set. + */ + boolean hasMessagePin(); + + /** + * + * + *
+   * Required. The MessagePin to create.
+   * 
+ * + * .google.chat.v1.MessagePin message_pin = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The messagePin. + */ + com.google.chat.v1.MessagePin getMessagePin(); + + /** + * + * + *
+   * Required. The MessagePin to create.
+   * 
+ * + * .google.chat.v1.MessagePin message_pin = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.chat.v1.MessagePinOrBuilder getMessagePinOrBuilder(); +} diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/CreateMessageRequest.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/CreateMessageRequest.java index 517a7ae7992e..f9f38c80b822 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/CreateMessageRequest.java +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/CreateMessageRequest.java @@ -398,7 +398,7 @@ public com.google.chat.v1.MessageOrBuilder getMessageOrBuilder() { * * * @deprecated google.chat.v1.CreateMessageRequest.thread_key is deprecated. See - * google/chat/v1/message.proto;l=633 + * google/chat/v1/message.proto;l=635 * @return The threadKey. */ @java.lang.Override @@ -432,7 +432,7 @@ public java.lang.String getThreadKey() { * * * @deprecated google.chat.v1.CreateMessageRequest.thread_key is deprecated. See - * google/chat/v1/message.proto;l=633 + * google/chat/v1/message.proto;l=635 * @return The bytes for threadKey. */ @java.lang.Override @@ -458,9 +458,24 @@ public com.google.protobuf.ByteString getThreadKeyBytes() { * * *
-   * Optional. A unique request ID for this message. Specifying an existing
-   * request ID returns the message created with that ID instead of creating a
-   * new message.
+   * Optional. A unique ID for this request. A random UUID is recommended.
+   * Specifying a request ID makes the request idempotent, which ensures that
+   * multiple identical requests with the same request ID result in only a
+   * single message being created. Subsequent requests with the same request
+   * ID return the existing message and do not update the message, even if the
+   * requested details differ from the current state.
+   *
+   * To use this field effectively:
+   *
+   * - Ensure that subsequent requests are identical and use the same
+   * authentication credentials as the original request.
+   * - If a message was already created with the provided request ID, the
+   * request returns that message. Note that the returned message might not be
+   * fully populated; the API echoes the message in your request with the
+   * system-assigned resource names populated. To retrieve the latest metadata
+   * for the message, call `GetMessage`.
+   * - Reusing an existing request ID with a different authenticated user
+   * results in an error.
    * 
* * string request_id = 7 [(.google.api.field_behavior) = OPTIONAL]; @@ -484,9 +499,24 @@ public java.lang.String getRequestId() { * * *
-   * Optional. A unique request ID for this message. Specifying an existing
-   * request ID returns the message created with that ID instead of creating a
-   * new message.
+   * Optional. A unique ID for this request. A random UUID is recommended.
+   * Specifying a request ID makes the request idempotent, which ensures that
+   * multiple identical requests with the same request ID result in only a
+   * single message being created. Subsequent requests with the same request
+   * ID return the existing message and do not update the message, even if the
+   * requested details differ from the current state.
+   *
+   * To use this field effectively:
+   *
+   * - Ensure that subsequent requests are identical and use the same
+   * authentication credentials as the original request.
+   * - If a message was already created with the provided request ID, the
+   * request returns that message. Note that the returned message might not be
+   * fully populated; the API echoes the message in your request with the
+   * system-assigned resource names populated. To retrieve the latest metadata
+   * for the message, call `GetMessage`.
+   * - Reusing an existing request ID with a different authenticated user
+   * results in an error.
    * 
* * string request_id = 7 [(.google.api.field_behavior) = OPTIONAL]; @@ -1543,7 +1573,7 @@ public com.google.chat.v1.MessageOrBuilder getMessageOrBuilder() { * * * @deprecated google.chat.v1.CreateMessageRequest.thread_key is deprecated. See - * google/chat/v1/message.proto;l=633 + * google/chat/v1/message.proto;l=635 * @return The threadKey. */ @java.lang.Deprecated @@ -1576,7 +1606,7 @@ public java.lang.String getThreadKey() { * * * @deprecated google.chat.v1.CreateMessageRequest.thread_key is deprecated. See - * google/chat/v1/message.proto;l=633 + * google/chat/v1/message.proto;l=635 * @return The bytes for threadKey. */ @java.lang.Deprecated @@ -1609,7 +1639,7 @@ public com.google.protobuf.ByteString getThreadKeyBytes() { * * * @deprecated google.chat.v1.CreateMessageRequest.thread_key is deprecated. See - * google/chat/v1/message.proto;l=633 + * google/chat/v1/message.proto;l=635 * @param value The threadKey to set. * @return This builder for chaining. */ @@ -1641,7 +1671,7 @@ public Builder setThreadKey(java.lang.String value) { * * * @deprecated google.chat.v1.CreateMessageRequest.thread_key is deprecated. See - * google/chat/v1/message.proto;l=633 + * google/chat/v1/message.proto;l=635 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1669,7 +1699,7 @@ public Builder clearThreadKey() { * * * @deprecated google.chat.v1.CreateMessageRequest.thread_key is deprecated. See - * google/chat/v1/message.proto;l=633 + * google/chat/v1/message.proto;l=635 * @param value The bytes for threadKey to set. * @return This builder for chaining. */ @@ -1691,9 +1721,24 @@ public Builder setThreadKeyBytes(com.google.protobuf.ByteString value) { * * *
-     * Optional. A unique request ID for this message. Specifying an existing
-     * request ID returns the message created with that ID instead of creating a
-     * new message.
+     * Optional. A unique ID for this request. A random UUID is recommended.
+     * Specifying a request ID makes the request idempotent, which ensures that
+     * multiple identical requests with the same request ID result in only a
+     * single message being created. Subsequent requests with the same request
+     * ID return the existing message and do not update the message, even if the
+     * requested details differ from the current state.
+     *
+     * To use this field effectively:
+     *
+     * - Ensure that subsequent requests are identical and use the same
+     * authentication credentials as the original request.
+     * - If a message was already created with the provided request ID, the
+     * request returns that message. Note that the returned message might not be
+     * fully populated; the API echoes the message in your request with the
+     * system-assigned resource names populated. To retrieve the latest metadata
+     * for the message, call `GetMessage`.
+     * - Reusing an existing request ID with a different authenticated user
+     * results in an error.
      * 
* * string request_id = 7 [(.google.api.field_behavior) = OPTIONAL]; @@ -1716,9 +1761,24 @@ public java.lang.String getRequestId() { * * *
-     * Optional. A unique request ID for this message. Specifying an existing
-     * request ID returns the message created with that ID instead of creating a
-     * new message.
+     * Optional. A unique ID for this request. A random UUID is recommended.
+     * Specifying a request ID makes the request idempotent, which ensures that
+     * multiple identical requests with the same request ID result in only a
+     * single message being created. Subsequent requests with the same request
+     * ID return the existing message and do not update the message, even if the
+     * requested details differ from the current state.
+     *
+     * To use this field effectively:
+     *
+     * - Ensure that subsequent requests are identical and use the same
+     * authentication credentials as the original request.
+     * - If a message was already created with the provided request ID, the
+     * request returns that message. Note that the returned message might not be
+     * fully populated; the API echoes the message in your request with the
+     * system-assigned resource names populated. To retrieve the latest metadata
+     * for the message, call `GetMessage`.
+     * - Reusing an existing request ID with a different authenticated user
+     * results in an error.
      * 
* * string request_id = 7 [(.google.api.field_behavior) = OPTIONAL]; @@ -1741,9 +1801,24 @@ public com.google.protobuf.ByteString getRequestIdBytes() { * * *
-     * Optional. A unique request ID for this message. Specifying an existing
-     * request ID returns the message created with that ID instead of creating a
-     * new message.
+     * Optional. A unique ID for this request. A random UUID is recommended.
+     * Specifying a request ID makes the request idempotent, which ensures that
+     * multiple identical requests with the same request ID result in only a
+     * single message being created. Subsequent requests with the same request
+     * ID return the existing message and do not update the message, even if the
+     * requested details differ from the current state.
+     *
+     * To use this field effectively:
+     *
+     * - Ensure that subsequent requests are identical and use the same
+     * authentication credentials as the original request.
+     * - If a message was already created with the provided request ID, the
+     * request returns that message. Note that the returned message might not be
+     * fully populated; the API echoes the message in your request with the
+     * system-assigned resource names populated. To retrieve the latest metadata
+     * for the message, call `GetMessage`.
+     * - Reusing an existing request ID with a different authenticated user
+     * results in an error.
      * 
* * string request_id = 7 [(.google.api.field_behavior) = OPTIONAL]; @@ -1765,9 +1840,24 @@ public Builder setRequestId(java.lang.String value) { * * *
-     * Optional. A unique request ID for this message. Specifying an existing
-     * request ID returns the message created with that ID instead of creating a
-     * new message.
+     * Optional. A unique ID for this request. A random UUID is recommended.
+     * Specifying a request ID makes the request idempotent, which ensures that
+     * multiple identical requests with the same request ID result in only a
+     * single message being created. Subsequent requests with the same request
+     * ID return the existing message and do not update the message, even if the
+     * requested details differ from the current state.
+     *
+     * To use this field effectively:
+     *
+     * - Ensure that subsequent requests are identical and use the same
+     * authentication credentials as the original request.
+     * - If a message was already created with the provided request ID, the
+     * request returns that message. Note that the returned message might not be
+     * fully populated; the API echoes the message in your request with the
+     * system-assigned resource names populated. To retrieve the latest metadata
+     * for the message, call `GetMessage`.
+     * - Reusing an existing request ID with a different authenticated user
+     * results in an error.
      * 
* * string request_id = 7 [(.google.api.field_behavior) = OPTIONAL]; @@ -1785,9 +1875,24 @@ public Builder clearRequestId() { * * *
-     * Optional. A unique request ID for this message. Specifying an existing
-     * request ID returns the message created with that ID instead of creating a
-     * new message.
+     * Optional. A unique ID for this request. A random UUID is recommended.
+     * Specifying a request ID makes the request idempotent, which ensures that
+     * multiple identical requests with the same request ID result in only a
+     * single message being created. Subsequent requests with the same request
+     * ID return the existing message and do not update the message, even if the
+     * requested details differ from the current state.
+     *
+     * To use this field effectively:
+     *
+     * - Ensure that subsequent requests are identical and use the same
+     * authentication credentials as the original request.
+     * - If a message was already created with the provided request ID, the
+     * request returns that message. Note that the returned message might not be
+     * fully populated; the API echoes the message in your request with the
+     * system-assigned resource names populated. To retrieve the latest metadata
+     * for the message, call `GetMessage`.
+     * - Reusing an existing request ID with a different authenticated user
+     * results in an error.
      * 
* * string request_id = 7 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/CreateMessageRequestOrBuilder.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/CreateMessageRequestOrBuilder.java index 5d7a3938a4cb..50a702f5f3fc 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/CreateMessageRequestOrBuilder.java +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/CreateMessageRequestOrBuilder.java @@ -114,7 +114,7 @@ public interface CreateMessageRequestOrBuilder * * * @deprecated google.chat.v1.CreateMessageRequest.thread_key is deprecated. See - * google/chat/v1/message.proto;l=633 + * google/chat/v1/message.proto;l=635 * @return The threadKey. */ @java.lang.Deprecated @@ -137,7 +137,7 @@ public interface CreateMessageRequestOrBuilder * * * @deprecated google.chat.v1.CreateMessageRequest.thread_key is deprecated. See - * google/chat/v1/message.proto;l=633 + * google/chat/v1/message.proto;l=635 * @return The bytes for threadKey. */ @java.lang.Deprecated @@ -147,9 +147,24 @@ public interface CreateMessageRequestOrBuilder * * *
-   * Optional. A unique request ID for this message. Specifying an existing
-   * request ID returns the message created with that ID instead of creating a
-   * new message.
+   * Optional. A unique ID for this request. A random UUID is recommended.
+   * Specifying a request ID makes the request idempotent, which ensures that
+   * multiple identical requests with the same request ID result in only a
+   * single message being created. Subsequent requests with the same request
+   * ID return the existing message and do not update the message, even if the
+   * requested details differ from the current state.
+   *
+   * To use this field effectively:
+   *
+   * - Ensure that subsequent requests are identical and use the same
+   * authentication credentials as the original request.
+   * - If a message was already created with the provided request ID, the
+   * request returns that message. Note that the returned message might not be
+   * fully populated; the API echoes the message in your request with the
+   * system-assigned resource names populated. To retrieve the latest metadata
+   * for the message, call `GetMessage`.
+   * - Reusing an existing request ID with a different authenticated user
+   * results in an error.
    * 
* * string request_id = 7 [(.google.api.field_behavior) = OPTIONAL]; @@ -162,9 +177,24 @@ public interface CreateMessageRequestOrBuilder * * *
-   * Optional. A unique request ID for this message. Specifying an existing
-   * request ID returns the message created with that ID instead of creating a
-   * new message.
+   * Optional. A unique ID for this request. A random UUID is recommended.
+   * Specifying a request ID makes the request idempotent, which ensures that
+   * multiple identical requests with the same request ID result in only a
+   * single message being created. Subsequent requests with the same request
+   * ID return the existing message and do not update the message, even if the
+   * requested details differ from the current state.
+   *
+   * To use this field effectively:
+   *
+   * - Ensure that subsequent requests are identical and use the same
+   * authentication credentials as the original request.
+   * - If a message was already created with the provided request ID, the
+   * request returns that message. Note that the returned message might not be
+   * fully populated; the API echoes the message in your request with the
+   * system-assigned resource names populated. To retrieve the latest metadata
+   * for the message, call `GetMessage`.
+   * - Reusing an existing request ID with a different authenticated user
+   * results in an error.
    * 
* * string request_id = 7 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/CreateSpaceRequest.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/CreateSpaceRequest.java index c467a72e6186..527c5b872e50 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/CreateSpaceRequest.java +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/CreateSpaceRequest.java @@ -159,12 +159,24 @@ public com.google.chat.v1.SpaceOrBuilder getSpaceOrBuilder() { * * *
-   * Optional. A unique identifier for this request.
-   * A random UUID is recommended.
-   * Specifying an existing request ID returns the space created with that ID
-   * instead of creating a new space.
-   * Specifying an existing request ID from the same Chat app with a different
-   * authenticated user returns an error.
+   * Optional. A unique ID for this request. A random UUID is recommended.
+   * Specifying a request ID makes the request idempotent, which ensures that
+   * multiple identical requests with the same request ID result in only a
+   * single space being created. Subsequent requests with the same request ID
+   * return the existing space and do not update the space, even if the
+   * requested details differ from the current state.
+   *
+   * To use this field effectively:
+   *
+   * - Ensure that subsequent requests are identical and use the same
+   * authentication credentials as the original request.
+   * - If a space was already created with the provided request ID, the request
+   * returns that space. Note that the returned space might not be fully
+   * populated; the API echoes the space in your request with the
+   * system-assigned resource name populated. To retrieve the latest metadata
+   * for the space, call `GetSpace`.
+   * - Reusing an existing request ID with a different authenticated user
+   * results in an error.
    * 
* * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -188,12 +200,24 @@ public java.lang.String getRequestId() { * * *
-   * Optional. A unique identifier for this request.
-   * A random UUID is recommended.
-   * Specifying an existing request ID returns the space created with that ID
-   * instead of creating a new space.
-   * Specifying an existing request ID from the same Chat app with a different
-   * authenticated user returns an error.
+   * Optional. A unique ID for this request. A random UUID is recommended.
+   * Specifying a request ID makes the request idempotent, which ensures that
+   * multiple identical requests with the same request ID result in only a
+   * single space being created. Subsequent requests with the same request ID
+   * return the existing space and do not update the space, even if the
+   * requested details differ from the current state.
+   *
+   * To use this field effectively:
+   *
+   * - Ensure that subsequent requests are identical and use the same
+   * authentication credentials as the original request.
+   * - If a space was already created with the provided request ID, the request
+   * returns that space. Note that the returned space might not be fully
+   * populated; the API echoes the space in your request with the
+   * system-assigned resource name populated. To retrieve the latest metadata
+   * for the space, call `GetSpace`.
+   * - Reusing an existing request ID with a different authenticated user
+   * results in an error.
    * 
* * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -848,12 +872,24 @@ public com.google.chat.v1.SpaceOrBuilder getSpaceOrBuilder() { * * *
-     * Optional. A unique identifier for this request.
-     * A random UUID is recommended.
-     * Specifying an existing request ID returns the space created with that ID
-     * instead of creating a new space.
-     * Specifying an existing request ID from the same Chat app with a different
-     * authenticated user returns an error.
+     * Optional. A unique ID for this request. A random UUID is recommended.
+     * Specifying a request ID makes the request idempotent, which ensures that
+     * multiple identical requests with the same request ID result in only a
+     * single space being created. Subsequent requests with the same request ID
+     * return the existing space and do not update the space, even if the
+     * requested details differ from the current state.
+     *
+     * To use this field effectively:
+     *
+     * - Ensure that subsequent requests are identical and use the same
+     * authentication credentials as the original request.
+     * - If a space was already created with the provided request ID, the request
+     * returns that space. Note that the returned space might not be fully
+     * populated; the API echoes the space in your request with the
+     * system-assigned resource name populated. To retrieve the latest metadata
+     * for the space, call `GetSpace`.
+     * - Reusing an existing request ID with a different authenticated user
+     * results in an error.
      * 
* * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -876,12 +912,24 @@ public java.lang.String getRequestId() { * * *
-     * Optional. A unique identifier for this request.
-     * A random UUID is recommended.
-     * Specifying an existing request ID returns the space created with that ID
-     * instead of creating a new space.
-     * Specifying an existing request ID from the same Chat app with a different
-     * authenticated user returns an error.
+     * Optional. A unique ID for this request. A random UUID is recommended.
+     * Specifying a request ID makes the request idempotent, which ensures that
+     * multiple identical requests with the same request ID result in only a
+     * single space being created. Subsequent requests with the same request ID
+     * return the existing space and do not update the space, even if the
+     * requested details differ from the current state.
+     *
+     * To use this field effectively:
+     *
+     * - Ensure that subsequent requests are identical and use the same
+     * authentication credentials as the original request.
+     * - If a space was already created with the provided request ID, the request
+     * returns that space. Note that the returned space might not be fully
+     * populated; the API echoes the space in your request with the
+     * system-assigned resource name populated. To retrieve the latest metadata
+     * for the space, call `GetSpace`.
+     * - Reusing an existing request ID with a different authenticated user
+     * results in an error.
      * 
* * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -904,12 +952,24 @@ public com.google.protobuf.ByteString getRequestIdBytes() { * * *
-     * Optional. A unique identifier for this request.
-     * A random UUID is recommended.
-     * Specifying an existing request ID returns the space created with that ID
-     * instead of creating a new space.
-     * Specifying an existing request ID from the same Chat app with a different
-     * authenticated user returns an error.
+     * Optional. A unique ID for this request. A random UUID is recommended.
+     * Specifying a request ID makes the request idempotent, which ensures that
+     * multiple identical requests with the same request ID result in only a
+     * single space being created. Subsequent requests with the same request ID
+     * return the existing space and do not update the space, even if the
+     * requested details differ from the current state.
+     *
+     * To use this field effectively:
+     *
+     * - Ensure that subsequent requests are identical and use the same
+     * authentication credentials as the original request.
+     * - If a space was already created with the provided request ID, the request
+     * returns that space. Note that the returned space might not be fully
+     * populated; the API echoes the space in your request with the
+     * system-assigned resource name populated. To retrieve the latest metadata
+     * for the space, call `GetSpace`.
+     * - Reusing an existing request ID with a different authenticated user
+     * results in an error.
      * 
* * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -931,12 +991,24 @@ public Builder setRequestId(java.lang.String value) { * * *
-     * Optional. A unique identifier for this request.
-     * A random UUID is recommended.
-     * Specifying an existing request ID returns the space created with that ID
-     * instead of creating a new space.
-     * Specifying an existing request ID from the same Chat app with a different
-     * authenticated user returns an error.
+     * Optional. A unique ID for this request. A random UUID is recommended.
+     * Specifying a request ID makes the request idempotent, which ensures that
+     * multiple identical requests with the same request ID result in only a
+     * single space being created. Subsequent requests with the same request ID
+     * return the existing space and do not update the space, even if the
+     * requested details differ from the current state.
+     *
+     * To use this field effectively:
+     *
+     * - Ensure that subsequent requests are identical and use the same
+     * authentication credentials as the original request.
+     * - If a space was already created with the provided request ID, the request
+     * returns that space. Note that the returned space might not be fully
+     * populated; the API echoes the space in your request with the
+     * system-assigned resource name populated. To retrieve the latest metadata
+     * for the space, call `GetSpace`.
+     * - Reusing an existing request ID with a different authenticated user
+     * results in an error.
      * 
* * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -954,12 +1026,24 @@ public Builder clearRequestId() { * * *
-     * Optional. A unique identifier for this request.
-     * A random UUID is recommended.
-     * Specifying an existing request ID returns the space created with that ID
-     * instead of creating a new space.
-     * Specifying an existing request ID from the same Chat app with a different
-     * authenticated user returns an error.
+     * Optional. A unique ID for this request. A random UUID is recommended.
+     * Specifying a request ID makes the request idempotent, which ensures that
+     * multiple identical requests with the same request ID result in only a
+     * single space being created. Subsequent requests with the same request ID
+     * return the existing space and do not update the space, even if the
+     * requested details differ from the current state.
+     *
+     * To use this field effectively:
+     *
+     * - Ensure that subsequent requests are identical and use the same
+     * authentication credentials as the original request.
+     * - If a space was already created with the provided request ID, the request
+     * returns that space. Note that the returned space might not be fully
+     * populated; the API echoes the space in your request with the
+     * system-assigned resource name populated. To retrieve the latest metadata
+     * for the space, call `GetSpace`.
+     * - Reusing an existing request ID with a different authenticated user
+     * results in an error.
      * 
* * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/CreateSpaceRequestOrBuilder.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/CreateSpaceRequestOrBuilder.java index 6625324713e8..4c6420fe9dfa 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/CreateSpaceRequestOrBuilder.java +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/CreateSpaceRequestOrBuilder.java @@ -97,12 +97,24 @@ public interface CreateSpaceRequestOrBuilder * * *
-   * Optional. A unique identifier for this request.
-   * A random UUID is recommended.
-   * Specifying an existing request ID returns the space created with that ID
-   * instead of creating a new space.
-   * Specifying an existing request ID from the same Chat app with a different
-   * authenticated user returns an error.
+   * Optional. A unique ID for this request. A random UUID is recommended.
+   * Specifying a request ID makes the request idempotent, which ensures that
+   * multiple identical requests with the same request ID result in only a
+   * single space being created. Subsequent requests with the same request ID
+   * return the existing space and do not update the space, even if the
+   * requested details differ from the current state.
+   *
+   * To use this field effectively:
+   *
+   * - Ensure that subsequent requests are identical and use the same
+   * authentication credentials as the original request.
+   * - If a space was already created with the provided request ID, the request
+   * returns that space. Note that the returned space might not be fully
+   * populated; the API echoes the space in your request with the
+   * system-assigned resource name populated. To retrieve the latest metadata
+   * for the space, call `GetSpace`.
+   * - Reusing an existing request ID with a different authenticated user
+   * results in an error.
    * 
* * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -115,12 +127,24 @@ public interface CreateSpaceRequestOrBuilder * * *
-   * Optional. A unique identifier for this request.
-   * A random UUID is recommended.
-   * Specifying an existing request ID returns the space created with that ID
-   * instead of creating a new space.
-   * Specifying an existing request ID from the same Chat app with a different
-   * authenticated user returns an error.
+   * Optional. A unique ID for this request. A random UUID is recommended.
+   * Specifying a request ID makes the request idempotent, which ensures that
+   * multiple identical requests with the same request ID result in only a
+   * single space being created. Subsequent requests with the same request ID
+   * return the existing space and do not update the space, even if the
+   * requested details differ from the current state.
+   *
+   * To use this field effectively:
+   *
+   * - Ensure that subsequent requests are identical and use the same
+   * authentication credentials as the original request.
+   * - If a space was already created with the provided request ID, the request
+   * returns that space. Note that the returned space might not be fully
+   * populated; the API echoes the space in your request with the
+   * system-assigned resource name populated. To retrieve the latest metadata
+   * for the space, call `GetSpace`.
+   * - Reusing an existing request ID with a different authenticated user
+   * results in an error.
    * 
* * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/DeleteMessagePinRequest.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/DeleteMessagePinRequest.java new file mode 100644 index 000000000000..6968e0feeb64 --- /dev/null +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/DeleteMessagePinRequest.java @@ -0,0 +1,616 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/chat/v1/message_pin.proto +// Protobuf Java Version: 4.33.6 + +package com.google.chat.v1; + +/** + * + * + *
+ * Request message for deleting a message pin.
+ * 
+ * + * Protobuf type {@code google.chat.v1.DeleteMessagePinRequest} + */ +@com.google.protobuf.Generated +public final class DeleteMessagePinRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.chat.v1.DeleteMessagePinRequest) + DeleteMessagePinRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "DeleteMessagePinRequest"); + } + + // Use DeleteMessagePinRequest.newBuilder() to construct. + private DeleteMessagePinRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DeleteMessagePinRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.chat.v1.MessagePinProto + .internal_static_google_chat_v1_DeleteMessagePinRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.chat.v1.MessagePinProto + .internal_static_google_chat_v1_DeleteMessagePinRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.chat.v1.DeleteMessagePinRequest.class, + com.google.chat.v1.DeleteMessagePinRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The resource name of the message pin to remove.
+   * Format: spaces/{space}/messagePins/{message_pin}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The resource name of the message pin to remove.
+   * Format: spaces/{space}/messagePins/{message_pin}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.chat.v1.DeleteMessagePinRequest)) { + return super.equals(obj); + } + com.google.chat.v1.DeleteMessagePinRequest other = + (com.google.chat.v1.DeleteMessagePinRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.chat.v1.DeleteMessagePinRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.chat.v1.DeleteMessagePinRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.chat.v1.DeleteMessagePinRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.chat.v1.DeleteMessagePinRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.chat.v1.DeleteMessagePinRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.chat.v1.DeleteMessagePinRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.chat.v1.DeleteMessagePinRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.chat.v1.DeleteMessagePinRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.chat.v1.DeleteMessagePinRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.chat.v1.DeleteMessagePinRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.chat.v1.DeleteMessagePinRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.chat.v1.DeleteMessagePinRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.chat.v1.DeleteMessagePinRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for deleting a message pin.
+   * 
+ * + * Protobuf type {@code google.chat.v1.DeleteMessagePinRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.chat.v1.DeleteMessagePinRequest) + com.google.chat.v1.DeleteMessagePinRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.chat.v1.MessagePinProto + .internal_static_google_chat_v1_DeleteMessagePinRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.chat.v1.MessagePinProto + .internal_static_google_chat_v1_DeleteMessagePinRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.chat.v1.DeleteMessagePinRequest.class, + com.google.chat.v1.DeleteMessagePinRequest.Builder.class); + } + + // Construct using com.google.chat.v1.DeleteMessagePinRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.chat.v1.MessagePinProto + .internal_static_google_chat_v1_DeleteMessagePinRequest_descriptor; + } + + @java.lang.Override + public com.google.chat.v1.DeleteMessagePinRequest getDefaultInstanceForType() { + return com.google.chat.v1.DeleteMessagePinRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.chat.v1.DeleteMessagePinRequest build() { + com.google.chat.v1.DeleteMessagePinRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.chat.v1.DeleteMessagePinRequest buildPartial() { + com.google.chat.v1.DeleteMessagePinRequest result = + new com.google.chat.v1.DeleteMessagePinRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.chat.v1.DeleteMessagePinRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.chat.v1.DeleteMessagePinRequest) { + return mergeFrom((com.google.chat.v1.DeleteMessagePinRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.chat.v1.DeleteMessagePinRequest other) { + if (other == com.google.chat.v1.DeleteMessagePinRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The resource name of the message pin to remove.
+     * Format: spaces/{space}/messagePins/{message_pin}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The resource name of the message pin to remove.
+     * Format: spaces/{space}/messagePins/{message_pin}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The resource name of the message pin to remove.
+     * Format: spaces/{space}/messagePins/{message_pin}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource name of the message pin to remove.
+     * Format: spaces/{space}/messagePins/{message_pin}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource name of the message pin to remove.
+     * Format: spaces/{space}/messagePins/{message_pin}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.chat.v1.DeleteMessagePinRequest) + } + + // @@protoc_insertion_point(class_scope:google.chat.v1.DeleteMessagePinRequest) + private static final com.google.chat.v1.DeleteMessagePinRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.chat.v1.DeleteMessagePinRequest(); + } + + public static com.google.chat.v1.DeleteMessagePinRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteMessagePinRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.chat.v1.DeleteMessagePinRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/DeleteMessagePinRequestOrBuilder.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/DeleteMessagePinRequestOrBuilder.java new file mode 100644 index 000000000000..868fe61f5d1f --- /dev/null +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/DeleteMessagePinRequestOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/chat/v1/message_pin.proto +// Protobuf Java Version: 4.33.6 + +package com.google.chat.v1; + +@com.google.protobuf.Generated +public interface DeleteMessagePinRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.chat.v1.DeleteMessagePinRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the message pin to remove.
+   * Format: spaces/{space}/messagePins/{message_pin}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The resource name of the message pin to remove.
+   * Format: spaces/{space}/messagePins/{message_pin}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ListMessagePinsRequest.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ListMessagePinsRequest.java new file mode 100644 index 000000000000..1dbed1bf7701 --- /dev/null +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ListMessagePinsRequest.java @@ -0,0 +1,953 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/chat/v1/message_pin.proto +// Protobuf Java Version: 4.33.6 + +package com.google.chat.v1; + +/** + * + * + *
+ * Request message for listing message pins.
+ * 
+ * + * Protobuf type {@code google.chat.v1.ListMessagePinsRequest} + */ +@com.google.protobuf.Generated +public final class ListMessagePinsRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.chat.v1.ListMessagePinsRequest) + ListMessagePinsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ListMessagePinsRequest"); + } + + // Use ListMessagePinsRequest.newBuilder() to construct. + private ListMessagePinsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListMessagePinsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.chat.v1.MessagePinProto + .internal_static_google_chat_v1_ListMessagePinsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.chat.v1.MessagePinProto + .internal_static_google_chat_v1_ListMessagePinsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.chat.v1.ListMessagePinsRequest.class, + com.google.chat.v1.ListMessagePinsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The parent space which owns the collection of pinned items
+   * Format: `spaces/{space}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The parent space which owns the collection of pinned items
+   * Format: `spaces/{space}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + + /** + * + * + *
+   * Optional. The maximum number of message pins returned. The service might
+   * return fewer messages than this value. The maximum value is 100. If you use
+   * a value more than 100, it's automatically changed to 100. If unspecified,
+   * at most 100 message pins will be returned. Negative values return an
+   * `INVALID_ARGUMENT` error.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * Optional. A page token received from a previous list message pins call.
+   * Provide this parameter to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided should match the call that
+   * provided the page token. Passing different values to the other parameters
+   * might lead to unexpected results.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A page token received from a previous list message pins call.
+   * Provide this parameter to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided should match the call that
+   * provided the page token. Passing different values to the other parameters
+   * might lead to unexpected results.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.chat.v1.ListMessagePinsRequest)) { + return super.equals(obj); + } + com.google.chat.v1.ListMessagePinsRequest other = + (com.google.chat.v1.ListMessagePinsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.chat.v1.ListMessagePinsRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.chat.v1.ListMessagePinsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.chat.v1.ListMessagePinsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.chat.v1.ListMessagePinsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.chat.v1.ListMessagePinsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.chat.v1.ListMessagePinsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.chat.v1.ListMessagePinsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.chat.v1.ListMessagePinsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.chat.v1.ListMessagePinsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.chat.v1.ListMessagePinsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.chat.v1.ListMessagePinsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.chat.v1.ListMessagePinsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.chat.v1.ListMessagePinsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for listing message pins.
+   * 
+ * + * Protobuf type {@code google.chat.v1.ListMessagePinsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.chat.v1.ListMessagePinsRequest) + com.google.chat.v1.ListMessagePinsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.chat.v1.MessagePinProto + .internal_static_google_chat_v1_ListMessagePinsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.chat.v1.MessagePinProto + .internal_static_google_chat_v1_ListMessagePinsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.chat.v1.ListMessagePinsRequest.class, + com.google.chat.v1.ListMessagePinsRequest.Builder.class); + } + + // Construct using com.google.chat.v1.ListMessagePinsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.chat.v1.MessagePinProto + .internal_static_google_chat_v1_ListMessagePinsRequest_descriptor; + } + + @java.lang.Override + public com.google.chat.v1.ListMessagePinsRequest getDefaultInstanceForType() { + return com.google.chat.v1.ListMessagePinsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.chat.v1.ListMessagePinsRequest build() { + com.google.chat.v1.ListMessagePinsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.chat.v1.ListMessagePinsRequest buildPartial() { + com.google.chat.v1.ListMessagePinsRequest result = + new com.google.chat.v1.ListMessagePinsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.chat.v1.ListMessagePinsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.chat.v1.ListMessagePinsRequest) { + return mergeFrom((com.google.chat.v1.ListMessagePinsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.chat.v1.ListMessagePinsRequest other) { + if (other == com.google.chat.v1.ListMessagePinsRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. The parent space which owns the collection of pinned items
+     * Format: `spaces/{space}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The parent space which owns the collection of pinned items
+     * Format: `spaces/{space}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The parent space which owns the collection of pinned items
+     * Format: `spaces/{space}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The parent space which owns the collection of pinned items
+     * Format: `spaces/{space}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The parent space which owns the collection of pinned items
+     * Format: `spaces/{space}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + + /** + * + * + *
+     * Optional. The maximum number of message pins returned. The service might
+     * return fewer messages than this value. The maximum value is 100. If you use
+     * a value more than 100, it's automatically changed to 100. If unspecified,
+     * at most 100 message pins will be returned. Negative values return an
+     * `INVALID_ARGUMENT` error.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. The maximum number of message pins returned. The service might
+     * return fewer messages than this value. The maximum value is 100. If you use
+     * a value more than 100, it's automatically changed to 100. If unspecified,
+     * at most 100 message pins will be returned. Negative values return an
+     * `INVALID_ARGUMENT` error.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The maximum number of message pins returned. The service might
+     * return fewer messages than this value. The maximum value is 100. If you use
+     * a value more than 100, it's automatically changed to 100. If unspecified,
+     * at most 100 message pins will be returned. Negative values return an
+     * `INVALID_ARGUMENT` error.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. A page token received from a previous list message pins call.
+     * Provide this parameter to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided should match the call that
+     * provided the page token. Passing different values to the other parameters
+     * might lead to unexpected results.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A page token received from a previous list message pins call.
+     * Provide this parameter to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided should match the call that
+     * provided the page token. Passing different values to the other parameters
+     * might lead to unexpected results.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A page token received from a previous list message pins call.
+     * Provide this parameter to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided should match the call that
+     * provided the page token. Passing different values to the other parameters
+     * might lead to unexpected results.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token received from a previous list message pins call.
+     * Provide this parameter to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided should match the call that
+     * provided the page token. Passing different values to the other parameters
+     * might lead to unexpected results.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token received from a previous list message pins call.
+     * Provide this parameter to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided should match the call that
+     * provided the page token. Passing different values to the other parameters
+     * might lead to unexpected results.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.chat.v1.ListMessagePinsRequest) + } + + // @@protoc_insertion_point(class_scope:google.chat.v1.ListMessagePinsRequest) + private static final com.google.chat.v1.ListMessagePinsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.chat.v1.ListMessagePinsRequest(); + } + + public static com.google.chat.v1.ListMessagePinsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListMessagePinsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.chat.v1.ListMessagePinsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ListMessagePinsRequestOrBuilder.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ListMessagePinsRequestOrBuilder.java new file mode 100644 index 000000000000..c613208ce6a1 --- /dev/null +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ListMessagePinsRequestOrBuilder.java @@ -0,0 +1,113 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/chat/v1/message_pin.proto +// Protobuf Java Version: 4.33.6 + +package com.google.chat.v1; + +@com.google.protobuf.Generated +public interface ListMessagePinsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.chat.v1.ListMessagePinsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent space which owns the collection of pinned items
+   * Format: `spaces/{space}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The parent space which owns the collection of pinned items
+   * Format: `spaces/{space}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. The maximum number of message pins returned. The service might
+   * return fewer messages than this value. The maximum value is 100. If you use
+   * a value more than 100, it's automatically changed to 100. If unspecified,
+   * at most 100 message pins will be returned. Negative values return an
+   * `INVALID_ARGUMENT` error.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A page token received from a previous list message pins call.
+   * Provide this parameter to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided should match the call that
+   * provided the page token. Passing different values to the other parameters
+   * might lead to unexpected results.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A page token received from a previous list message pins call.
+   * Provide this parameter to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided should match the call that
+   * provided the page token. Passing different values to the other parameters
+   * might lead to unexpected results.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ListMessagePinsResponse.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ListMessagePinsResponse.java new file mode 100644 index 000000000000..5bbf29c70339 --- /dev/null +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ListMessagePinsResponse.java @@ -0,0 +1,1114 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/chat/v1/message_pin.proto +// Protobuf Java Version: 4.33.6 + +package com.google.chat.v1; + +/** + * + * + *
+ * Response message for listing message pins.
+ * 
+ * + * Protobuf type {@code google.chat.v1.ListMessagePinsResponse} + */ +@com.google.protobuf.Generated +public final class ListMessagePinsResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.chat.v1.ListMessagePinsResponse) + ListMessagePinsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ListMessagePinsResponse"); + } + + // Use ListMessagePinsResponse.newBuilder() to construct. + private ListMessagePinsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListMessagePinsResponse() { + messagePins_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.chat.v1.MessagePinProto + .internal_static_google_chat_v1_ListMessagePinsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.chat.v1.MessagePinProto + .internal_static_google_chat_v1_ListMessagePinsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.chat.v1.ListMessagePinsResponse.class, + com.google.chat.v1.ListMessagePinsResponse.Builder.class); + } + + public static final int MESSAGE_PINS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List messagePins_; + + /** + * + * + *
+   * The pinned messages from the specified space.
+   * 
+ * + * repeated .google.chat.v1.MessagePin message_pins = 1; + */ + @java.lang.Override + public java.util.List getMessagePinsList() { + return messagePins_; + } + + /** + * + * + *
+   * The pinned messages from the specified space.
+   * 
+ * + * repeated .google.chat.v1.MessagePin message_pins = 1; + */ + @java.lang.Override + public java.util.List + getMessagePinsOrBuilderList() { + return messagePins_; + } + + /** + * + * + *
+   * The pinned messages from the specified space.
+   * 
+ * + * repeated .google.chat.v1.MessagePin message_pins = 1; + */ + @java.lang.Override + public int getMessagePinsCount() { + return messagePins_.size(); + } + + /** + * + * + *
+   * The pinned messages from the specified space.
+   * 
+ * + * repeated .google.chat.v1.MessagePin message_pins = 1; + */ + @java.lang.Override + public com.google.chat.v1.MessagePin getMessagePins(int index) { + return messagePins_.get(index); + } + + /** + * + * + *
+   * The pinned messages from the specified space.
+   * 
+ * + * repeated .google.chat.v1.MessagePin message_pins = 1; + */ + @java.lang.Override + public com.google.chat.v1.MessagePinOrBuilder getMessagePinsOrBuilder(int index) { + return messagePins_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * You can send a token as `pageToken` to retrieve the next page of
+   * results. If empty, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * You can send a token as `pageToken` to retrieve the next page of
+   * results. If empty, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < messagePins_.size(); i++) { + output.writeMessage(1, messagePins_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < messagePins_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, messagePins_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.chat.v1.ListMessagePinsResponse)) { + return super.equals(obj); + } + com.google.chat.v1.ListMessagePinsResponse other = + (com.google.chat.v1.ListMessagePinsResponse) obj; + + if (!getMessagePinsList().equals(other.getMessagePinsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getMessagePinsCount() > 0) { + hash = (37 * hash) + MESSAGE_PINS_FIELD_NUMBER; + hash = (53 * hash) + getMessagePinsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.chat.v1.ListMessagePinsResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.chat.v1.ListMessagePinsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.chat.v1.ListMessagePinsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.chat.v1.ListMessagePinsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.chat.v1.ListMessagePinsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.chat.v1.ListMessagePinsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.chat.v1.ListMessagePinsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.chat.v1.ListMessagePinsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.chat.v1.ListMessagePinsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.chat.v1.ListMessagePinsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.chat.v1.ListMessagePinsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.chat.v1.ListMessagePinsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.chat.v1.ListMessagePinsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response message for listing message pins.
+   * 
+ * + * Protobuf type {@code google.chat.v1.ListMessagePinsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.chat.v1.ListMessagePinsResponse) + com.google.chat.v1.ListMessagePinsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.chat.v1.MessagePinProto + .internal_static_google_chat_v1_ListMessagePinsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.chat.v1.MessagePinProto + .internal_static_google_chat_v1_ListMessagePinsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.chat.v1.ListMessagePinsResponse.class, + com.google.chat.v1.ListMessagePinsResponse.Builder.class); + } + + // Construct using com.google.chat.v1.ListMessagePinsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (messagePinsBuilder_ == null) { + messagePins_ = java.util.Collections.emptyList(); + } else { + messagePins_ = null; + messagePinsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.chat.v1.MessagePinProto + .internal_static_google_chat_v1_ListMessagePinsResponse_descriptor; + } + + @java.lang.Override + public com.google.chat.v1.ListMessagePinsResponse getDefaultInstanceForType() { + return com.google.chat.v1.ListMessagePinsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.chat.v1.ListMessagePinsResponse build() { + com.google.chat.v1.ListMessagePinsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.chat.v1.ListMessagePinsResponse buildPartial() { + com.google.chat.v1.ListMessagePinsResponse result = + new com.google.chat.v1.ListMessagePinsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.chat.v1.ListMessagePinsResponse result) { + if (messagePinsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + messagePins_ = java.util.Collections.unmodifiableList(messagePins_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.messagePins_ = messagePins_; + } else { + result.messagePins_ = messagePinsBuilder_.build(); + } + } + + private void buildPartial0(com.google.chat.v1.ListMessagePinsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.chat.v1.ListMessagePinsResponse) { + return mergeFrom((com.google.chat.v1.ListMessagePinsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.chat.v1.ListMessagePinsResponse other) { + if (other == com.google.chat.v1.ListMessagePinsResponse.getDefaultInstance()) return this; + if (messagePinsBuilder_ == null) { + if (!other.messagePins_.isEmpty()) { + if (messagePins_.isEmpty()) { + messagePins_ = other.messagePins_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureMessagePinsIsMutable(); + messagePins_.addAll(other.messagePins_); + } + onChanged(); + } + } else { + if (!other.messagePins_.isEmpty()) { + if (messagePinsBuilder_.isEmpty()) { + messagePinsBuilder_.dispose(); + messagePinsBuilder_ = null; + messagePins_ = other.messagePins_; + bitField0_ = (bitField0_ & ~0x00000001); + messagePinsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetMessagePinsFieldBuilder() + : null; + } else { + messagePinsBuilder_.addAllMessages(other.messagePins_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.chat.v1.MessagePin m = + input.readMessage(com.google.chat.v1.MessagePin.parser(), extensionRegistry); + if (messagePinsBuilder_ == null) { + ensureMessagePinsIsMutable(); + messagePins_.add(m); + } else { + messagePinsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List messagePins_ = + java.util.Collections.emptyList(); + + private void ensureMessagePinsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + messagePins_ = new java.util.ArrayList(messagePins_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.chat.v1.MessagePin, + com.google.chat.v1.MessagePin.Builder, + com.google.chat.v1.MessagePinOrBuilder> + messagePinsBuilder_; + + /** + * + * + *
+     * The pinned messages from the specified space.
+     * 
+ * + * repeated .google.chat.v1.MessagePin message_pins = 1; + */ + public java.util.List getMessagePinsList() { + if (messagePinsBuilder_ == null) { + return java.util.Collections.unmodifiableList(messagePins_); + } else { + return messagePinsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The pinned messages from the specified space.
+     * 
+ * + * repeated .google.chat.v1.MessagePin message_pins = 1; + */ + public int getMessagePinsCount() { + if (messagePinsBuilder_ == null) { + return messagePins_.size(); + } else { + return messagePinsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The pinned messages from the specified space.
+     * 
+ * + * repeated .google.chat.v1.MessagePin message_pins = 1; + */ + public com.google.chat.v1.MessagePin getMessagePins(int index) { + if (messagePinsBuilder_ == null) { + return messagePins_.get(index); + } else { + return messagePinsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The pinned messages from the specified space.
+     * 
+ * + * repeated .google.chat.v1.MessagePin message_pins = 1; + */ + public Builder setMessagePins(int index, com.google.chat.v1.MessagePin value) { + if (messagePinsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMessagePinsIsMutable(); + messagePins_.set(index, value); + onChanged(); + } else { + messagePinsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The pinned messages from the specified space.
+     * 
+ * + * repeated .google.chat.v1.MessagePin message_pins = 1; + */ + public Builder setMessagePins( + int index, com.google.chat.v1.MessagePin.Builder builderForValue) { + if (messagePinsBuilder_ == null) { + ensureMessagePinsIsMutable(); + messagePins_.set(index, builderForValue.build()); + onChanged(); + } else { + messagePinsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The pinned messages from the specified space.
+     * 
+ * + * repeated .google.chat.v1.MessagePin message_pins = 1; + */ + public Builder addMessagePins(com.google.chat.v1.MessagePin value) { + if (messagePinsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMessagePinsIsMutable(); + messagePins_.add(value); + onChanged(); + } else { + messagePinsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The pinned messages from the specified space.
+     * 
+ * + * repeated .google.chat.v1.MessagePin message_pins = 1; + */ + public Builder addMessagePins(int index, com.google.chat.v1.MessagePin value) { + if (messagePinsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMessagePinsIsMutable(); + messagePins_.add(index, value); + onChanged(); + } else { + messagePinsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The pinned messages from the specified space.
+     * 
+ * + * repeated .google.chat.v1.MessagePin message_pins = 1; + */ + public Builder addMessagePins(com.google.chat.v1.MessagePin.Builder builderForValue) { + if (messagePinsBuilder_ == null) { + ensureMessagePinsIsMutable(); + messagePins_.add(builderForValue.build()); + onChanged(); + } else { + messagePinsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The pinned messages from the specified space.
+     * 
+ * + * repeated .google.chat.v1.MessagePin message_pins = 1; + */ + public Builder addMessagePins( + int index, com.google.chat.v1.MessagePin.Builder builderForValue) { + if (messagePinsBuilder_ == null) { + ensureMessagePinsIsMutable(); + messagePins_.add(index, builderForValue.build()); + onChanged(); + } else { + messagePinsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The pinned messages from the specified space.
+     * 
+ * + * repeated .google.chat.v1.MessagePin message_pins = 1; + */ + public Builder addAllMessagePins( + java.lang.Iterable values) { + if (messagePinsBuilder_ == null) { + ensureMessagePinsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, messagePins_); + onChanged(); + } else { + messagePinsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The pinned messages from the specified space.
+     * 
+ * + * repeated .google.chat.v1.MessagePin message_pins = 1; + */ + public Builder clearMessagePins() { + if (messagePinsBuilder_ == null) { + messagePins_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + messagePinsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The pinned messages from the specified space.
+     * 
+ * + * repeated .google.chat.v1.MessagePin message_pins = 1; + */ + public Builder removeMessagePins(int index) { + if (messagePinsBuilder_ == null) { + ensureMessagePinsIsMutable(); + messagePins_.remove(index); + onChanged(); + } else { + messagePinsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The pinned messages from the specified space.
+     * 
+ * + * repeated .google.chat.v1.MessagePin message_pins = 1; + */ + public com.google.chat.v1.MessagePin.Builder getMessagePinsBuilder(int index) { + return internalGetMessagePinsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The pinned messages from the specified space.
+     * 
+ * + * repeated .google.chat.v1.MessagePin message_pins = 1; + */ + public com.google.chat.v1.MessagePinOrBuilder getMessagePinsOrBuilder(int index) { + if (messagePinsBuilder_ == null) { + return messagePins_.get(index); + } else { + return messagePinsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The pinned messages from the specified space.
+     * 
+ * + * repeated .google.chat.v1.MessagePin message_pins = 1; + */ + public java.util.List + getMessagePinsOrBuilderList() { + if (messagePinsBuilder_ != null) { + return messagePinsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(messagePins_); + } + } + + /** + * + * + *
+     * The pinned messages from the specified space.
+     * 
+ * + * repeated .google.chat.v1.MessagePin message_pins = 1; + */ + public com.google.chat.v1.MessagePin.Builder addMessagePinsBuilder() { + return internalGetMessagePinsFieldBuilder() + .addBuilder(com.google.chat.v1.MessagePin.getDefaultInstance()); + } + + /** + * + * + *
+     * The pinned messages from the specified space.
+     * 
+ * + * repeated .google.chat.v1.MessagePin message_pins = 1; + */ + public com.google.chat.v1.MessagePin.Builder addMessagePinsBuilder(int index) { + return internalGetMessagePinsFieldBuilder() + .addBuilder(index, com.google.chat.v1.MessagePin.getDefaultInstance()); + } + + /** + * + * + *
+     * The pinned messages from the specified space.
+     * 
+ * + * repeated .google.chat.v1.MessagePin message_pins = 1; + */ + public java.util.List getMessagePinsBuilderList() { + return internalGetMessagePinsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.chat.v1.MessagePin, + com.google.chat.v1.MessagePin.Builder, + com.google.chat.v1.MessagePinOrBuilder> + internalGetMessagePinsFieldBuilder() { + if (messagePinsBuilder_ == null) { + messagePinsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.chat.v1.MessagePin, + com.google.chat.v1.MessagePin.Builder, + com.google.chat.v1.MessagePinOrBuilder>( + messagePins_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + messagePins_ = null; + } + return messagePinsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * You can send a token as `pageToken` to retrieve the next page of
+     * results. If empty, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * You can send a token as `pageToken` to retrieve the next page of
+     * results. If empty, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * You can send a token as `pageToken` to retrieve the next page of
+     * results. If empty, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * You can send a token as `pageToken` to retrieve the next page of
+     * results. If empty, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * You can send a token as `pageToken` to retrieve the next page of
+     * results. If empty, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.chat.v1.ListMessagePinsResponse) + } + + // @@protoc_insertion_point(class_scope:google.chat.v1.ListMessagePinsResponse) + private static final com.google.chat.v1.ListMessagePinsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.chat.v1.ListMessagePinsResponse(); + } + + public static com.google.chat.v1.ListMessagePinsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListMessagePinsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.chat.v1.ListMessagePinsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ListMessagePinsResponseOrBuilder.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ListMessagePinsResponseOrBuilder.java new file mode 100644 index 000000000000..4dfa43a26f86 --- /dev/null +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ListMessagePinsResponseOrBuilder.java @@ -0,0 +1,111 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/chat/v1/message_pin.proto +// Protobuf Java Version: 4.33.6 + +package com.google.chat.v1; + +@com.google.protobuf.Generated +public interface ListMessagePinsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.chat.v1.ListMessagePinsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The pinned messages from the specified space.
+   * 
+ * + * repeated .google.chat.v1.MessagePin message_pins = 1; + */ + java.util.List getMessagePinsList(); + + /** + * + * + *
+   * The pinned messages from the specified space.
+   * 
+ * + * repeated .google.chat.v1.MessagePin message_pins = 1; + */ + com.google.chat.v1.MessagePin getMessagePins(int index); + + /** + * + * + *
+   * The pinned messages from the specified space.
+   * 
+ * + * repeated .google.chat.v1.MessagePin message_pins = 1; + */ + int getMessagePinsCount(); + + /** + * + * + *
+   * The pinned messages from the specified space.
+   * 
+ * + * repeated .google.chat.v1.MessagePin message_pins = 1; + */ + java.util.List getMessagePinsOrBuilderList(); + + /** + * + * + *
+   * The pinned messages from the specified space.
+   * 
+ * + * repeated .google.chat.v1.MessagePin message_pins = 1; + */ + com.google.chat.v1.MessagePinOrBuilder getMessagePinsOrBuilder(int index); + + /** + * + * + *
+   * You can send a token as `pageToken` to retrieve the next page of
+   * results. If empty, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * You can send a token as `pageToken` to retrieve the next page of
+   * results. If empty, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/MessagePin.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/MessagePin.java new file mode 100644 index 000000000000..0d434e684691 --- /dev/null +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/MessagePin.java @@ -0,0 +1,836 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/chat/v1/message_pin.proto +// Protobuf Java Version: 4.33.6 + +package com.google.chat.v1; + +/** + * + * + *
+ * A pin on a Chat message. For more information see [Pin a
+ * message](https://support.google.com/chat?p=chat-board-hc).
+ * 
+ * + * Protobuf type {@code google.chat.v1.MessagePin} + */ +@com.google.protobuf.Generated +public final class MessagePin extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.chat.v1.MessagePin) + MessagePinOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "MessagePin"); + } + + // Use MessagePin.newBuilder() to construct. + private MessagePin(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private MessagePin() { + name_ = ""; + message_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.chat.v1.MessagePinProto.internal_static_google_chat_v1_MessagePin_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.chat.v1.MessagePinProto + .internal_static_google_chat_v1_MessagePin_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.chat.v1.MessagePin.class, com.google.chat.v1.MessagePin.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Identifier. The resource name of the message pin.
+   * Format: `spaces/{space}/messagePins/{message_pin}`
+   * The resource ID component matches the resource ID component of the
+   * message. For example, a message with `spaces/AAA/messages/bbb.ccc`
+   * corresponds to the message pin with the resource name
+   * `spaces/AAA/messagePins/bbb.ccc`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Identifier. The resource name of the message pin.
+   * Format: `spaces/{space}/messagePins/{message_pin}`
+   * The resource ID component matches the resource ID component of the
+   * message. For example, a message with `spaces/AAA/messages/bbb.ccc`
+   * corresponds to the message pin with the resource name
+   * `spaces/AAA/messagePins/bbb.ccc`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MESSAGE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object message_ = ""; + + /** + * + * + *
+   * Required. Immutable. The resource name of the message that is pinned.
+   * Format: `spaces/{space}/messages/{message}`
+   * 
+ * + * + * string message = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The message. + */ + @java.lang.Override + public java.lang.String getMessage() { + java.lang.Object ref = message_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + message_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Immutable. The resource name of the message that is pinned.
+   * Format: `spaces/{space}/messages/{message}`
+   * 
+ * + * + * string message = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for message. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMessageBytes() { + java.lang.Object ref = message_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + message_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(message_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, message_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(message_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, message_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.chat.v1.MessagePin)) { + return super.equals(obj); + } + com.google.chat.v1.MessagePin other = (com.google.chat.v1.MessagePin) obj; + + if (!getName().equals(other.getName())) return false; + if (!getMessage().equals(other.getMessage())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getMessage().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.chat.v1.MessagePin parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.chat.v1.MessagePin parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.chat.v1.MessagePin parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.chat.v1.MessagePin parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.chat.v1.MessagePin parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.chat.v1.MessagePin parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.chat.v1.MessagePin parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.chat.v1.MessagePin parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.chat.v1.MessagePin parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.chat.v1.MessagePin parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.chat.v1.MessagePin parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.chat.v1.MessagePin parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.chat.v1.MessagePin prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A pin on a Chat message. For more information see [Pin a
+   * message](https://support.google.com/chat?p=chat-board-hc).
+   * 
+ * + * Protobuf type {@code google.chat.v1.MessagePin} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.chat.v1.MessagePin) + com.google.chat.v1.MessagePinOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.chat.v1.MessagePinProto + .internal_static_google_chat_v1_MessagePin_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.chat.v1.MessagePinProto + .internal_static_google_chat_v1_MessagePin_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.chat.v1.MessagePin.class, com.google.chat.v1.MessagePin.Builder.class); + } + + // Construct using com.google.chat.v1.MessagePin.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + message_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.chat.v1.MessagePinProto + .internal_static_google_chat_v1_MessagePin_descriptor; + } + + @java.lang.Override + public com.google.chat.v1.MessagePin getDefaultInstanceForType() { + return com.google.chat.v1.MessagePin.getDefaultInstance(); + } + + @java.lang.Override + public com.google.chat.v1.MessagePin build() { + com.google.chat.v1.MessagePin result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.chat.v1.MessagePin buildPartial() { + com.google.chat.v1.MessagePin result = new com.google.chat.v1.MessagePin(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.chat.v1.MessagePin result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.message_ = message_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.chat.v1.MessagePin) { + return mergeFrom((com.google.chat.v1.MessagePin) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.chat.v1.MessagePin other) { + if (other == com.google.chat.v1.MessagePin.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getMessage().isEmpty()) { + message_ = other.message_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + message_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Identifier. The resource name of the message pin.
+     * Format: `spaces/{space}/messagePins/{message_pin}`
+     * The resource ID component matches the resource ID component of the
+     * message. For example, a message with `spaces/AAA/messages/bbb.ccc`
+     * corresponds to the message pin with the resource name
+     * `spaces/AAA/messagePins/bbb.ccc`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Identifier. The resource name of the message pin.
+     * Format: `spaces/{space}/messagePins/{message_pin}`
+     * The resource ID component matches the resource ID component of the
+     * message. For example, a message with `spaces/AAA/messages/bbb.ccc`
+     * corresponds to the message pin with the resource name
+     * `spaces/AAA/messagePins/bbb.ccc`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Identifier. The resource name of the message pin.
+     * Format: `spaces/{space}/messagePins/{message_pin}`
+     * The resource ID component matches the resource ID component of the
+     * message. For example, a message with `spaces/AAA/messages/bbb.ccc`
+     * corresponds to the message pin with the resource name
+     * `spaces/AAA/messagePins/bbb.ccc`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. The resource name of the message pin.
+     * Format: `spaces/{space}/messagePins/{message_pin}`
+     * The resource ID component matches the resource ID component of the
+     * message. For example, a message with `spaces/AAA/messages/bbb.ccc`
+     * corresponds to the message pin with the resource name
+     * `spaces/AAA/messagePins/bbb.ccc`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. The resource name of the message pin.
+     * Format: `spaces/{space}/messagePins/{message_pin}`
+     * The resource ID component matches the resource ID component of the
+     * message. For example, a message with `spaces/AAA/messages/bbb.ccc`
+     * corresponds to the message pin with the resource name
+     * `spaces/AAA/messagePins/bbb.ccc`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object message_ = ""; + + /** + * + * + *
+     * Required. Immutable. The resource name of the message that is pinned.
+     * Format: `spaces/{space}/messages/{message}`
+     * 
+ * + * + * string message = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The message. + */ + public java.lang.String getMessage() { + java.lang.Object ref = message_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + message_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Immutable. The resource name of the message that is pinned.
+     * Format: `spaces/{space}/messages/{message}`
+     * 
+ * + * + * string message = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for message. + */ + public com.google.protobuf.ByteString getMessageBytes() { + java.lang.Object ref = message_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + message_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Immutable. The resource name of the message that is pinned.
+     * Format: `spaces/{space}/messages/{message}`
+     * 
+ * + * + * string message = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The message to set. + * @return This builder for chaining. + */ + public Builder setMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Immutable. The resource name of the message that is pinned.
+     * Format: `spaces/{space}/messages/{message}`
+     * 
+ * + * + * string message = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearMessage() { + message_ = getDefaultInstance().getMessage(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Immutable. The resource name of the message that is pinned.
+     * Format: `spaces/{space}/messages/{message}`
+     * 
+ * + * + * string message = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for message to set. + * @return This builder for chaining. + */ + public Builder setMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + message_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.chat.v1.MessagePin) + } + + // @@protoc_insertion_point(class_scope:google.chat.v1.MessagePin) + private static final com.google.chat.v1.MessagePin DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.chat.v1.MessagePin(); + } + + public static com.google.chat.v1.MessagePin getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MessagePin parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.chat.v1.MessagePin getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/MessagePinName.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/MessagePinName.java new file mode 100644 index 000000000000..7bcffc768af5 --- /dev/null +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/MessagePinName.java @@ -0,0 +1,195 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.chat.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; +import org.jspecify.annotations.NullMarked; +import org.jspecify.annotations.Nullable; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@NullMarked +@Generated("by gapic-generator-java") +public class MessagePinName implements ResourceName { + private static final PathTemplate SPACE_MESSAGE_PIN = + PathTemplate.createWithoutUrlEncoding("spaces/{space}/messagePins/{message_pin}"); + private volatile Map fieldValuesMap; + private final String space; + private final String messagePin; + + @Deprecated + protected MessagePinName() { + space = null; + messagePin = null; + } + + private MessagePinName(Builder builder) { + space = Preconditions.checkNotNull(builder.getSpace()); + messagePin = Preconditions.checkNotNull(builder.getMessagePin()); + } + + public String getSpace() { + return space; + } + + public String getMessagePin() { + return messagePin; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static MessagePinName of(String space, String messagePin) { + return newBuilder().setSpace(space).setMessagePin(messagePin).build(); + } + + public static String format(String space, String messagePin) { + return newBuilder().setSpace(space).setMessagePin(messagePin).build().toString(); + } + + public static @Nullable MessagePinName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + SPACE_MESSAGE_PIN.validatedMatch( + formattedString, "MessagePinName.parse: formattedString not in valid format"); + return of(matchMap.get("space"), matchMap.get("message_pin")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List<@Nullable MessagePinName> values) { + List list = new ArrayList<>(values.size()); + for (MessagePinName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return SPACE_MESSAGE_PIN.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (space != null) { + fieldMapBuilder.put("space", space); + } + if (messagePin != null) { + fieldMapBuilder.put("message_pin", messagePin); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return SPACE_MESSAGE_PIN.instantiate("space", space, "message_pin", messagePin); + } + + @Override + public boolean equals(@Nullable Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + MessagePinName that = ((MessagePinName) o); + return Objects.equals(this.space, that.space) + && Objects.equals(this.messagePin, that.messagePin); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(space); + h *= 1000003; + h ^= Objects.hashCode(messagePin); + return h; + } + + /** Builder for spaces/{space}/messagePins/{message_pin}. */ + public static class Builder { + private String space; + private String messagePin; + + protected Builder() {} + + public String getSpace() { + return space; + } + + public String getMessagePin() { + return messagePin; + } + + public Builder setSpace(String space) { + this.space = space; + return this; + } + + public Builder setMessagePin(String messagePin) { + this.messagePin = messagePin; + return this; + } + + private Builder(MessagePinName messagePinName) { + this.space = messagePinName.space; + this.messagePin = messagePinName.messagePin; + } + + public MessagePinName build() { + return new MessagePinName(this); + } + } +} diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/MessagePinOrBuilder.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/MessagePinOrBuilder.java new file mode 100644 index 000000000000..bb68b8eb1af2 --- /dev/null +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/MessagePinOrBuilder.java @@ -0,0 +1,96 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/chat/v1/message_pin.proto +// Protobuf Java Version: 4.33.6 + +package com.google.chat.v1; + +@com.google.protobuf.Generated +public interface MessagePinOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.chat.v1.MessagePin) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Identifier. The resource name of the message pin.
+   * Format: `spaces/{space}/messagePins/{message_pin}`
+   * The resource ID component matches the resource ID component of the
+   * message. For example, a message with `spaces/AAA/messages/bbb.ccc`
+   * corresponds to the message pin with the resource name
+   * `spaces/AAA/messagePins/bbb.ccc`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Identifier. The resource name of the message pin.
+   * Format: `spaces/{space}/messagePins/{message_pin}`
+   * The resource ID component matches the resource ID component of the
+   * message. For example, a message with `spaces/AAA/messages/bbb.ccc`
+   * corresponds to the message pin with the resource name
+   * `spaces/AAA/messagePins/bbb.ccc`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. Immutable. The resource name of the message that is pinned.
+   * Format: `spaces/{space}/messages/{message}`
+   * 
+ * + * + * string message = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The message. + */ + java.lang.String getMessage(); + + /** + * + * + *
+   * Required. Immutable. The resource name of the message that is pinned.
+   * Format: `spaces/{space}/messages/{message}`
+   * 
+ * + * + * string message = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for message. + */ + com.google.protobuf.ByteString getMessageBytes(); +} diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/MessagePinProto.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/MessagePinProto.java new file mode 100644 index 000000000000..c76b1d8f4725 --- /dev/null +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/MessagePinProto.java @@ -0,0 +1,161 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/chat/v1/message_pin.proto +// Protobuf Java Version: 4.33.6 + +package com.google.chat.v1; + +@com.google.protobuf.Generated +public final class MessagePinProto extends com.google.protobuf.GeneratedFile { + private MessagePinProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "MessagePinProto"); + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_chat_v1_MessagePin_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_chat_v1_MessagePin_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_chat_v1_ListMessagePinsRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_chat_v1_ListMessagePinsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_chat_v1_ListMessagePinsResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_chat_v1_ListMessagePinsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_chat_v1_CreateMessagePinRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_chat_v1_CreateMessagePinRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_chat_v1_DeleteMessagePinRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_chat_v1_DeleteMessagePinRequest_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n" + + " google/chat/v1/message_pin.proto\022\016goog" + + "le.chat.v1\032\037google/api/field_behavior.proto\032\031google/api/resource.proto\"\300\001\n\n" + + "MessagePin\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\010\0227\n" + + "\007message\030\002 \001(\tB&\340A\005\340A\002\372A\035\n" + + "\033chat.googleapis.com/Message:f\352Ac\n" + + "\036chat.googleapis.com/MessagePin\022(" + + "spaces/{space}/messagePins/{message_pin}*\013messagePins2\n" + + "messagePin\"\201\001\n" + + "\026ListMessagePinsRequest\0226\n" + + "\006parent\030\001 \001(\tB&\340A\002\372A" + + " \022\036chat.googleapis.com/MessagePin\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\"d\n" + + "\027ListMessagePinsResponse\0220\n" + + "\014message_pins\030\001 \003(\0132\032.google.chat.v1.MessagePin\022\027\n" + + "\017next_page_token\030\002 \001(\t\"\202\001\n" + + "\027CreateMessagePinRequest\0221\n" + + "\006parent\030\001 \001(\tB!\340A\002\372A\033\n" + + "\031chat.googleapis.com/Space\0224\n" + + "\013message_pin\030\002 \001(\0132\032.google.chat.v1.MessagePinB\003\340A\002\"O\n" + + "\027DeleteMessagePinRequest\0224\n" + + "\004name\030\001 \001(\tB&\340A\002\372A \n" + + "\036chat.googleapis.com/MessagePinB\250\001\n" + + "\022com.google.chat.v1B\017MessagePinProtoP\001Z,clo" + + "ud.google.com/go/chat/apiv1/chatpb;chatp" + + "b\242\002\013DYNAPIProto\252\002\023Google.Apps.Chat.V1\312\002\023" + + "Google\\Apps\\Chat\\V1\352\002\026Google::Apps::Chat::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + }); + internal_static_google_chat_v1_MessagePin_descriptor = getDescriptor().getMessageType(0); + internal_static_google_chat_v1_MessagePin_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_chat_v1_MessagePin_descriptor, + new java.lang.String[] { + "Name", "Message", + }); + internal_static_google_chat_v1_ListMessagePinsRequest_descriptor = + getDescriptor().getMessageType(1); + internal_static_google_chat_v1_ListMessagePinsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_chat_v1_ListMessagePinsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_chat_v1_ListMessagePinsResponse_descriptor = + getDescriptor().getMessageType(2); + internal_static_google_chat_v1_ListMessagePinsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_chat_v1_ListMessagePinsResponse_descriptor, + new java.lang.String[] { + "MessagePins", "NextPageToken", + }); + internal_static_google_chat_v1_CreateMessagePinRequest_descriptor = + getDescriptor().getMessageType(3); + internal_static_google_chat_v1_CreateMessagePinRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_chat_v1_CreateMessagePinRequest_descriptor, + new java.lang.String[] { + "Parent", "MessagePin", + }); + internal_static_google_chat_v1_DeleteMessagePinRequest_descriptor = + getDescriptor().getMessageType(4); + internal_static_google_chat_v1_DeleteMessagePinRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_chat_v1_DeleteMessagePinRequest_descriptor, + new java.lang.String[] { + "Name", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/MessageProto.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/MessageProto.java index 7a555b118e82..5f6cff6c4a10 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/MessageProto.java +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/MessageProto.java @@ -228,24 +228,25 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\021ForwardedMetadata\0220\n" + "\005space\030\001 \001(\tB!\340A\003\372A\033\n" + "\031chat.googleapis.com/Space\022\037\n" - + "\022space_display_name\030\002 \001(\tB\003\340A\003\"v\n" + + "\022space_display_name\030\002 \001(\tB\003\340A\003\"\207\001\n" + "\006Thread\022\021\n" + "\004name\030\001 \001(\tB\003\340A\010\022\027\n\n" - + "thread_key\030\003 \001(\tB\003\340A\001:@\352A=\n" - + "\032chat.googleapis.com/Thread\022\037spaces/{space}/threads/{thread}\"\322\004\n" + + "thread_key\030\003 \001(\tB\003\340A\001:Q\352AN\n" + + "\032chat.googleap" + + "is.com/Thread\022\037spaces/{space}/threads/{thread}*\007threads2\006thread\"\322\004\n" + "\016ActionResponse\022>\n" - + "\004type\030\001 \001(\0162+" - + ".google.chat.v1.ActionResponse.ResponseTypeB\003\340A\004\022\020\n" + + "\004type\030\001" + + " \001(\0162+.google.chat.v1.ActionResponse.ResponseTypeB\003\340A\004\022\020\n" + "\003url\030\002 \001(\tB\003\340A\004\0228\n\r" + "dialog_action\030\003 \001(\0132\034.google.chat.v1.DialogActionB\003\340A\004\022I\n" - + "\016updated_widget\030\004 \001(\0132,.google.ch" - + "at.v1.ActionResponse.UpdatedWidgetB\003\340A\004\032R\n" + + "\016updated_widget\030\004" + + " \001(\0132,.google.chat.v1.ActionResponse.UpdatedWidgetB\003\340A\004\032R\n" + "\016SelectionItems\022@\n" - + "\005items\030\001 \003(\01321.googl" - + "e.apps.card.v1.SelectionInput.SelectionItem\032w\n\r" + + "\005items\030\001" + + " \003(\01321.google.apps.card.v1.SelectionInput.SelectionItem\032w\n\r" + "UpdatedWidget\022D\n" - + "\013suggestions\030\001 \001(" - + "\0132-.google.chat.v1.ActionResponse.SelectionItemsH\000\022\016\n" + + "\013suggestions\030\001" + + " \001(\0132-.google.chat.v1.ActionResponse.SelectionItemsH\000\022\016\n" + "\006widget\030\002 \001(\tB\020\n" + "\016updated_widget\"\233\001\n" + "\014ResponseType\022\024\n" @@ -276,10 +277,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\006parent\030\001 \001(" + "\tB#\340A\002\372A\035\022\033chat.googleapis.com/Message\022-\n" + "\007message\030\004 \001(\0132\027.google.chat.v1.MessageB\003\340A\002\022\031\n\n" - + "thread_key\030\006 \001(\tB\005\030\001\340A\001\022\027\n\n" + + "thread_key\030\006 \001(\tB\005\030\001\340A\001\022\027\n" + + "\n" + "request_id\030\007 \001(\tB\003\340A\001\022Z\n" - + "\024message_reply_option\030\010 \001(\01627.goo" - + "gle.chat.v1.CreateMessageRequest.MessageReplyOptionB\003\340A\001\022\027\n\n" + + "\024message_reply_option\030\010" + + " \001(\01627.google.chat.v1.CreateMessageRequest.MessageReplyOptionB\003\340A\001\022\027\n\n" + "message_id\030\t \001(\tB\003\340A\001\022b\n" + "#create_message_notification_options\030\n" + " \001(\01320.google.chat.v1.CreateMessageNotificationOptionsB\003\340A\001\"\177\n" @@ -288,8 +290,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "$REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD\020\001\022\031\n" + "\025REPLY_MESSAGE_OR_FAIL\020\002\"\362\001\n" + " CreateMessageNotificationOptions\022\\\n" - + "\021notification_type\030\001 \001(\0162A.google.chat.v1.CreateMe" - + "ssageNotificationOptions.NotificationType\"p\n" + + "\021notification_type\030\001 \001(\0162A.googl" + + "e.chat.v1.CreateMessageNotificationOptions.NotificationType\"p\n" + "\020NotificationType\022\032\n" + "\026NOTIFICATION_TYPE_NONE\020\000\022\"\n" + "\036NOTIFICATION_TYPE_FORCE_NOTIFY\020\002\022\034\n" @@ -323,8 +325,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "page_token\030\004 \001(\tB\003\340A\001\022\025\n" + "\010order_by\030\005 \001(\tB\003\340A\001\0228\n\r" + "markup_syntax\030\006 \001(\0162\034.google.chat.v1.MarkupSyntaxB\003\340A\001\022K\n" - + "\004view\030\007" - + " \001(\01628.google.chat.v1.SearchMessagesRequest.SearchMessagesViewB\003\340A\001\"y\n" + + "\004view\030\007 \001(\01628.google.chat.v1." + + "SearchMessagesRequest.SearchMessagesViewB\003\340A\001\"y\n" + "\022SearchMessagesView\022$\n" + " SEARCH_MESSAGES_VIEW_UNSPECIFIED\020\000\022\036\n" + "\032SEARCH_MESSAGES_VIEW_BASIC\020\001\022\035\n" @@ -335,13 +337,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\023SearchMessageResult\022(\n" + "\007message\030\001 \001(\0132\027.google.chat.v1.Message\022\021\n" + "\004read\030\003 \001(\010H\000\210\001\001\022P\n" - + "\022space_mute_setting\030\004" - + " \001(\01624.google.chat.v1.SpaceNotificationSetting.MuteSettingB\007\n" + + "\022space_mute_setting\030\004 \001(\01624.google.chat" + + ".v1.SpaceNotificationSetting.MuteSettingB\007\n" + "\005_readB\245\001\n" - + "\022com.google.chat.v1B\014MessageProtoP\001Z,cloud.go" - + "ogle.com/go/chat/apiv1/chatpb;chatpb\242\002\013D" - + "YNAPIProto\252\002\023Google.Apps.Chat.V1\312\002\023Googl" - + "e\\Apps\\Chat\\V1\352\002\026Google::Apps::Chat::V1b\006proto3" + + "\022com.google.chat.v1B\014MessageProtoP\001Z,cloud.google.com/go/chat/apiv1" + + "/chatpb;chatpb\242\002\013DYNAPIProto\252\002\023Google.Ap" + + "ps.Chat.V1\312\002\023Google\\Apps\\Chat\\V1\352\002\026Googl" + + "e::Apps::Chat::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SearchMessagesRequest.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SearchMessagesRequest.java index c4e6c38f393b..755586db3e46 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SearchMessagesRequest.java +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SearchMessagesRequest.java @@ -356,6 +356,10 @@ public com.google.protobuf.ByteString getParentBytes() { * the top five space matches. For example, `space.display_name:Project` * searches for messages in the top five spaces that contain the word * "Project" in their display names. + * - `space.space_type`: The type of the space. Only supports `=`. For + * example, `space.space_type="DIRECT_MESSAGE"` returns only messages from + * direct messages. The possible values are `DIRECT_MESSAGE`, `GROUP_CHAT`, + * and `SPACE`. * - `attachment`: Supports the operator `:*` (has any) to check for the * presence of attachments. If `attachment:*` is specified, only messages * that have at least one attachment are returned. @@ -375,8 +379,8 @@ public com.google.protobuf.ByteString getParentBytes() { * - `is_unread()`: Filters out messages that have been read by the calling * user. * - * Using the `space.display_name` filter requires that the calling credentials - * include one of the following [authorization + * Using the `space.display_name` or the `space.space_type` filters requires + * that the calling credentials include one of the following [authorization * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): * * - `https://www.googleapis.com/auth/chat.spaces.readonly` @@ -414,6 +418,8 @@ public com.google.protobuf.ByteString getParentBytes() { * `space.display_name:Project OR space.display_name:Tasks` returns messages * that are in spaces with display names containing either `Project` or * `Tasks` or both. + * - `space.space_type` supports only the `OR` operator, for example: + * `space.space_type = "DIRECT_MESSAGE" OR space.space_type = "GROUP_CHAT"`. * - `annotations.user_mentions.user.name` supports the operators `AND` and * `OR`, but not a mix of both. For example: * `annotations.user_mentions.user.name:"users/1234567890" AND @@ -503,6 +509,10 @@ public java.lang.String getFilter() { * the top five space matches. For example, `space.display_name:Project` * searches for messages in the top five spaces that contain the word * "Project" in their display names. + * - `space.space_type`: The type of the space. Only supports `=`. For + * example, `space.space_type="DIRECT_MESSAGE"` returns only messages from + * direct messages. The possible values are `DIRECT_MESSAGE`, `GROUP_CHAT`, + * and `SPACE`. * - `attachment`: Supports the operator `:*` (has any) to check for the * presence of attachments. If `attachment:*` is specified, only messages * that have at least one attachment are returned. @@ -522,8 +532,8 @@ public java.lang.String getFilter() { * - `is_unread()`: Filters out messages that have been read by the calling * user. * - * Using the `space.display_name` filter requires that the calling credentials - * include one of the following [authorization + * Using the `space.display_name` or the `space.space_type` filters requires + * that the calling credentials include one of the following [authorization * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): * * - `https://www.googleapis.com/auth/chat.spaces.readonly` @@ -561,6 +571,8 @@ public java.lang.String getFilter() { * `space.display_name:Project OR space.display_name:Tasks` returns messages * that are in spaces with display names containing either `Project` or * `Tasks` or both. + * - `space.space_type` supports only the `OR` operator, for example: + * `space.space_type = "DIRECT_MESSAGE" OR space.space_type = "GROUP_CHAT"`. * - `annotations.user_mentions.user.name` supports the operators `AND` and * `OR`, but not a mix of both. For example: * `annotations.user_mentions.user.name:"users/1234567890" AND @@ -1509,6 +1521,10 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * the top five space matches. For example, `space.display_name:Project` * searches for messages in the top five spaces that contain the word * "Project" in their display names. + * - `space.space_type`: The type of the space. Only supports `=`. For + * example, `space.space_type="DIRECT_MESSAGE"` returns only messages from + * direct messages. The possible values are `DIRECT_MESSAGE`, `GROUP_CHAT`, + * and `SPACE`. * - `attachment`: Supports the operator `:*` (has any) to check for the * presence of attachments. If `attachment:*` is specified, only messages * that have at least one attachment are returned. @@ -1528,8 +1544,8 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * - `is_unread()`: Filters out messages that have been read by the calling * user. * - * Using the `space.display_name` filter requires that the calling credentials - * include one of the following [authorization + * Using the `space.display_name` or the `space.space_type` filters requires + * that the calling credentials include one of the following [authorization * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): * * - `https://www.googleapis.com/auth/chat.spaces.readonly` @@ -1567,6 +1583,8 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * `space.display_name:Project OR space.display_name:Tasks` returns messages * that are in spaces with display names containing either `Project` or * `Tasks` or both. + * - `space.space_type` supports only the `OR` operator, for example: + * `space.space_type = "DIRECT_MESSAGE" OR space.space_type = "GROUP_CHAT"`. * - `annotations.user_mentions.user.name` supports the operators `AND` and * `OR`, but not a mix of both. For example: * `annotations.user_mentions.user.name:"users/1234567890" AND @@ -1655,6 +1673,10 @@ public java.lang.String getFilter() { * the top five space matches. For example, `space.display_name:Project` * searches for messages in the top five spaces that contain the word * "Project" in their display names. + * - `space.space_type`: The type of the space. Only supports `=`. For + * example, `space.space_type="DIRECT_MESSAGE"` returns only messages from + * direct messages. The possible values are `DIRECT_MESSAGE`, `GROUP_CHAT`, + * and `SPACE`. * - `attachment`: Supports the operator `:*` (has any) to check for the * presence of attachments. If `attachment:*` is specified, only messages * that have at least one attachment are returned. @@ -1674,8 +1696,8 @@ public java.lang.String getFilter() { * - `is_unread()`: Filters out messages that have been read by the calling * user. * - * Using the `space.display_name` filter requires that the calling credentials - * include one of the following [authorization + * Using the `space.display_name` or the `space.space_type` filters requires + * that the calling credentials include one of the following [authorization * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): * * - `https://www.googleapis.com/auth/chat.spaces.readonly` @@ -1713,6 +1735,8 @@ public java.lang.String getFilter() { * `space.display_name:Project OR space.display_name:Tasks` returns messages * that are in spaces with display names containing either `Project` or * `Tasks` or both. + * - `space.space_type` supports only the `OR` operator, for example: + * `space.space_type = "DIRECT_MESSAGE" OR space.space_type = "GROUP_CHAT"`. * - `annotations.user_mentions.user.name` supports the operators `AND` and * `OR`, but not a mix of both. For example: * `annotations.user_mentions.user.name:"users/1234567890" AND @@ -1801,6 +1825,10 @@ public com.google.protobuf.ByteString getFilterBytes() { * the top five space matches. For example, `space.display_name:Project` * searches for messages in the top five spaces that contain the word * "Project" in their display names. + * - `space.space_type`: The type of the space. Only supports `=`. For + * example, `space.space_type="DIRECT_MESSAGE"` returns only messages from + * direct messages. The possible values are `DIRECT_MESSAGE`, `GROUP_CHAT`, + * and `SPACE`. * - `attachment`: Supports the operator `:*` (has any) to check for the * presence of attachments. If `attachment:*` is specified, only messages * that have at least one attachment are returned. @@ -1820,8 +1848,8 @@ public com.google.protobuf.ByteString getFilterBytes() { * - `is_unread()`: Filters out messages that have been read by the calling * user. * - * Using the `space.display_name` filter requires that the calling credentials - * include one of the following [authorization + * Using the `space.display_name` or the `space.space_type` filters requires + * that the calling credentials include one of the following [authorization * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): * * - `https://www.googleapis.com/auth/chat.spaces.readonly` @@ -1859,6 +1887,8 @@ public com.google.protobuf.ByteString getFilterBytes() { * `space.display_name:Project OR space.display_name:Tasks` returns messages * that are in spaces with display names containing either `Project` or * `Tasks` or both. + * - `space.space_type` supports only the `OR` operator, for example: + * `space.space_type = "DIRECT_MESSAGE" OR space.space_type = "GROUP_CHAT"`. * - `annotations.user_mentions.user.name` supports the operators `AND` and * `OR`, but not a mix of both. For example: * `annotations.user_mentions.user.name:"users/1234567890" AND @@ -1946,6 +1976,10 @@ public Builder setFilter(java.lang.String value) { * the top five space matches. For example, `space.display_name:Project` * searches for messages in the top five spaces that contain the word * "Project" in their display names. + * - `space.space_type`: The type of the space. Only supports `=`. For + * example, `space.space_type="DIRECT_MESSAGE"` returns only messages from + * direct messages. The possible values are `DIRECT_MESSAGE`, `GROUP_CHAT`, + * and `SPACE`. * - `attachment`: Supports the operator `:*` (has any) to check for the * presence of attachments. If `attachment:*` is specified, only messages * that have at least one attachment are returned. @@ -1965,8 +1999,8 @@ public Builder setFilter(java.lang.String value) { * - `is_unread()`: Filters out messages that have been read by the calling * user. * - * Using the `space.display_name` filter requires that the calling credentials - * include one of the following [authorization + * Using the `space.display_name` or the `space.space_type` filters requires + * that the calling credentials include one of the following [authorization * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): * * - `https://www.googleapis.com/auth/chat.spaces.readonly` @@ -2004,6 +2038,8 @@ public Builder setFilter(java.lang.String value) { * `space.display_name:Project OR space.display_name:Tasks` returns messages * that are in spaces with display names containing either `Project` or * `Tasks` or both. + * - `space.space_type` supports only the `OR` operator, for example: + * `space.space_type = "DIRECT_MESSAGE" OR space.space_type = "GROUP_CHAT"`. * - `annotations.user_mentions.user.name` supports the operators `AND` and * `OR`, but not a mix of both. For example: * `annotations.user_mentions.user.name:"users/1234567890" AND @@ -2087,6 +2123,10 @@ public Builder clearFilter() { * the top five space matches. For example, `space.display_name:Project` * searches for messages in the top five spaces that contain the word * "Project" in their display names. + * - `space.space_type`: The type of the space. Only supports `=`. For + * example, `space.space_type="DIRECT_MESSAGE"` returns only messages from + * direct messages. The possible values are `DIRECT_MESSAGE`, `GROUP_CHAT`, + * and `SPACE`. * - `attachment`: Supports the operator `:*` (has any) to check for the * presence of attachments. If `attachment:*` is specified, only messages * that have at least one attachment are returned. @@ -2106,8 +2146,8 @@ public Builder clearFilter() { * - `is_unread()`: Filters out messages that have been read by the calling * user. * - * Using the `space.display_name` filter requires that the calling credentials - * include one of the following [authorization + * Using the `space.display_name` or the `space.space_type` filters requires + * that the calling credentials include one of the following [authorization * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): * * - `https://www.googleapis.com/auth/chat.spaces.readonly` @@ -2145,6 +2185,8 @@ public Builder clearFilter() { * `space.display_name:Project OR space.display_name:Tasks` returns messages * that are in spaces with display names containing either `Project` or * `Tasks` or both. + * - `space.space_type` supports only the `OR` operator, for example: + * `space.space_type = "DIRECT_MESSAGE" OR space.space_type = "GROUP_CHAT"`. * - `annotations.user_mentions.user.name` supports the operators `AND` and * `OR`, but not a mix of both. For example: * `annotations.user_mentions.user.name:"users/1234567890" AND diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SearchMessagesRequestOrBuilder.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SearchMessagesRequestOrBuilder.java index 99dd999b5a46..e2f39c2bd2a4 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SearchMessagesRequestOrBuilder.java +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SearchMessagesRequestOrBuilder.java @@ -97,6 +97,10 @@ public interface SearchMessagesRequestOrBuilder * the top five space matches. For example, `space.display_name:Project` * searches for messages in the top five spaces that contain the word * "Project" in their display names. + * - `space.space_type`: The type of the space. Only supports `=`. For + * example, `space.space_type="DIRECT_MESSAGE"` returns only messages from + * direct messages. The possible values are `DIRECT_MESSAGE`, `GROUP_CHAT`, + * and `SPACE`. * - `attachment`: Supports the operator `:*` (has any) to check for the * presence of attachments. If `attachment:*` is specified, only messages * that have at least one attachment are returned. @@ -116,8 +120,8 @@ public interface SearchMessagesRequestOrBuilder * - `is_unread()`: Filters out messages that have been read by the calling * user. * - * Using the `space.display_name` filter requires that the calling credentials - * include one of the following [authorization + * Using the `space.display_name` or the `space.space_type` filters requires + * that the calling credentials include one of the following [authorization * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): * * - `https://www.googleapis.com/auth/chat.spaces.readonly` @@ -155,6 +159,8 @@ public interface SearchMessagesRequestOrBuilder * `space.display_name:Project OR space.display_name:Tasks` returns messages * that are in spaces with display names containing either `Project` or * `Tasks` or both. + * - `space.space_type` supports only the `OR` operator, for example: + * `space.space_type = "DIRECT_MESSAGE" OR space.space_type = "GROUP_CHAT"`. * - `annotations.user_mentions.user.name` supports the operators `AND` and * `OR`, but not a mix of both. For example: * `annotations.user_mentions.user.name:"users/1234567890" AND @@ -233,6 +239,10 @@ public interface SearchMessagesRequestOrBuilder * the top five space matches. For example, `space.display_name:Project` * searches for messages in the top five spaces that contain the word * "Project" in their display names. + * - `space.space_type`: The type of the space. Only supports `=`. For + * example, `space.space_type="DIRECT_MESSAGE"` returns only messages from + * direct messages. The possible values are `DIRECT_MESSAGE`, `GROUP_CHAT`, + * and `SPACE`. * - `attachment`: Supports the operator `:*` (has any) to check for the * presence of attachments. If `attachment:*` is specified, only messages * that have at least one attachment are returned. @@ -252,8 +262,8 @@ public interface SearchMessagesRequestOrBuilder * - `is_unread()`: Filters out messages that have been read by the calling * user. * - * Using the `space.display_name` filter requires that the calling credentials - * include one of the following [authorization + * Using the `space.display_name` or the `space.space_type` filters requires + * that the calling credentials include one of the following [authorization * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): * * - `https://www.googleapis.com/auth/chat.spaces.readonly` @@ -291,6 +301,8 @@ public interface SearchMessagesRequestOrBuilder * `space.display_name:Project OR space.display_name:Tasks` returns messages * that are in spaces with display names containing either `Project` or * `Tasks` or both. + * - `space.space_type` supports only the `OR` operator, for example: + * `space.space_type = "DIRECT_MESSAGE" OR space.space_type = "GROUP_CHAT"`. * - `annotations.user_mentions.user.name` supports the operators `AND` and * `OR`, but not a mix of both. For example: * `annotations.user_mentions.user.name:"users/1234567890" AND diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SearchSpacesRequest.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SearchSpacesRequest.java index 61d7b5002f13..0e62ab11694c 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SearchSpacesRequest.java +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SearchSpacesRequest.java @@ -112,8 +112,9 @@ public boolean getUseAdminAccess() { * * If unspecified, at most 100 spaces are returned. * - * The maximum value is 1000. If you use a value more than 1000, it's - * automatically changed to 1000. + * The maximum value is 1000 when `useAdminAccess` is set to `true`. + * Otherwise, the maximum value is 100. If you use a value more than the + * maximum value, it's automatically changed to the maximum value. *
* * int32 page_size = 2; @@ -291,6 +292,11 @@ public com.google.protobuf.ByteString getPageTokenBytes() { * (external_user_allowed = "true" AND display_name:"Hello" AND space_type = * "SPACE") * ``` + * + * The maximum query length is 1,000 characters. + * + * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` + * error. *
* * string query = 4 [(.google.api.field_behavior) = REQUIRED]; @@ -408,6 +414,11 @@ public java.lang.String getQuery() { * (external_user_allowed = "true" AND display_name:"Hello" AND space_type = * "SPACE") * ``` + * + * The maximum query length is 1,000 characters. + * + * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` + * error. * * * string query = 4 [(.google.api.field_behavior) = REQUIRED]; @@ -1040,8 +1051,9 @@ public Builder clearUseAdminAccess() { * * If unspecified, at most 100 spaces are returned. * - * The maximum value is 1000. If you use a value more than 1000, it's - * automatically changed to 1000. + * The maximum value is 1000 when `useAdminAccess` is set to `true`. + * Otherwise, the maximum value is 100. If you use a value more than the + * maximum value, it's automatically changed to the maximum value. * * * int32 page_size = 2; @@ -1062,8 +1074,9 @@ public int getPageSize() { * * If unspecified, at most 100 spaces are returned. * - * The maximum value is 1000. If you use a value more than 1000, it's - * automatically changed to 1000. + * The maximum value is 1000 when `useAdminAccess` is set to `true`. + * Otherwise, the maximum value is 100. If you use a value more than the + * maximum value, it's automatically changed to the maximum value. * * * int32 page_size = 2; @@ -1088,8 +1101,9 @@ public Builder setPageSize(int value) { * * If unspecified, at most 100 spaces are returned. * - * The maximum value is 1000. If you use a value more than 1000, it's - * automatically changed to 1000. + * The maximum value is 1000 when `useAdminAccess` is set to `true`. + * Otherwise, the maximum value is 100. If you use a value more than the + * maximum value, it's automatically changed to the maximum value. * * * int32 page_size = 2; @@ -1339,6 +1353,11 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { * (external_user_allowed = "true" AND display_name:"Hello" AND space_type = * "SPACE") * ``` + * + * The maximum query length is 1,000 characters. + * + * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` + * error. * * * string query = 4 [(.google.api.field_behavior) = REQUIRED]; @@ -1455,6 +1474,11 @@ public java.lang.String getQuery() { * (external_user_allowed = "true" AND display_name:"Hello" AND space_type = * "SPACE") * ``` + * + * The maximum query length is 1,000 characters. + * + * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` + * error. * * * string query = 4 [(.google.api.field_behavior) = REQUIRED]; @@ -1571,6 +1595,11 @@ public com.google.protobuf.ByteString getQueryBytes() { * (external_user_allowed = "true" AND display_name:"Hello" AND space_type = * "SPACE") * ``` + * + * The maximum query length is 1,000 characters. + * + * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` + * error. * * * string query = 4 [(.google.api.field_behavior) = REQUIRED]; @@ -1686,6 +1715,11 @@ public Builder setQuery(java.lang.String value) { * (external_user_allowed = "true" AND display_name:"Hello" AND space_type = * "SPACE") * ``` + * + * The maximum query length is 1,000 characters. + * + * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` + * error. * * * string query = 4 [(.google.api.field_behavior) = REQUIRED]; @@ -1797,6 +1831,11 @@ public Builder clearQuery() { * (external_user_allowed = "true" AND display_name:"Hello" AND space_type = * "SPACE") * ``` + * + * The maximum query length is 1,000 characters. + * + * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` + * error. * * * string query = 4 [(.google.api.field_behavior) = REQUIRED]; diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SearchSpacesRequestOrBuilder.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SearchSpacesRequestOrBuilder.java index ecbf9d79a93a..d88f35209de7 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SearchSpacesRequestOrBuilder.java +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SearchSpacesRequestOrBuilder.java @@ -57,8 +57,9 @@ public interface SearchSpacesRequestOrBuilder * * If unspecified, at most 100 spaces are returned. * - * The maximum value is 1000. If you use a value more than 1000, it's - * automatically changed to 1000. + * The maximum value is 1000 when `useAdminAccess` is set to `true`. + * Otherwise, the maximum value is 100. If you use a value more than the + * maximum value, it's automatically changed to the maximum value. * * * int32 page_size = 2; @@ -201,6 +202,11 @@ public interface SearchSpacesRequestOrBuilder * (external_user_allowed = "true" AND display_name:"Hello" AND space_type = * "SPACE") * ``` + * + * The maximum query length is 1,000 characters. + * + * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` + * error. * * * string query = 4 [(.google.api.field_behavior) = REQUIRED]; @@ -307,6 +313,11 @@ public interface SearchSpacesRequestOrBuilder * (external_user_allowed = "true" AND display_name:"Hello" AND space_type = * "SPACE") * ``` + * + * The maximum query length is 1,000 characters. + * + * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` + * error. * * * string query = 4 [(.google.api.field_behavior) = REQUIRED]; diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SearchSpacesResponse.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SearchSpacesResponse.java index b65d1b1ce107..7a68c2973c9c 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SearchSpacesResponse.java +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SearchSpacesResponse.java @@ -889,6 +889,8 @@ public com.google.chat.v1.SpaceOrBuilder getSpacesOrBuilder(int index) { *
    * A token that can be used to retrieve the next page. If this field is empty,
    * there are no subsequent pages.
+   *
+   * Only populated when `useAdminAccess` is set to `true`.
    * 
* * string next_page_token = 2; @@ -914,6 +916,8 @@ public java.lang.String getNextPageToken() { *
    * A token that can be used to retrieve the next page. If this field is empty,
    * there are no subsequent pages.
+   *
+   * Only populated when `useAdminAccess` is set to `true`.
    * 
* * string next_page_token = 2; @@ -942,6 +946,8 @@ public com.google.protobuf.ByteString getNextPageTokenBytes() { *
    * The total number of spaces that match the query, across all pages. If the
    * result is over 10,000 spaces, this value is an estimate.
+   *
+   * Only populated when `useAdminAccess` is set to `true`.
    * 
* * int32 total_size = 3; @@ -1950,6 +1956,8 @@ public java.util.List getSpacesBuilderList() { *
      * A token that can be used to retrieve the next page. If this field is empty,
      * there are no subsequent pages.
+     *
+     * Only populated when `useAdminAccess` is set to `true`.
      * 
* * string next_page_token = 2; @@ -1974,6 +1982,8 @@ public java.lang.String getNextPageToken() { *
      * A token that can be used to retrieve the next page. If this field is empty,
      * there are no subsequent pages.
+     *
+     * Only populated when `useAdminAccess` is set to `true`.
      * 
* * string next_page_token = 2; @@ -1998,6 +2008,8 @@ public com.google.protobuf.ByteString getNextPageTokenBytes() { *
      * A token that can be used to retrieve the next page. If this field is empty,
      * there are no subsequent pages.
+     *
+     * Only populated when `useAdminAccess` is set to `true`.
      * 
* * string next_page_token = 2; @@ -2021,6 +2033,8 @@ public Builder setNextPageToken(java.lang.String value) { *
      * A token that can be used to retrieve the next page. If this field is empty,
      * there are no subsequent pages.
+     *
+     * Only populated when `useAdminAccess` is set to `true`.
      * 
* * string next_page_token = 2; @@ -2040,6 +2054,8 @@ public Builder clearNextPageToken() { *
      * A token that can be used to retrieve the next page. If this field is empty,
      * there are no subsequent pages.
+     *
+     * Only populated when `useAdminAccess` is set to `true`.
      * 
* * string next_page_token = 2; @@ -2066,6 +2082,8 @@ public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { *
      * The total number of spaces that match the query, across all pages. If the
      * result is over 10,000 spaces, this value is an estimate.
+     *
+     * Only populated when `useAdminAccess` is set to `true`.
      * 
* * int32 total_size = 3; @@ -2083,6 +2101,8 @@ public int getTotalSize() { *
      * The total number of spaces that match the query, across all pages. If the
      * result is over 10,000 spaces, this value is an estimate.
+     *
+     * Only populated when `useAdminAccess` is set to `true`.
      * 
* * int32 total_size = 3; @@ -2104,6 +2124,8 @@ public Builder setTotalSize(int value) { *
      * The total number of spaces that match the query, across all pages. If the
      * result is over 10,000 spaces, this value is an estimate.
+     *
+     * Only populated when `useAdminAccess` is set to `true`.
      * 
* * int32 total_size = 3; diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SearchSpacesResponseOrBuilder.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SearchSpacesResponseOrBuilder.java index 7adc69628619..64c60bf813c8 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SearchSpacesResponseOrBuilder.java +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SearchSpacesResponseOrBuilder.java @@ -107,6 +107,8 @@ public interface SearchSpacesResponseOrBuilder *
    * A token that can be used to retrieve the next page. If this field is empty,
    * there are no subsequent pages.
+   *
+   * Only populated when `useAdminAccess` is set to `true`.
    * 
* * string next_page_token = 2; @@ -121,6 +123,8 @@ public interface SearchSpacesResponseOrBuilder *
    * A token that can be used to retrieve the next page. If this field is empty,
    * there are no subsequent pages.
+   *
+   * Only populated when `useAdminAccess` is set to `true`.
    * 
* * string next_page_token = 2; @@ -135,6 +139,8 @@ public interface SearchSpacesResponseOrBuilder *
    * The total number of spaces that match the query, across all pages. If the
    * result is over 10,000 spaces, this value is an estimate.
+   *
+   * Only populated when `useAdminAccess` is set to `true`.
    * 
* * int32 total_size = 3; diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SetUpSpaceRequest.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SetUpSpaceRequest.java index 37930e044634..4ab1f917634b 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SetUpSpaceRequest.java +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SetUpSpaceRequest.java @@ -196,12 +196,24 @@ public com.google.chat.v1.SpaceOrBuilder getSpaceOrBuilder() { * * *
-   * Optional. A unique identifier for this request.
-   * A random UUID is recommended.
-   * Specifying an existing request ID returns the space created with that ID
-   * instead of creating a new space.
-   * Specifying an existing request ID from the same Chat app with a different
-   * authenticated user returns an error.
+   * Optional. A unique ID for this request. A random UUID is recommended.
+   * Specifying a request ID makes the request idempotent, which ensures that
+   * multiple identical requests with the same request ID result in only a
+   * single space being created. Subsequent requests with the same request ID
+   * return the existing space and do not update the space, even if the
+   * requested details differ from the current state.
+   *
+   * To use this field effectively:
+   *
+   * - Ensure that subsequent requests are identical and use the same
+   * authentication credentials as the original request.
+   * - If a space was already created with the provided request ID, the request
+   * returns that space. Note that the returned space might not be fully
+   * populated; the API echoes the space in your request with the
+   * system-assigned resource name populated. To retrieve the latest metadata
+   * for the space, call `GetSpace`.
+   * - Reusing an existing request ID with a different authenticated user
+   * results in an error.
    * 
* * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -225,12 +237,24 @@ public java.lang.String getRequestId() { * * *
-   * Optional. A unique identifier for this request.
-   * A random UUID is recommended.
-   * Specifying an existing request ID returns the space created with that ID
-   * instead of creating a new space.
-   * Specifying an existing request ID from the same Chat app with a different
-   * authenticated user returns an error.
+   * Optional. A unique ID for this request. A random UUID is recommended.
+   * Specifying a request ID makes the request idempotent, which ensures that
+   * multiple identical requests with the same request ID result in only a
+   * single space being created. Subsequent requests with the same request ID
+   * return the existing space and do not update the space, even if the
+   * requested details differ from the current state.
+   *
+   * To use this field effectively:
+   *
+   * - Ensure that subsequent requests are identical and use the same
+   * authentication credentials as the original request.
+   * - If a space was already created with the provided request ID, the request
+   * returns that space. Note that the returned space might not be fully
+   * populated; the API echoes the space in your request with the
+   * system-assigned resource name populated. To retrieve the latest metadata
+   * for the space, call `GetSpace`.
+   * - Reusing an existing request ID with a different authenticated user
+   * results in an error.
    * 
* * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1289,12 +1313,24 @@ public com.google.chat.v1.SpaceOrBuilder getSpaceOrBuilder() { * * *
-     * Optional. A unique identifier for this request.
-     * A random UUID is recommended.
-     * Specifying an existing request ID returns the space created with that ID
-     * instead of creating a new space.
-     * Specifying an existing request ID from the same Chat app with a different
-     * authenticated user returns an error.
+     * Optional. A unique ID for this request. A random UUID is recommended.
+     * Specifying a request ID makes the request idempotent, which ensures that
+     * multiple identical requests with the same request ID result in only a
+     * single space being created. Subsequent requests with the same request ID
+     * return the existing space and do not update the space, even if the
+     * requested details differ from the current state.
+     *
+     * To use this field effectively:
+     *
+     * - Ensure that subsequent requests are identical and use the same
+     * authentication credentials as the original request.
+     * - If a space was already created with the provided request ID, the request
+     * returns that space. Note that the returned space might not be fully
+     * populated; the API echoes the space in your request with the
+     * system-assigned resource name populated. To retrieve the latest metadata
+     * for the space, call `GetSpace`.
+     * - Reusing an existing request ID with a different authenticated user
+     * results in an error.
      * 
* * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1317,12 +1353,24 @@ public java.lang.String getRequestId() { * * *
-     * Optional. A unique identifier for this request.
-     * A random UUID is recommended.
-     * Specifying an existing request ID returns the space created with that ID
-     * instead of creating a new space.
-     * Specifying an existing request ID from the same Chat app with a different
-     * authenticated user returns an error.
+     * Optional. A unique ID for this request. A random UUID is recommended.
+     * Specifying a request ID makes the request idempotent, which ensures that
+     * multiple identical requests with the same request ID result in only a
+     * single space being created. Subsequent requests with the same request ID
+     * return the existing space and do not update the space, even if the
+     * requested details differ from the current state.
+     *
+     * To use this field effectively:
+     *
+     * - Ensure that subsequent requests are identical and use the same
+     * authentication credentials as the original request.
+     * - If a space was already created with the provided request ID, the request
+     * returns that space. Note that the returned space might not be fully
+     * populated; the API echoes the space in your request with the
+     * system-assigned resource name populated. To retrieve the latest metadata
+     * for the space, call `GetSpace`.
+     * - Reusing an existing request ID with a different authenticated user
+     * results in an error.
      * 
* * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1345,12 +1393,24 @@ public com.google.protobuf.ByteString getRequestIdBytes() { * * *
-     * Optional. A unique identifier for this request.
-     * A random UUID is recommended.
-     * Specifying an existing request ID returns the space created with that ID
-     * instead of creating a new space.
-     * Specifying an existing request ID from the same Chat app with a different
-     * authenticated user returns an error.
+     * Optional. A unique ID for this request. A random UUID is recommended.
+     * Specifying a request ID makes the request idempotent, which ensures that
+     * multiple identical requests with the same request ID result in only a
+     * single space being created. Subsequent requests with the same request ID
+     * return the existing space and do not update the space, even if the
+     * requested details differ from the current state.
+     *
+     * To use this field effectively:
+     *
+     * - Ensure that subsequent requests are identical and use the same
+     * authentication credentials as the original request.
+     * - If a space was already created with the provided request ID, the request
+     * returns that space. Note that the returned space might not be fully
+     * populated; the API echoes the space in your request with the
+     * system-assigned resource name populated. To retrieve the latest metadata
+     * for the space, call `GetSpace`.
+     * - Reusing an existing request ID with a different authenticated user
+     * results in an error.
      * 
* * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1372,12 +1432,24 @@ public Builder setRequestId(java.lang.String value) { * * *
-     * Optional. A unique identifier for this request.
-     * A random UUID is recommended.
-     * Specifying an existing request ID returns the space created with that ID
-     * instead of creating a new space.
-     * Specifying an existing request ID from the same Chat app with a different
-     * authenticated user returns an error.
+     * Optional. A unique ID for this request. A random UUID is recommended.
+     * Specifying a request ID makes the request idempotent, which ensures that
+     * multiple identical requests with the same request ID result in only a
+     * single space being created. Subsequent requests with the same request ID
+     * return the existing space and do not update the space, even if the
+     * requested details differ from the current state.
+     *
+     * To use this field effectively:
+     *
+     * - Ensure that subsequent requests are identical and use the same
+     * authentication credentials as the original request.
+     * - If a space was already created with the provided request ID, the request
+     * returns that space. Note that the returned space might not be fully
+     * populated; the API echoes the space in your request with the
+     * system-assigned resource name populated. To retrieve the latest metadata
+     * for the space, call `GetSpace`.
+     * - Reusing an existing request ID with a different authenticated user
+     * results in an error.
      * 
* * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1395,12 +1467,24 @@ public Builder clearRequestId() { * * *
-     * Optional. A unique identifier for this request.
-     * A random UUID is recommended.
-     * Specifying an existing request ID returns the space created with that ID
-     * instead of creating a new space.
-     * Specifying an existing request ID from the same Chat app with a different
-     * authenticated user returns an error.
+     * Optional. A unique ID for this request. A random UUID is recommended.
+     * Specifying a request ID makes the request idempotent, which ensures that
+     * multiple identical requests with the same request ID result in only a
+     * single space being created. Subsequent requests with the same request ID
+     * return the existing space and do not update the space, even if the
+     * requested details differ from the current state.
+     *
+     * To use this field effectively:
+     *
+     * - Ensure that subsequent requests are identical and use the same
+     * authentication credentials as the original request.
+     * - If a space was already created with the provided request ID, the request
+     * returns that space. Note that the returned space might not be fully
+     * populated; the API echoes the space in your request with the
+     * system-assigned resource name populated. To retrieve the latest metadata
+     * for the space, call `GetSpace`.
+     * - Reusing an existing request ID with a different authenticated user
+     * results in an error.
      * 
* * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SetUpSpaceRequestOrBuilder.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SetUpSpaceRequestOrBuilder.java index 09917ab25b1c..fdb40118ae90 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SetUpSpaceRequestOrBuilder.java +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SetUpSpaceRequestOrBuilder.java @@ -133,12 +133,24 @@ public interface SetUpSpaceRequestOrBuilder * * *
-   * Optional. A unique identifier for this request.
-   * A random UUID is recommended.
-   * Specifying an existing request ID returns the space created with that ID
-   * instead of creating a new space.
-   * Specifying an existing request ID from the same Chat app with a different
-   * authenticated user returns an error.
+   * Optional. A unique ID for this request. A random UUID is recommended.
+   * Specifying a request ID makes the request idempotent, which ensures that
+   * multiple identical requests with the same request ID result in only a
+   * single space being created. Subsequent requests with the same request ID
+   * return the existing space and do not update the space, even if the
+   * requested details differ from the current state.
+   *
+   * To use this field effectively:
+   *
+   * - Ensure that subsequent requests are identical and use the same
+   * authentication credentials as the original request.
+   * - If a space was already created with the provided request ID, the request
+   * returns that space. Note that the returned space might not be fully
+   * populated; the API echoes the space in your request with the
+   * system-assigned resource name populated. To retrieve the latest metadata
+   * for the space, call `GetSpace`.
+   * - Reusing an existing request ID with a different authenticated user
+   * results in an error.
    * 
* * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -151,12 +163,24 @@ public interface SetUpSpaceRequestOrBuilder * * *
-   * Optional. A unique identifier for this request.
-   * A random UUID is recommended.
-   * Specifying an existing request ID returns the space created with that ID
-   * instead of creating a new space.
-   * Specifying an existing request ID from the same Chat app with a different
-   * authenticated user returns an error.
+   * Optional. A unique ID for this request. A random UUID is recommended.
+   * Specifying a request ID makes the request idempotent, which ensures that
+   * multiple identical requests with the same request ID result in only a
+   * single space being created. Subsequent requests with the same request ID
+   * return the existing space and do not update the space, even if the
+   * requested details differ from the current state.
+   *
+   * To use this field effectively:
+   *
+   * - Ensure that subsequent requests are identical and use the same
+   * authentication credentials as the original request.
+   * - If a space was already created with the provided request ID, the request
+   * returns that space. Note that the returned space might not be fully
+   * populated; the API echoes the space in your request with the
+   * system-assigned resource name populated. To retrieve the latest metadata
+   * for the space, call `GetSpace`.
+   * - Reusing an existing request ID with a different authenticated user
+   * results in an error.
    * 
* * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/annotation.proto b/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/annotation.proto index 105f19dfb979..277ef349c5fb 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/annotation.proto +++ b/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/annotation.proto @@ -31,10 +31,10 @@ option objc_class_prefix = "DYNAPIProto"; option php_namespace = "Google\\Apps\\Chat\\V1"; option ruby_package = "Google::Apps::Chat::V1"; -// Output only. Annotations can be associated with the plain-text body of the -// message or with chips that link to Google Workspace resources like Google -// Docs or Sheets with `start_index` and `length` of 0. To add basic formatting -// to a text message, see [Format text +// Annotations can be associated with the plain-text body of the message or +// with chips that link to Google Workspace resources like Google Docs or Sheets +// with `start_index` and `length` of 0. To add basic formatting to a text +// message, see [Format text // messages](https://developers.google.com/workspace/chat/format-messages). // // Example plain-text message body: diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/app_command_metadata.proto b/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/app_command_metadata.proto new file mode 100644 index 000000000000..39735c9d66ac --- /dev/null +++ b/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/app_command_metadata.proto @@ -0,0 +1,53 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.chat.v1; + +option csharp_namespace = "Google.Apps.Chat.V1"; +option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb"; +option java_multiple_files = true; +option java_outer_classname = "AppCommandMetadataProto"; +option java_package = "com.google.chat.v1"; +option php_namespace = "Google\\Apps\\Chat\\V1"; +option ruby_package = "Google::Apps::Chat::V1"; + +// Metadata about a [Chat app +// command](https://developers.google.com/workspace/chat/commands). +message AppCommandMetadata { + // The type of Chat app command. For details, see [Types of Chat + // app commands](https://developers.google.com/workspace/chat/commands#types). + enum AppCommandType { + // Default value. Unspecified. + APP_COMMAND_TYPE_UNSPECIFIED = 0; + + // A slash command. The user sends the command in a Chat message. + SLASH_COMMAND = 1; + + // A quick command. The user selects the command from the Chat menu + // in the message reply area. + QUICK_COMMAND = 3; + + // A message action. The user selects the command from the message context + // menu in Chat. + MESSAGE_ACTION = 4; + } + + // The ID for the command specified in the Chat API configuration. + int32 app_command_id = 1; + + // The type of Chat app command. + AppCommandType app_command_type = 2; +} diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/chat_service.proto b/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/chat_service.proto index 455ba073ced7..68859a407be9 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/chat_service.proto +++ b/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/chat_service.proto @@ -22,6 +22,7 @@ import "google/chat/v1/attachment.proto"; import "google/chat/v1/availability.proto"; import "google/chat/v1/membership.proto"; import "google/chat/v1/message.proto"; +import "google/chat/v1/message_pin.proto"; import "google/chat/v1/reaction.proto"; import "google/chat/v1/section.proto"; import "google/chat/v1/space.proto"; @@ -77,6 +78,8 @@ service ChatService { "https://www.googleapis.com/auth/chat.messages.readonly," "https://www.googleapis.com/auth/chat.spaces," "https://www.googleapis.com/auth/chat.spaces.create," + "https://www.googleapis.com/auth/chat.spaces.pins," + "https://www.googleapis.com/auth/chat.spaces.pins.readonly," "https://www.googleapis.com/auth/chat.spaces.readonly," "https://www.googleapis.com/auth/chat.users.availability," "https://www.googleapis.com/auth/chat.users.availability.readonly," @@ -981,6 +984,61 @@ service ChatService { option (google.api.method_signature) = "name"; } + // Lists message pins in a space. Users can pin important messages in spaces + // for easy access. For more information, see [Pin or unpin a conversation in + // Google Chat](https://support.google.com/chat/answer/15622437). + // + // Requires [user + // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + // with one of the following [authorization + // scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + // + // - `https://www.googleapis.com/auth/chat.spaces.pins.readonly` + // - `https://www.googleapis.com/auth/chat.spaces.pins` + // - `https://www.googleapis.com/auth/chat.spaces.readonly` + // - `https://www.googleapis.com/auth/chat.spaces` + rpc ListMessagePins(ListMessagePinsRequest) + returns (ListMessagePinsResponse) { + option (google.api.http) = { + get: "/v1/{parent=spaces/*}/messagePins" + }; + option (google.api.method_signature) = "parent"; + } + + // Creates a message pin. + // + // Requires [user + // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + // with one of the following [authorization + // scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + // + // - `https://www.googleapis.com/auth/chat.spaces.pins` + // - `https://www.googleapis.com/auth/chat.spaces` + rpc CreateMessagePin(CreateMessagePinRequest) returns (MessagePin) { + option (google.api.http) = { + post: "/v1/{parent=spaces/*}/messagePins" + body: "message_pin" + }; + option (google.api.method_signature) = "parent,message_pin"; + } + + // Deletes a message pin. + // + // Requires [user + // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + // with one of the following [authorization + // scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + // + // - `https://www.googleapis.com/auth/chat.spaces.pins` + // - `https://www.googleapis.com/auth/chat.spaces` + rpc DeleteMessagePin(DeleteMessagePinRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=spaces/*/messagePins/*}" + }; + option (google.api.method_signature) = "name"; + } + // Creates a custom emoji. // // Custom emojis are only available for Google Workspace accounts, and the diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/message.proto b/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/message.proto index 37a07c0b9f41..806d2aa91dc6 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/message.proto +++ b/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/message.proto @@ -413,6 +413,8 @@ message Thread { option (google.api.resource) = { type: "chat.googleapis.com/Thread" pattern: "spaces/{space}/threads/{thread}" + plural: "threads" + singular: "thread" }; // Identifier. Resource name of the thread. @@ -634,9 +636,24 @@ message CreateMessageRequest { string thread_key = 6 [deprecated = true, (google.api.field_behavior) = OPTIONAL]; - // Optional. A unique request ID for this message. Specifying an existing - // request ID returns the message created with that ID instead of creating a - // new message. + // Optional. A unique ID for this request. A random UUID is recommended. + // Specifying a request ID makes the request idempotent, which ensures that + // multiple identical requests with the same request ID result in only a + // single message being created. Subsequent requests with the same request + // ID return the existing message and do not update the message, even if the + // requested details differ from the current state. + // + // To use this field effectively: + // + // - Ensure that subsequent requests are identical and use the same + // authentication credentials as the original request. + // - If a message was already created with the provided request ID, the + // request returns that message. Note that the returned message might not be + // fully populated; the API echoes the message in your request with the + // system-assigned resource names populated. To retrieve the latest metadata + // for the message, call `GetMessage`. + // - Reusing an existing request ID with a different authenticated user + // results in an error. string request_id = 7 [(google.api.field_behavior) = OPTIONAL]; // Optional. Specifies whether a message starts a thread or replies to one. @@ -911,6 +928,10 @@ message SearchMessagesRequest { // the top five space matches. For example, `space.display_name:Project` // searches for messages in the top five spaces that contain the word // "Project" in their display names. + // - `space.space_type`: The type of the space. Only supports `=`. For + // example, `space.space_type="DIRECT_MESSAGE"` returns only messages from + // direct messages. The possible values are `DIRECT_MESSAGE`, `GROUP_CHAT`, + // and `SPACE`. // - `attachment`: Supports the operator `:*` (has any) to check for the // presence of attachments. If `attachment:*` is specified, only messages // that have at least one attachment are returned. @@ -930,8 +951,8 @@ message SearchMessagesRequest { // - `is_unread()`: Filters out messages that have been read by the calling // user. // - // Using the `space.display_name` filter requires that the calling credentials - // include one of the following [authorization + // Using the `space.display_name` or the `space.space_type` filters requires + // that the calling credentials include one of the following [authorization // scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): // // - `https://www.googleapis.com/auth/chat.spaces.readonly` @@ -969,6 +990,8 @@ message SearchMessagesRequest { // `space.display_name:Project OR space.display_name:Tasks` returns messages // that are in spaces with display names containing either `Project` or // `Tasks` or both. + // - `space.space_type` supports only the `OR` operator, for example: + // `space.space_type = "DIRECT_MESSAGE" OR space.space_type = "GROUP_CHAT"`. // - `annotations.user_mentions.user.name` supports the operators `AND` and // `OR`, but not a mix of both. For example: // `annotations.user_mentions.user.name:"users/1234567890" AND diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/message_pin.proto b/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/message_pin.proto new file mode 100644 index 000000000000..9b4263be2b44 --- /dev/null +++ b/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/message_pin.proto @@ -0,0 +1,116 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.chat.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Apps.Chat.V1"; +option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb"; +option java_multiple_files = true; +option java_outer_classname = "MessagePinProto"; +option java_package = "com.google.chat.v1"; +option objc_class_prefix = "DYNAPIProto"; +option php_namespace = "Google\\Apps\\Chat\\V1"; +option ruby_package = "Google::Apps::Chat::V1"; + +// A pin on a Chat message. For more information see [Pin a +// message](https://support.google.com/chat?p=chat-board-hc). +message MessagePin { + option (google.api.resource) = { + type: "chat.googleapis.com/MessagePin" + pattern: "spaces/{space}/messagePins/{message_pin}" + plural: "messagePins" + singular: "messagePin" + }; + + // Identifier. The resource name of the message pin. + // Format: `spaces/{space}/messagePins/{message_pin}` + // The resource ID component matches the resource ID component of the + // message. For example, a message with `spaces/AAA/messages/bbb.ccc` + // corresponds to the message pin with the resource name + // `spaces/AAA/messagePins/bbb.ccc`. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Required. Immutable. The resource name of the message that is pinned. + // Format: `spaces/{space}/messages/{message}` + string message = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "chat.googleapis.com/Message" } + ]; +} + +// Request message for listing message pins. +message ListMessagePinsRequest { + // Required. The parent space which owns the collection of pinned items + // Format: `spaces/{space}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "chat.googleapis.com/MessagePin" + } + ]; + + // Optional. The maximum number of message pins returned. The service might + // return fewer messages than this value. The maximum value is 100. If you use + // a value more than 100, it's automatically changed to 100. If unspecified, + // at most 100 message pins will be returned. Negative values return an + // `INVALID_ARGUMENT` error. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token received from a previous list message pins call. + // Provide this parameter to retrieve the subsequent page. + // + // When paginating, all other parameters provided should match the call that + // provided the page token. Passing different values to the other parameters + // might lead to unexpected results. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for listing message pins. +message ListMessagePinsResponse { + // The pinned messages from the specified space. + repeated MessagePin message_pins = 1; + + // You can send a token as `pageToken` to retrieve the next page of + // results. If empty, there are no subsequent pages. + string next_page_token = 2; +} + +// Request message for creating a message pin. +message CreateMessagePinRequest { + // Required. The parent space in which to create the message pin. + // Format: spaces/{space} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "chat.googleapis.com/Space" } + ]; + + // Required. The MessagePin to create. + MessagePin message_pin = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for deleting a message pin. +message DeleteMessagePinRequest { + // Required. The resource name of the message pin to remove. + // Format: spaces/{space}/messagePins/{message_pin} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "chat.googleapis.com/MessagePin" } + ]; +} diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/space.proto b/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/space.proto index 8c3cf641fd8e..2472d4a3751d 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/space.proto +++ b/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/space.proto @@ -489,12 +489,24 @@ message CreateSpaceRequest { // field will be ignored. Space space = 1 [(google.api.field_behavior) = REQUIRED]; - // Optional. A unique identifier for this request. - // A random UUID is recommended. - // Specifying an existing request ID returns the space created with that ID - // instead of creating a new space. - // Specifying an existing request ID from the same Chat app with a different - // authenticated user returns an error. + // Optional. A unique ID for this request. A random UUID is recommended. + // Specifying a request ID makes the request idempotent, which ensures that + // multiple identical requests with the same request ID result in only a + // single space being created. Subsequent requests with the same request ID + // return the existing space and do not update the space, even if the + // requested details differ from the current state. + // + // To use this field effectively: + // + // - Ensure that subsequent requests are identical and use the same + // authentication credentials as the original request. + // - If a space was already created with the provided request ID, the request + // returns that space. Note that the returned space might not be fully + // populated; the API echoes the space in your request with the + // system-assigned resource name populated. To retrieve the latest metadata + // for the space, call `GetSpace`. + // - Reusing an existing request ID with a different authenticated user + // results in an error. string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; } @@ -775,8 +787,9 @@ message SearchSpacesRequest { // // If unspecified, at most 100 spaces are returned. // - // The maximum value is 1000. If you use a value more than 1000, it's - // automatically changed to 1000. + // The maximum value is 1000 when `useAdminAccess` is set to `true`. + // Otherwise, the maximum value is 100. If you use a value more than the + // maximum value, it's automatically changed to the maximum value. int32 page_size = 2; // A token, received from the previous search spaces call. Provide this @@ -881,6 +894,11 @@ message SearchSpacesRequest { // (external_user_allowed = "true" AND display_name:"Hello" AND space_type = // "SPACE") // ``` + // + // The maximum query length is 1,000 characters. + // + // Invalid queries are rejected by the server with an `INVALID_ARGUMENT` + // error. string query = 4 [(google.api.field_behavior) = REQUIRED]; // Optional. How the list of spaces is ordered. @@ -936,10 +954,14 @@ message SearchSpacesResponse { // A token that can be used to retrieve the next page. If this field is empty, // there are no subsequent pages. + // + // Only populated when `useAdminAccess` is set to `true`. string next_page_token = 2; // The total number of spaces that match the query, across all pages. If the // result is over 10,000 spaces, this value is an estimate. + // + // Only populated when `useAdminAccess` is set to `true`. int32 total_size = 3; // Output only. The list of search results that matched the query. diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/space_setup.proto b/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/space_setup.proto index 085843e49c9b..baa14cb44f70 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/space_setup.proto +++ b/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/space_setup.proto @@ -56,12 +56,24 @@ message SetUpSpaceRequest { // of creating a new space. Space space = 1 [(google.api.field_behavior) = REQUIRED]; - // Optional. A unique identifier for this request. - // A random UUID is recommended. - // Specifying an existing request ID returns the space created with that ID - // instead of creating a new space. - // Specifying an existing request ID from the same Chat app with a different - // authenticated user returns an error. + // Optional. A unique ID for this request. A random UUID is recommended. + // Specifying a request ID makes the request idempotent, which ensures that + // multiple identical requests with the same request ID result in only a + // single space being created. Subsequent requests with the same request ID + // return the existing space and do not update the space, even if the + // requested details differ from the current state. + // + // To use this field effectively: + // + // - Ensure that subsequent requests are identical and use the same + // authentication credentials as the original request. + // - If a space was already created with the provided request ID, the request + // returns that space. Note that the returned space might not be fully + // populated; the API echoes the space in your request with the + // system-assigned resource name populated. To retrieve the latest metadata + // for the space, call `GetSpace`. + // - Reusing an existing request ID with a different authenticated user + // results in an error. string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. The Google Chat users or groups to invite to join the space. Omit diff --git a/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/createmessagepin/AsyncCreateMessagePin.java b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/createmessagepin/AsyncCreateMessagePin.java new file mode 100644 index 000000000000..323e9e0ed781 --- /dev/null +++ b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/createmessagepin/AsyncCreateMessagePin.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.chat.v1.samples; + +// [START chat_v1_generated_ChatService_CreateMessagePin_async] +import com.google.api.core.ApiFuture; +import com.google.chat.v1.ChatServiceClient; +import com.google.chat.v1.CreateMessagePinRequest; +import com.google.chat.v1.MessagePin; +import com.google.chat.v1.SpaceName; + +public class AsyncCreateMessagePin { + + public static void main(String[] args) throws Exception { + asyncCreateMessagePin(); + } + + public static void asyncCreateMessagePin() throws Exception { + // 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 (ChatServiceClient chatServiceClient = ChatServiceClient.create()) { + CreateMessagePinRequest request = + CreateMessagePinRequest.newBuilder() + .setParent(SpaceName.of("[SPACE]").toString()) + .setMessagePin(MessagePin.newBuilder().build()) + .build(); + ApiFuture future = + chatServiceClient.createMessagePinCallable().futureCall(request); + // Do something. + MessagePin response = future.get(); + } + } +} +// [END chat_v1_generated_ChatService_CreateMessagePin_async] diff --git a/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/createmessagepin/SyncCreateMessagePin.java b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/createmessagepin/SyncCreateMessagePin.java new file mode 100644 index 000000000000..0cb890635c29 --- /dev/null +++ b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/createmessagepin/SyncCreateMessagePin.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.chat.v1.samples; + +// [START chat_v1_generated_ChatService_CreateMessagePin_sync] +import com.google.chat.v1.ChatServiceClient; +import com.google.chat.v1.CreateMessagePinRequest; +import com.google.chat.v1.MessagePin; +import com.google.chat.v1.SpaceName; + +public class SyncCreateMessagePin { + + public static void main(String[] args) throws Exception { + syncCreateMessagePin(); + } + + public static void syncCreateMessagePin() throws Exception { + // 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 (ChatServiceClient chatServiceClient = ChatServiceClient.create()) { + CreateMessagePinRequest request = + CreateMessagePinRequest.newBuilder() + .setParent(SpaceName.of("[SPACE]").toString()) + .setMessagePin(MessagePin.newBuilder().build()) + .build(); + MessagePin response = chatServiceClient.createMessagePin(request); + } + } +} +// [END chat_v1_generated_ChatService_CreateMessagePin_sync] diff --git a/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/createmessagepin/SyncCreateMessagePinSpacenameMessagepin.java b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/createmessagepin/SyncCreateMessagePinSpacenameMessagepin.java new file mode 100644 index 000000000000..71c288136748 --- /dev/null +++ b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/createmessagepin/SyncCreateMessagePinSpacenameMessagepin.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.chat.v1.samples; + +// [START chat_v1_generated_ChatService_CreateMessagePin_SpacenameMessagepin_sync] +import com.google.chat.v1.ChatServiceClient; +import com.google.chat.v1.MessagePin; +import com.google.chat.v1.SpaceName; + +public class SyncCreateMessagePinSpacenameMessagepin { + + public static void main(String[] args) throws Exception { + syncCreateMessagePinSpacenameMessagepin(); + } + + public static void syncCreateMessagePinSpacenameMessagepin() throws Exception { + // 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 (ChatServiceClient chatServiceClient = ChatServiceClient.create()) { + SpaceName parent = SpaceName.of("[SPACE]"); + MessagePin messagePin = MessagePin.newBuilder().build(); + MessagePin response = chatServiceClient.createMessagePin(parent, messagePin); + } + } +} +// [END chat_v1_generated_ChatService_CreateMessagePin_SpacenameMessagepin_sync] diff --git a/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/createmessagepin/SyncCreateMessagePinStringMessagepin.java b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/createmessagepin/SyncCreateMessagePinStringMessagepin.java new file mode 100644 index 000000000000..b77515730994 --- /dev/null +++ b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/createmessagepin/SyncCreateMessagePinStringMessagepin.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.chat.v1.samples; + +// [START chat_v1_generated_ChatService_CreateMessagePin_StringMessagepin_sync] +import com.google.chat.v1.ChatServiceClient; +import com.google.chat.v1.MessagePin; +import com.google.chat.v1.SpaceName; + +public class SyncCreateMessagePinStringMessagepin { + + public static void main(String[] args) throws Exception { + syncCreateMessagePinStringMessagepin(); + } + + public static void syncCreateMessagePinStringMessagepin() throws Exception { + // 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 (ChatServiceClient chatServiceClient = ChatServiceClient.create()) { + String parent = SpaceName.of("[SPACE]").toString(); + MessagePin messagePin = MessagePin.newBuilder().build(); + MessagePin response = chatServiceClient.createMessagePin(parent, messagePin); + } + } +} +// [END chat_v1_generated_ChatService_CreateMessagePin_StringMessagepin_sync] diff --git a/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/deletemessagepin/AsyncDeleteMessagePin.java b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/deletemessagepin/AsyncDeleteMessagePin.java new file mode 100644 index 000000000000..2aef7d8e6ed8 --- /dev/null +++ b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/deletemessagepin/AsyncDeleteMessagePin.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.chat.v1.samples; + +// [START chat_v1_generated_ChatService_DeleteMessagePin_async] +import com.google.api.core.ApiFuture; +import com.google.chat.v1.ChatServiceClient; +import com.google.chat.v1.DeleteMessagePinRequest; +import com.google.chat.v1.MessagePinName; +import com.google.protobuf.Empty; + +public class AsyncDeleteMessagePin { + + public static void main(String[] args) throws Exception { + asyncDeleteMessagePin(); + } + + public static void asyncDeleteMessagePin() throws Exception { + // 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 (ChatServiceClient chatServiceClient = ChatServiceClient.create()) { + DeleteMessagePinRequest request = + DeleteMessagePinRequest.newBuilder() + .setName(MessagePinName.of("[SPACE]", "[MESSAGE_PIN]").toString()) + .build(); + ApiFuture future = chatServiceClient.deleteMessagePinCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END chat_v1_generated_ChatService_DeleteMessagePin_async] diff --git a/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/deletemessagepin/SyncDeleteMessagePin.java b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/deletemessagepin/SyncDeleteMessagePin.java new file mode 100644 index 000000000000..62a99594c32b --- /dev/null +++ b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/deletemessagepin/SyncDeleteMessagePin.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.chat.v1.samples; + +// [START chat_v1_generated_ChatService_DeleteMessagePin_sync] +import com.google.chat.v1.ChatServiceClient; +import com.google.chat.v1.DeleteMessagePinRequest; +import com.google.chat.v1.MessagePinName; +import com.google.protobuf.Empty; + +public class SyncDeleteMessagePin { + + public static void main(String[] args) throws Exception { + syncDeleteMessagePin(); + } + + public static void syncDeleteMessagePin() throws Exception { + // 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 (ChatServiceClient chatServiceClient = ChatServiceClient.create()) { + DeleteMessagePinRequest request = + DeleteMessagePinRequest.newBuilder() + .setName(MessagePinName.of("[SPACE]", "[MESSAGE_PIN]").toString()) + .build(); + chatServiceClient.deleteMessagePin(request); + } + } +} +// [END chat_v1_generated_ChatService_DeleteMessagePin_sync] diff --git a/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/deletemessagepin/SyncDeleteMessagePinMessagepinname.java b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/deletemessagepin/SyncDeleteMessagePinMessagepinname.java new file mode 100644 index 000000000000..1981d1ca0707 --- /dev/null +++ b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/deletemessagepin/SyncDeleteMessagePinMessagepinname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.chat.v1.samples; + +// [START chat_v1_generated_ChatService_DeleteMessagePin_Messagepinname_sync] +import com.google.chat.v1.ChatServiceClient; +import com.google.chat.v1.MessagePinName; +import com.google.protobuf.Empty; + +public class SyncDeleteMessagePinMessagepinname { + + public static void main(String[] args) throws Exception { + syncDeleteMessagePinMessagepinname(); + } + + public static void syncDeleteMessagePinMessagepinname() throws Exception { + // 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 (ChatServiceClient chatServiceClient = ChatServiceClient.create()) { + MessagePinName name = MessagePinName.of("[SPACE]", "[MESSAGE_PIN]"); + chatServiceClient.deleteMessagePin(name); + } + } +} +// [END chat_v1_generated_ChatService_DeleteMessagePin_Messagepinname_sync] diff --git a/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/deletemessagepin/SyncDeleteMessagePinString.java b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/deletemessagepin/SyncDeleteMessagePinString.java new file mode 100644 index 000000000000..cd88ddb542ce --- /dev/null +++ b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/deletemessagepin/SyncDeleteMessagePinString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.chat.v1.samples; + +// [START chat_v1_generated_ChatService_DeleteMessagePin_String_sync] +import com.google.chat.v1.ChatServiceClient; +import com.google.chat.v1.MessagePinName; +import com.google.protobuf.Empty; + +public class SyncDeleteMessagePinString { + + public static void main(String[] args) throws Exception { + syncDeleteMessagePinString(); + } + + public static void syncDeleteMessagePinString() throws Exception { + // 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 (ChatServiceClient chatServiceClient = ChatServiceClient.create()) { + String name = MessagePinName.of("[SPACE]", "[MESSAGE_PIN]").toString(); + chatServiceClient.deleteMessagePin(name); + } + } +} +// [END chat_v1_generated_ChatService_DeleteMessagePin_String_sync] diff --git a/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/listmessagepins/AsyncListMessagePins.java b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/listmessagepins/AsyncListMessagePins.java new file mode 100644 index 000000000000..4f60297ad90e --- /dev/null +++ b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/listmessagepins/AsyncListMessagePins.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.chat.v1.samples; + +// [START chat_v1_generated_ChatService_ListMessagePins_async] +import com.google.api.core.ApiFuture; +import com.google.chat.v1.ChatServiceClient; +import com.google.chat.v1.ListMessagePinsRequest; +import com.google.chat.v1.MessagePin; +import com.google.chat.v1.SpaceName; + +public class AsyncListMessagePins { + + public static void main(String[] args) throws Exception { + asyncListMessagePins(); + } + + public static void asyncListMessagePins() throws Exception { + // 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 (ChatServiceClient chatServiceClient = ChatServiceClient.create()) { + ListMessagePinsRequest request = + ListMessagePinsRequest.newBuilder() + .setParent(SpaceName.of("[SPACE]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + chatServiceClient.listMessagePinsPagedCallable().futureCall(request); + // Do something. + for (MessagePin element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END chat_v1_generated_ChatService_ListMessagePins_async] diff --git a/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/listmessagepins/AsyncListMessagePinsPaged.java b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/listmessagepins/AsyncListMessagePinsPaged.java new file mode 100644 index 000000000000..4d66e83caa53 --- /dev/null +++ b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/listmessagepins/AsyncListMessagePinsPaged.java @@ -0,0 +1,62 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.chat.v1.samples; + +// [START chat_v1_generated_ChatService_ListMessagePins_Paged_async] +import com.google.chat.v1.ChatServiceClient; +import com.google.chat.v1.ListMessagePinsRequest; +import com.google.chat.v1.ListMessagePinsResponse; +import com.google.chat.v1.MessagePin; +import com.google.chat.v1.SpaceName; +import com.google.common.base.Strings; + +public class AsyncListMessagePinsPaged { + + public static void main(String[] args) throws Exception { + asyncListMessagePinsPaged(); + } + + public static void asyncListMessagePinsPaged() throws Exception { + // 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 (ChatServiceClient chatServiceClient = ChatServiceClient.create()) { + ListMessagePinsRequest request = + ListMessagePinsRequest.newBuilder() + .setParent(SpaceName.of("[SPACE]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListMessagePinsResponse response = + chatServiceClient.listMessagePinsCallable().call(request); + for (MessagePin element : response.getMessagePinsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END chat_v1_generated_ChatService_ListMessagePins_Paged_async] diff --git a/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/listmessagepins/SyncListMessagePins.java b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/listmessagepins/SyncListMessagePins.java new file mode 100644 index 000000000000..107cdf5d6d45 --- /dev/null +++ b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/listmessagepins/SyncListMessagePins.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.chat.v1.samples; + +// [START chat_v1_generated_ChatService_ListMessagePins_sync] +import com.google.chat.v1.ChatServiceClient; +import com.google.chat.v1.ListMessagePinsRequest; +import com.google.chat.v1.MessagePin; +import com.google.chat.v1.SpaceName; + +public class SyncListMessagePins { + + public static void main(String[] args) throws Exception { + syncListMessagePins(); + } + + public static void syncListMessagePins() throws Exception { + // 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 (ChatServiceClient chatServiceClient = ChatServiceClient.create()) { + ListMessagePinsRequest request = + ListMessagePinsRequest.newBuilder() + .setParent(SpaceName.of("[SPACE]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (MessagePin element : chatServiceClient.listMessagePins(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END chat_v1_generated_ChatService_ListMessagePins_sync] diff --git a/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/listmessagepins/SyncListMessagePinsSpacename.java b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/listmessagepins/SyncListMessagePinsSpacename.java new file mode 100644 index 000000000000..be4eaf025f0e --- /dev/null +++ b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/listmessagepins/SyncListMessagePinsSpacename.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.chat.v1.samples; + +// [START chat_v1_generated_ChatService_ListMessagePins_Spacename_sync] +import com.google.chat.v1.ChatServiceClient; +import com.google.chat.v1.MessagePin; +import com.google.chat.v1.SpaceName; + +public class SyncListMessagePinsSpacename { + + public static void main(String[] args) throws Exception { + syncListMessagePinsSpacename(); + } + + public static void syncListMessagePinsSpacename() throws Exception { + // 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 (ChatServiceClient chatServiceClient = ChatServiceClient.create()) { + SpaceName parent = SpaceName.of("[SPACE]"); + for (MessagePin element : chatServiceClient.listMessagePins(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END chat_v1_generated_ChatService_ListMessagePins_Spacename_sync] diff --git a/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/listmessagepins/SyncListMessagePinsString.java b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/listmessagepins/SyncListMessagePinsString.java new file mode 100644 index 000000000000..8b70a75dbc93 --- /dev/null +++ b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/listmessagepins/SyncListMessagePinsString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.chat.v1.samples; + +// [START chat_v1_generated_ChatService_ListMessagePins_String_sync] +import com.google.chat.v1.ChatServiceClient; +import com.google.chat.v1.MessagePin; +import com.google.chat.v1.SpaceName; + +public class SyncListMessagePinsString { + + public static void main(String[] args) throws Exception { + syncListMessagePinsString(); + } + + public static void syncListMessagePinsString() throws Exception { + // 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 (ChatServiceClient chatServiceClient = ChatServiceClient.create()) { + String parent = SpaceName.of("[SPACE]").toString(); + for (MessagePin element : chatServiceClient.listMessagePins(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END chat_v1_generated_ChatService_ListMessagePins_String_sync] diff --git a/java-maps-solar/google-maps-solar/src/main/java/com/google/maps/solar/v1/SolarClient.java b/java-maps-solar/google-maps-solar/src/main/java/com/google/maps/solar/v1/SolarClient.java index f6d199f009d8..adfdf8a8e532 100644 --- a/java-maps-solar/google-maps-solar/src/main/java/com/google/maps/solar/v1/SolarClient.java +++ b/java-maps-solar/google-maps-solar/src/main/java/com/google/maps/solar/v1/SolarClient.java @@ -47,6 +47,7 @@ * .setRequiredQuality(ImageryQuality.forNumber(0)) * .setExactQualityRequired(true) * .addAllExperiments(new ArrayList()) + * .addAllAdditionalInsights(new ArrayList()) * .build(); * BuildingInsights response = solarClient.findClosestBuildingInsights(request); * } @@ -226,6 +227,7 @@ public SolarStub getStub() { * .setRequiredQuality(ImageryQuality.forNumber(0)) * .setExactQualityRequired(true) * .addAllExperiments(new ArrayList()) + * .addAllAdditionalInsights(new ArrayList()) * .build(); * BuildingInsights response = solarClient.findClosestBuildingInsights(request); * } @@ -259,6 +261,7 @@ public final BuildingInsights findClosestBuildingInsights( * .setRequiredQuality(ImageryQuality.forNumber(0)) * .setExactQualityRequired(true) * .addAllExperiments(new ArrayList()) + * .addAllAdditionalInsights(new ArrayList()) * .build(); * ApiFuture future = * solarClient.findClosestBuildingInsightsCallable().futureCall(request); diff --git a/java-maps-solar/google-maps-solar/src/main/java/com/google/maps/solar/v1/package-info.java b/java-maps-solar/google-maps-solar/src/main/java/com/google/maps/solar/v1/package-info.java index 3156dd246cf2..553db8508401 100644 --- a/java-maps-solar/google-maps-solar/src/main/java/com/google/maps/solar/v1/package-info.java +++ b/java-maps-solar/google-maps-solar/src/main/java/com/google/maps/solar/v1/package-info.java @@ -38,6 +38,7 @@ * .setRequiredQuality(ImageryQuality.forNumber(0)) * .setExactQualityRequired(true) * .addAllExperiments(new ArrayList()) + * .addAllAdditionalInsights(new ArrayList()) * .build(); * BuildingInsights response = solarClient.findClosestBuildingInsights(request); * } diff --git a/java-maps-solar/google-maps-solar/src/main/java/com/google/maps/solar/v1/stub/HttpJsonSolarStub.java b/java-maps-solar/google-maps-solar/src/main/java/com/google/maps/solar/v1/stub/HttpJsonSolarStub.java index 7612942836f8..a1f244ad6238 100644 --- a/java-maps-solar/google-maps-solar/src/main/java/com/google/maps/solar/v1/stub/HttpJsonSolarStub.java +++ b/java-maps-solar/google-maps-solar/src/main/java/com/google/maps/solar/v1/stub/HttpJsonSolarStub.java @@ -75,6 +75,8 @@ public class HttpJsonSolarStub extends SolarStub { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "additionalInsights", request.getAdditionalInsightsList()); serializer.putQueryParam( fields, "exactQualityRequired", request.getExactQualityRequired()); serializer.putQueryParam( diff --git a/java-maps-solar/google-maps-solar/src/main/resources/META-INF/native-image/com.google.maps.solar.v1/reflect-config.json b/java-maps-solar/google-maps-solar/src/main/resources/META-INF/native-image/com.google.maps.solar.v1/reflect-config.json index 5c32977f5379..6e50137f8359 100644 --- a/java-maps-solar/google-maps-solar/src/main/resources/META-INF/native-image/com.google.maps.solar.v1/reflect-config.json +++ b/java-maps-solar/google-maps-solar/src/main/resources/META-INF/native-image/com.google.maps.solar.v1/reflect-config.json @@ -494,6 +494,15 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.maps.solar.v1.AdditionalInsights", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.maps.solar.v1.BuildingInsights", "queryAllDeclaredConstructors": true, @@ -512,6 +521,33 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.maps.solar.v1.BuildingInsights$DetectedArrays", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.solar.v1.BuildingInsights$DetectedArrays$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.solar.v1.BuildingInsights$DetectedArrays$DetectionStatus", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.maps.solar.v1.CashPurchaseSavings", "queryAllDeclaredConstructors": true, diff --git a/java-maps-solar/google-maps-solar/src/test/java/com/google/maps/solar/v1/SolarClientHttpJsonTest.java b/java-maps-solar/google-maps-solar/src/test/java/com/google/maps/solar/v1/SolarClientHttpJsonTest.java index 439f97fe59d2..0b3dc7bed8bf 100644 --- a/java-maps-solar/google-maps-solar/src/test/java/com/google/maps/solar/v1/SolarClientHttpJsonTest.java +++ b/java-maps-solar/google-maps-solar/src/test/java/com/google/maps/solar/v1/SolarClientHttpJsonTest.java @@ -91,6 +91,7 @@ public void findClosestBuildingInsightsTest() throws Exception { .setRegionCode("regionCode-1991004415") .setSolarPotential(SolarPotential.newBuilder().build()) .setImageryQuality(ImageryQuality.forNumber(0)) + .setDetectedArrays(BuildingInsights.DetectedArrays.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -100,6 +101,7 @@ public void findClosestBuildingInsightsTest() throws Exception { .setRequiredQuality(ImageryQuality.forNumber(0)) .setExactQualityRequired(true) .addAllExperiments(new ArrayList()) + .addAllAdditionalInsights(new ArrayList()) .build(); BuildingInsights actualResponse = client.findClosestBuildingInsights(request); @@ -134,6 +136,7 @@ public void findClosestBuildingInsightsExceptionTest() throws Exception { .setRequiredQuality(ImageryQuality.forNumber(0)) .setExactQualityRequired(true) .addAllExperiments(new ArrayList()) + .addAllAdditionalInsights(new ArrayList()) .build(); client.findClosestBuildingInsights(request); Assert.fail("No exception raised"); diff --git a/java-maps-solar/google-maps-solar/src/test/java/com/google/maps/solar/v1/SolarClientTest.java b/java-maps-solar/google-maps-solar/src/test/java/com/google/maps/solar/v1/SolarClientTest.java index 0be6866fa6c5..5143a0327050 100644 --- a/java-maps-solar/google-maps-solar/src/test/java/com/google/maps/solar/v1/SolarClientTest.java +++ b/java-maps-solar/google-maps-solar/src/test/java/com/google/maps/solar/v1/SolarClientTest.java @@ -96,6 +96,7 @@ public void findClosestBuildingInsightsTest() throws Exception { .setRegionCode("regionCode-1991004415") .setSolarPotential(SolarPotential.newBuilder().build()) .setImageryQuality(ImageryQuality.forNumber(0)) + .setDetectedArrays(BuildingInsights.DetectedArrays.newBuilder().build()) .build(); mockSolar.addResponse(expectedResponse); @@ -105,6 +106,7 @@ public void findClosestBuildingInsightsTest() throws Exception { .setRequiredQuality(ImageryQuality.forNumber(0)) .setExactQualityRequired(true) .addAllExperiments(new ArrayList()) + .addAllAdditionalInsights(new ArrayList()) .build(); BuildingInsights actualResponse = client.findClosestBuildingInsights(request); @@ -119,6 +121,8 @@ public void findClosestBuildingInsightsTest() throws Exception { Assert.assertEquals(request.getRequiredQuality(), actualRequest.getRequiredQuality()); Assert.assertEquals(request.getExactQualityRequired(), actualRequest.getExactQualityRequired()); Assert.assertEquals(request.getExperimentsList(), actualRequest.getExperimentsList()); + Assert.assertEquals( + request.getAdditionalInsightsList(), actualRequest.getAdditionalInsightsList()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -137,6 +141,7 @@ public void findClosestBuildingInsightsExceptionTest() throws Exception { .setRequiredQuality(ImageryQuality.forNumber(0)) .setExactQualityRequired(true) .addAllExperiments(new ArrayList()) + .addAllAdditionalInsights(new ArrayList()) .build(); client.findClosestBuildingInsights(request); Assert.fail("No exception raised"); diff --git a/java-maps-solar/proto-google-maps-solar-v1/src/main/java/com/google/maps/solar/v1/AdditionalInsights.java b/java-maps-solar/proto-google-maps-solar-v1/src/main/java/com/google/maps/solar/v1/AdditionalInsights.java new file mode 100644 index 000000000000..7e9553a732fb --- /dev/null +++ b/java-maps-solar/proto-google-maps-solar-v1/src/main/java/com/google/maps/solar/v1/AdditionalInsights.java @@ -0,0 +1,179 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/maps/solar/v1/solar_service.proto +// Protobuf Java Version: 4.33.6 + +package com.google.maps.solar.v1; + +/** + * + * + *
+ * Additional building information such as roof geometry and
+ * solar panel arrays that can be returned in BuildingInsights.
+ *
+ * New values may be added to this enum in the future.
+ * 
+ * + * Protobuf enum {@code google.maps.solar.v1.AdditionalInsights} + */ +@com.google.protobuf.Generated +public enum AdditionalInsights implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * The default value. The default BuildingInsights will be returned.
+   * 
+ * + * ADDITIONAL_INSIGHTS_UNSPECIFIED = 0; + */ + ADDITIONAL_INSIGHTS_UNSPECIFIED(0), + /** + * + * + *
+   * Determines whether the response will include the detected arrays.
+   *
+   * If specified, the `detected_arrays` field will be populated in the
+   * response.
+   * 
+ * + * DETECTED_ARRAYS = 2; + */ + DETECTED_ARRAYS(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "AdditionalInsights"); + } + + /** + * + * + *
+   * The default value. The default BuildingInsights will be returned.
+   * 
+ * + * ADDITIONAL_INSIGHTS_UNSPECIFIED = 0; + */ + public static final int ADDITIONAL_INSIGHTS_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+   * Determines whether the response will include the detected arrays.
+   *
+   * If specified, the `detected_arrays` field will be populated in the
+   * response.
+   * 
+ * + * DETECTED_ARRAYS = 2; + */ + public static final int DETECTED_ARRAYS_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static AdditionalInsights valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static AdditionalInsights forNumber(int value) { + switch (value) { + case 0: + return ADDITIONAL_INSIGHTS_UNSPECIFIED; + case 2: + return DETECTED_ARRAYS; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public AdditionalInsights findValueByNumber(int number) { + return AdditionalInsights.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.maps.solar.v1.SolarServiceProto.getDescriptor().getEnumTypes().get(0); + } + + private static final AdditionalInsights[] VALUES = values(); + + public static AdditionalInsights valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private AdditionalInsights(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.maps.solar.v1.AdditionalInsights) +} diff --git a/java-maps-solar/proto-google-maps-solar-v1/src/main/java/com/google/maps/solar/v1/BuildingInsights.java b/java-maps-solar/proto-google-maps-solar-v1/src/main/java/com/google/maps/solar/v1/BuildingInsights.java index 66b28511737b..38788edc60cb 100644 --- a/java-maps-solar/proto-google-maps-solar-v1/src/main/java/com/google/maps/solar/v1/BuildingInsights.java +++ b/java-maps-solar/proto-google-maps-solar-v1/src/main/java/com/google/maps/solar/v1/BuildingInsights.java @@ -77,6 +77,1138 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.maps.solar.v1.BuildingInsights.Builder.class); } + public interface DetectedArraysOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.maps.solar.v1.BuildingInsights.DetectedArrays) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Indicates the detection status of solar arrays for this building.
+     * 
+ * + * + * .google.maps.solar.v1.BuildingInsights.DetectedArrays.DetectionStatus detection_status = 1; + * + * + * @return The enum numeric value on the wire for detectionStatus. + */ + int getDetectionStatusValue(); + + /** + * + * + *
+     * Indicates the detection status of solar arrays for this building.
+     * 
+ * + * + * .google.maps.solar.v1.BuildingInsights.DetectedArrays.DetectionStatus detection_status = 1; + * + * + * @return The detectionStatus. + */ + com.google.maps.solar.v1.BuildingInsights.DetectedArrays.DetectionStatus getDetectionStatus(); + + /** + * + * + *
+     * The date indicating when the latest solar array data was captured.
+     * 
+ * + * .google.type.Date latest_capture_date = 3; + * + * @return Whether the latestCaptureDate field is set. + */ + boolean hasLatestCaptureDate(); + + /** + * + * + *
+     * The date indicating when the latest solar array data was captured.
+     * 
+ * + * .google.type.Date latest_capture_date = 3; + * + * @return The latestCaptureDate. + */ + com.google.type.Date getLatestCaptureDate(); + + /** + * + * + *
+     * The date indicating when the latest solar array data was captured.
+     * 
+ * + * .google.type.Date latest_capture_date = 3; + */ + com.google.type.DateOrBuilder getLatestCaptureDateOrBuilder(); + } + + /** + * + * + *
+   * Information about solar arrays detected on the building.
+   * 
+ * + * Protobuf type {@code google.maps.solar.v1.BuildingInsights.DetectedArrays} + */ + public static final class DetectedArrays extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.maps.solar.v1.BuildingInsights.DetectedArrays) + DetectedArraysOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "DetectedArrays"); + } + + // Use DetectedArrays.newBuilder() to construct. + private DetectedArrays(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DetectedArrays() { + detectionStatus_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.solar.v1.SolarServiceProto + .internal_static_google_maps_solar_v1_BuildingInsights_DetectedArrays_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.solar.v1.SolarServiceProto + .internal_static_google_maps_solar_v1_BuildingInsights_DetectedArrays_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.solar.v1.BuildingInsights.DetectedArrays.class, + com.google.maps.solar.v1.BuildingInsights.DetectedArrays.Builder.class); + } + + /** + * + * + *
+     * Indicates the detection status of solar arrays for this building.
+     * 
+ * + * Protobuf enum {@code google.maps.solar.v1.BuildingInsights.DetectedArrays.DetectionStatus} + */ + public enum DetectionStatus implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Unspecified status.
+       * 
+ * + * DETECTION_STATUS_UNSPECIFIED = 0; + */ + DETECTION_STATUS_UNSPECIFIED(0), + /** + * + * + *
+       * Detected solar array data is unavailable for this building.
+       * 
+ * + * DETECTION_STATUS_DATA_UNAVAILABLE = 1; + */ + DETECTION_STATUS_DATA_UNAVAILABLE(1), + /** + * + * + *
+       * At least one solar array has been detected for this building.
+       * 
+ * + * DETECTION_STATUS_ARRAYS_DETECTED = 2; + */ + DETECTION_STATUS_ARRAYS_DETECTED(2), + /** + * + * + *
+       * No solar arrays detected for this building.
+       * 
+ * + * DETECTION_STATUS_NO_ARRAYS_DETECTED = 3; + */ + DETECTION_STATUS_NO_ARRAYS_DETECTED(3), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "DetectionStatus"); + } + + /** + * + * + *
+       * Unspecified status.
+       * 
+ * + * DETECTION_STATUS_UNSPECIFIED = 0; + */ + public static final int DETECTION_STATUS_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+       * Detected solar array data is unavailable for this building.
+       * 
+ * + * DETECTION_STATUS_DATA_UNAVAILABLE = 1; + */ + public static final int DETECTION_STATUS_DATA_UNAVAILABLE_VALUE = 1; + + /** + * + * + *
+       * At least one solar array has been detected for this building.
+       * 
+ * + * DETECTION_STATUS_ARRAYS_DETECTED = 2; + */ + public static final int DETECTION_STATUS_ARRAYS_DETECTED_VALUE = 2; + + /** + * + * + *
+       * No solar arrays detected for this building.
+       * 
+ * + * DETECTION_STATUS_NO_ARRAYS_DETECTED = 3; + */ + public static final int DETECTION_STATUS_NO_ARRAYS_DETECTED_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DetectionStatus valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static DetectionStatus forNumber(int value) { + switch (value) { + case 0: + return DETECTION_STATUS_UNSPECIFIED; + case 1: + return DETECTION_STATUS_DATA_UNAVAILABLE; + case 2: + return DETECTION_STATUS_ARRAYS_DETECTED; + case 3: + return DETECTION_STATUS_NO_ARRAYS_DETECTED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public DetectionStatus findValueByNumber(int number) { + return DetectionStatus.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.maps.solar.v1.BuildingInsights.DetectedArrays.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final DetectionStatus[] VALUES = values(); + + public static DetectionStatus valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private DetectionStatus(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.maps.solar.v1.BuildingInsights.DetectedArrays.DetectionStatus) + } + + private int bitField0_; + public static final int DETECTION_STATUS_FIELD_NUMBER = 1; + private int detectionStatus_ = 0; + + /** + * + * + *
+     * Indicates the detection status of solar arrays for this building.
+     * 
+ * + * + * .google.maps.solar.v1.BuildingInsights.DetectedArrays.DetectionStatus detection_status = 1; + * + * + * @return The enum numeric value on the wire for detectionStatus. + */ + @java.lang.Override + public int getDetectionStatusValue() { + return detectionStatus_; + } + + /** + * + * + *
+     * Indicates the detection status of solar arrays for this building.
+     * 
+ * + * + * .google.maps.solar.v1.BuildingInsights.DetectedArrays.DetectionStatus detection_status = 1; + * + * + * @return The detectionStatus. + */ + @java.lang.Override + public com.google.maps.solar.v1.BuildingInsights.DetectedArrays.DetectionStatus + getDetectionStatus() { + com.google.maps.solar.v1.BuildingInsights.DetectedArrays.DetectionStatus result = + com.google.maps.solar.v1.BuildingInsights.DetectedArrays.DetectionStatus.forNumber( + detectionStatus_); + return result == null + ? com.google.maps.solar.v1.BuildingInsights.DetectedArrays.DetectionStatus.UNRECOGNIZED + : result; + } + + public static final int LATEST_CAPTURE_DATE_FIELD_NUMBER = 3; + private com.google.type.Date latestCaptureDate_; + + /** + * + * + *
+     * The date indicating when the latest solar array data was captured.
+     * 
+ * + * .google.type.Date latest_capture_date = 3; + * + * @return Whether the latestCaptureDate field is set. + */ + @java.lang.Override + public boolean hasLatestCaptureDate() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * The date indicating when the latest solar array data was captured.
+     * 
+ * + * .google.type.Date latest_capture_date = 3; + * + * @return The latestCaptureDate. + */ + @java.lang.Override + public com.google.type.Date getLatestCaptureDate() { + return latestCaptureDate_ == null + ? com.google.type.Date.getDefaultInstance() + : latestCaptureDate_; + } + + /** + * + * + *
+     * The date indicating when the latest solar array data was captured.
+     * 
+ * + * .google.type.Date latest_capture_date = 3; + */ + @java.lang.Override + public com.google.type.DateOrBuilder getLatestCaptureDateOrBuilder() { + return latestCaptureDate_ == null + ? com.google.type.Date.getDefaultInstance() + : latestCaptureDate_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (detectionStatus_ + != com.google.maps.solar.v1.BuildingInsights.DetectedArrays.DetectionStatus + .DETECTION_STATUS_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, detectionStatus_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getLatestCaptureDate()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (detectionStatus_ + != com.google.maps.solar.v1.BuildingInsights.DetectedArrays.DetectionStatus + .DETECTION_STATUS_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, detectionStatus_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getLatestCaptureDate()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.maps.solar.v1.BuildingInsights.DetectedArrays)) { + return super.equals(obj); + } + com.google.maps.solar.v1.BuildingInsights.DetectedArrays other = + (com.google.maps.solar.v1.BuildingInsights.DetectedArrays) obj; + + if (detectionStatus_ != other.detectionStatus_) return false; + if (hasLatestCaptureDate() != other.hasLatestCaptureDate()) return false; + if (hasLatestCaptureDate()) { + if (!getLatestCaptureDate().equals(other.getLatestCaptureDate())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DETECTION_STATUS_FIELD_NUMBER; + hash = (53 * hash) + detectionStatus_; + if (hasLatestCaptureDate()) { + hash = (37 * hash) + LATEST_CAPTURE_DATE_FIELD_NUMBER; + hash = (53 * hash) + getLatestCaptureDate().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.solar.v1.BuildingInsights.DetectedArrays parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.solar.v1.BuildingInsights.DetectedArrays parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.solar.v1.BuildingInsights.DetectedArrays parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.solar.v1.BuildingInsights.DetectedArrays parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.solar.v1.BuildingInsights.DetectedArrays parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.solar.v1.BuildingInsights.DetectedArrays parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.solar.v1.BuildingInsights.DetectedArrays parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.maps.solar.v1.BuildingInsights.DetectedArrays parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.solar.v1.BuildingInsights.DetectedArrays parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.solar.v1.BuildingInsights.DetectedArrays parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.solar.v1.BuildingInsights.DetectedArrays parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.maps.solar.v1.BuildingInsights.DetectedArrays parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.maps.solar.v1.BuildingInsights.DetectedArrays prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * Information about solar arrays detected on the building.
+     * 
+ * + * Protobuf type {@code google.maps.solar.v1.BuildingInsights.DetectedArrays} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.maps.solar.v1.BuildingInsights.DetectedArrays) + com.google.maps.solar.v1.BuildingInsights.DetectedArraysOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.solar.v1.SolarServiceProto + .internal_static_google_maps_solar_v1_BuildingInsights_DetectedArrays_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.solar.v1.SolarServiceProto + .internal_static_google_maps_solar_v1_BuildingInsights_DetectedArrays_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.solar.v1.BuildingInsights.DetectedArrays.class, + com.google.maps.solar.v1.BuildingInsights.DetectedArrays.Builder.class); + } + + // Construct using com.google.maps.solar.v1.BuildingInsights.DetectedArrays.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetLatestCaptureDateFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + detectionStatus_ = 0; + latestCaptureDate_ = null; + if (latestCaptureDateBuilder_ != null) { + latestCaptureDateBuilder_.dispose(); + latestCaptureDateBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.solar.v1.SolarServiceProto + .internal_static_google_maps_solar_v1_BuildingInsights_DetectedArrays_descriptor; + } + + @java.lang.Override + public com.google.maps.solar.v1.BuildingInsights.DetectedArrays getDefaultInstanceForType() { + return com.google.maps.solar.v1.BuildingInsights.DetectedArrays.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.solar.v1.BuildingInsights.DetectedArrays build() { + com.google.maps.solar.v1.BuildingInsights.DetectedArrays result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.solar.v1.BuildingInsights.DetectedArrays buildPartial() { + com.google.maps.solar.v1.BuildingInsights.DetectedArrays result = + new com.google.maps.solar.v1.BuildingInsights.DetectedArrays(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.maps.solar.v1.BuildingInsights.DetectedArrays result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.detectionStatus_ = detectionStatus_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.latestCaptureDate_ = + latestCaptureDateBuilder_ == null + ? latestCaptureDate_ + : latestCaptureDateBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.solar.v1.BuildingInsights.DetectedArrays) { + return mergeFrom((com.google.maps.solar.v1.BuildingInsights.DetectedArrays) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.solar.v1.BuildingInsights.DetectedArrays other) { + if (other == com.google.maps.solar.v1.BuildingInsights.DetectedArrays.getDefaultInstance()) + return this; + if (other.detectionStatus_ != 0) { + setDetectionStatusValue(other.getDetectionStatusValue()); + } + if (other.hasLatestCaptureDate()) { + mergeLatestCaptureDate(other.getLatestCaptureDate()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + detectionStatus_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 26: + { + input.readMessage( + internalGetLatestCaptureDateFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int detectionStatus_ = 0; + + /** + * + * + *
+       * Indicates the detection status of solar arrays for this building.
+       * 
+ * + * + * .google.maps.solar.v1.BuildingInsights.DetectedArrays.DetectionStatus detection_status = 1; + * + * + * @return The enum numeric value on the wire for detectionStatus. + */ + @java.lang.Override + public int getDetectionStatusValue() { + return detectionStatus_; + } + + /** + * + * + *
+       * Indicates the detection status of solar arrays for this building.
+       * 
+ * + * + * .google.maps.solar.v1.BuildingInsights.DetectedArrays.DetectionStatus detection_status = 1; + * + * + * @param value The enum numeric value on the wire for detectionStatus to set. + * @return This builder for chaining. + */ + public Builder setDetectionStatusValue(int value) { + detectionStatus_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Indicates the detection status of solar arrays for this building.
+       * 
+ * + * + * .google.maps.solar.v1.BuildingInsights.DetectedArrays.DetectionStatus detection_status = 1; + * + * + * @return The detectionStatus. + */ + @java.lang.Override + public com.google.maps.solar.v1.BuildingInsights.DetectedArrays.DetectionStatus + getDetectionStatus() { + com.google.maps.solar.v1.BuildingInsights.DetectedArrays.DetectionStatus result = + com.google.maps.solar.v1.BuildingInsights.DetectedArrays.DetectionStatus.forNumber( + detectionStatus_); + return result == null + ? com.google.maps.solar.v1.BuildingInsights.DetectedArrays.DetectionStatus.UNRECOGNIZED + : result; + } + + /** + * + * + *
+       * Indicates the detection status of solar arrays for this building.
+       * 
+ * + * + * .google.maps.solar.v1.BuildingInsights.DetectedArrays.DetectionStatus detection_status = 1; + * + * + * @param value The detectionStatus to set. + * @return This builder for chaining. + */ + public Builder setDetectionStatus( + com.google.maps.solar.v1.BuildingInsights.DetectedArrays.DetectionStatus value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + detectionStatus_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+       * Indicates the detection status of solar arrays for this building.
+       * 
+ * + * + * .google.maps.solar.v1.BuildingInsights.DetectedArrays.DetectionStatus detection_status = 1; + * + * + * @return This builder for chaining. + */ + public Builder clearDetectionStatus() { + bitField0_ = (bitField0_ & ~0x00000001); + detectionStatus_ = 0; + onChanged(); + return this; + } + + private com.google.type.Date latestCaptureDate_; + private com.google.protobuf.SingleFieldBuilder< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> + latestCaptureDateBuilder_; + + /** + * + * + *
+       * The date indicating when the latest solar array data was captured.
+       * 
+ * + * .google.type.Date latest_capture_date = 3; + * + * @return Whether the latestCaptureDate field is set. + */ + public boolean hasLatestCaptureDate() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+       * The date indicating when the latest solar array data was captured.
+       * 
+ * + * .google.type.Date latest_capture_date = 3; + * + * @return The latestCaptureDate. + */ + public com.google.type.Date getLatestCaptureDate() { + if (latestCaptureDateBuilder_ == null) { + return latestCaptureDate_ == null + ? com.google.type.Date.getDefaultInstance() + : latestCaptureDate_; + } else { + return latestCaptureDateBuilder_.getMessage(); + } + } + + /** + * + * + *
+       * The date indicating when the latest solar array data was captured.
+       * 
+ * + * .google.type.Date latest_capture_date = 3; + */ + public Builder setLatestCaptureDate(com.google.type.Date value) { + if (latestCaptureDateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + latestCaptureDate_ = value; + } else { + latestCaptureDateBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * The date indicating when the latest solar array data was captured.
+       * 
+ * + * .google.type.Date latest_capture_date = 3; + */ + public Builder setLatestCaptureDate(com.google.type.Date.Builder builderForValue) { + if (latestCaptureDateBuilder_ == null) { + latestCaptureDate_ = builderForValue.build(); + } else { + latestCaptureDateBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * The date indicating when the latest solar array data was captured.
+       * 
+ * + * .google.type.Date latest_capture_date = 3; + */ + public Builder mergeLatestCaptureDate(com.google.type.Date value) { + if (latestCaptureDateBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && latestCaptureDate_ != null + && latestCaptureDate_ != com.google.type.Date.getDefaultInstance()) { + getLatestCaptureDateBuilder().mergeFrom(value); + } else { + latestCaptureDate_ = value; + } + } else { + latestCaptureDateBuilder_.mergeFrom(value); + } + if (latestCaptureDate_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * The date indicating when the latest solar array data was captured.
+       * 
+ * + * .google.type.Date latest_capture_date = 3; + */ + public Builder clearLatestCaptureDate() { + bitField0_ = (bitField0_ & ~0x00000002); + latestCaptureDate_ = null; + if (latestCaptureDateBuilder_ != null) { + latestCaptureDateBuilder_.dispose(); + latestCaptureDateBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+       * The date indicating when the latest solar array data was captured.
+       * 
+ * + * .google.type.Date latest_capture_date = 3; + */ + public com.google.type.Date.Builder getLatestCaptureDateBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetLatestCaptureDateFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * The date indicating when the latest solar array data was captured.
+       * 
+ * + * .google.type.Date latest_capture_date = 3; + */ + public com.google.type.DateOrBuilder getLatestCaptureDateOrBuilder() { + if (latestCaptureDateBuilder_ != null) { + return latestCaptureDateBuilder_.getMessageOrBuilder(); + } else { + return latestCaptureDate_ == null + ? com.google.type.Date.getDefaultInstance() + : latestCaptureDate_; + } + } + + /** + * + * + *
+       * The date indicating when the latest solar array data was captured.
+       * 
+ * + * .google.type.Date latest_capture_date = 3; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> + internalGetLatestCaptureDateFieldBuilder() { + if (latestCaptureDateBuilder_ == null) { + latestCaptureDateBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.type.Date, + com.google.type.Date.Builder, + com.google.type.DateOrBuilder>( + getLatestCaptureDate(), getParentForChildren(), isClean()); + latestCaptureDate_ = null; + } + return latestCaptureDateBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.maps.solar.v1.BuildingInsights.DetectedArrays) + } + + // @@protoc_insertion_point(class_scope:google.maps.solar.v1.BuildingInsights.DetectedArrays) + private static final com.google.maps.solar.v1.BuildingInsights.DetectedArrays DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.solar.v1.BuildingInsights.DetectedArrays(); + } + + public static com.google.maps.solar.v1.BuildingInsights.DetectedArrays getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DetectedArrays parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.maps.solar.v1.BuildingInsights.DetectedArrays getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + private int bitField0_; public static final int NAME_FIELD_NUMBER = 1; @@ -639,6 +1771,66 @@ public com.google.maps.solar.v1.ImageryQuality getImageryQuality() { return result == null ? com.google.maps.solar.v1.ImageryQuality.UNRECOGNIZED : result; } + public static final int DETECTED_ARRAYS_FIELD_NUMBER = 12; + private com.google.maps.solar.v1.BuildingInsights.DetectedArrays detectedArrays_; + + /** + * + * + *
+   * Solar arrays detected on the building. This field is only populated if
+   * DETECTED_ARRAYS is included in the request's
+   * [FindClosestBuildingInsightsRequest.additional_insights][google.maps.solar.v1.FindClosestBuildingInsightsRequest.additional_insights].
+   * 
+ * + * .google.maps.solar.v1.BuildingInsights.DetectedArrays detected_arrays = 12; + * + * @return Whether the detectedArrays field is set. + */ + @java.lang.Override + public boolean hasDetectedArrays() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+   * Solar arrays detected on the building. This field is only populated if
+   * DETECTED_ARRAYS is included in the request's
+   * [FindClosestBuildingInsightsRequest.additional_insights][google.maps.solar.v1.FindClosestBuildingInsightsRequest.additional_insights].
+   * 
+ * + * .google.maps.solar.v1.BuildingInsights.DetectedArrays detected_arrays = 12; + * + * @return The detectedArrays. + */ + @java.lang.Override + public com.google.maps.solar.v1.BuildingInsights.DetectedArrays getDetectedArrays() { + return detectedArrays_ == null + ? com.google.maps.solar.v1.BuildingInsights.DetectedArrays.getDefaultInstance() + : detectedArrays_; + } + + /** + * + * + *
+   * Solar arrays detected on the building. This field is only populated if
+   * DETECTED_ARRAYS is included in the request's
+   * [FindClosestBuildingInsightsRequest.additional_insights][google.maps.solar.v1.FindClosestBuildingInsightsRequest.additional_insights].
+   * 
+ * + * .google.maps.solar.v1.BuildingInsights.DetectedArrays detected_arrays = 12; + */ + @java.lang.Override + public com.google.maps.solar.v1.BuildingInsights.DetectedArraysOrBuilder + getDetectedArraysOrBuilder() { + return detectedArrays_ == null + ? com.google.maps.solar.v1.BuildingInsights.DetectedArrays.getDefaultInstance() + : detectedArrays_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -687,6 +1879,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { output.writeMessage(11, getImageryProcessedDate()); } + if (((bitField0_ & 0x00000020) != 0)) { + output.writeMessage(12, getDetectedArrays()); + } getUnknownFields().writeTo(output); } @@ -731,6 +1926,9 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getImageryProcessedDate()); } + if (((bitField0_ & 0x00000020) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getDetectedArrays()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -773,6 +1971,10 @@ public boolean equals(final java.lang.Object obj) { if (!getSolarPotential().equals(other.getSolarPotential())) return false; } if (imageryQuality_ != other.imageryQuality_) return false; + if (hasDetectedArrays() != other.hasDetectedArrays()) return false; + if (hasDetectedArrays()) { + if (!getDetectedArrays().equals(other.getDetectedArrays())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -816,6 +2018,10 @@ public int hashCode() { } hash = (37 * hash) + IMAGERY_QUALITY_FIELD_NUMBER; hash = (53 * hash) + imageryQuality_; + if (hasDetectedArrays()) { + hash = (37 * hash) + DETECTED_ARRAYS_FIELD_NUMBER; + hash = (53 * hash) + getDetectedArrays().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -964,6 +2170,7 @@ private void maybeForceBuilderInitialization() { internalGetImageryDateFieldBuilder(); internalGetImageryProcessedDateFieldBuilder(); internalGetSolarPotentialFieldBuilder(); + internalGetDetectedArraysFieldBuilder(); } } @@ -1002,6 +2209,11 @@ public Builder clear() { solarPotentialBuilder_ = null; } imageryQuality_ = 0; + detectedArrays_ = null; + if (detectedArraysBuilder_ != null) { + detectedArraysBuilder_.dispose(); + detectedArraysBuilder_ = null; + } return this; } @@ -1083,6 +2295,11 @@ private void buildPartial0(com.google.maps.solar.v1.BuildingInsights result) { if (((from_bitField0_ & 0x00000400) != 0)) { result.imageryQuality_ = imageryQuality_; } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.detectedArrays_ = + detectedArraysBuilder_ == null ? detectedArrays_ : detectedArraysBuilder_.build(); + to_bitField0_ |= 0x00000020; + } result.bitField0_ |= to_bitField0_; } @@ -1141,6 +2358,9 @@ public Builder mergeFrom(com.google.maps.solar.v1.BuildingInsights other) { if (other.imageryQuality_ != 0) { setImageryQualityValue(other.getImageryQualityValue()); } + if (other.hasDetectedArrays()) { + mergeDetectedArrays(other.getDetectedArrays()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1237,6 +2457,13 @@ public Builder mergeFrom( bitField0_ |= 0x00000010; break; } // case 90 + case 98: + { + input.readMessage( + internalGetDetectedArraysFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000800; + break; + } // case 98 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -2857,6 +4084,224 @@ public Builder clearImageryQuality() { return this; } + private com.google.maps.solar.v1.BuildingInsights.DetectedArrays detectedArrays_; + private com.google.protobuf.SingleFieldBuilder< + com.google.maps.solar.v1.BuildingInsights.DetectedArrays, + com.google.maps.solar.v1.BuildingInsights.DetectedArrays.Builder, + com.google.maps.solar.v1.BuildingInsights.DetectedArraysOrBuilder> + detectedArraysBuilder_; + + /** + * + * + *
+     * Solar arrays detected on the building. This field is only populated if
+     * DETECTED_ARRAYS is included in the request's
+     * [FindClosestBuildingInsightsRequest.additional_insights][google.maps.solar.v1.FindClosestBuildingInsightsRequest.additional_insights].
+     * 
+ * + * .google.maps.solar.v1.BuildingInsights.DetectedArrays detected_arrays = 12; + * + * @return Whether the detectedArrays field is set. + */ + public boolean hasDetectedArrays() { + return ((bitField0_ & 0x00000800) != 0); + } + + /** + * + * + *
+     * Solar arrays detected on the building. This field is only populated if
+     * DETECTED_ARRAYS is included in the request's
+     * [FindClosestBuildingInsightsRequest.additional_insights][google.maps.solar.v1.FindClosestBuildingInsightsRequest.additional_insights].
+     * 
+ * + * .google.maps.solar.v1.BuildingInsights.DetectedArrays detected_arrays = 12; + * + * @return The detectedArrays. + */ + public com.google.maps.solar.v1.BuildingInsights.DetectedArrays getDetectedArrays() { + if (detectedArraysBuilder_ == null) { + return detectedArrays_ == null + ? com.google.maps.solar.v1.BuildingInsights.DetectedArrays.getDefaultInstance() + : detectedArrays_; + } else { + return detectedArraysBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Solar arrays detected on the building. This field is only populated if
+     * DETECTED_ARRAYS is included in the request's
+     * [FindClosestBuildingInsightsRequest.additional_insights][google.maps.solar.v1.FindClosestBuildingInsightsRequest.additional_insights].
+     * 
+ * + * .google.maps.solar.v1.BuildingInsights.DetectedArrays detected_arrays = 12; + */ + public Builder setDetectedArrays( + com.google.maps.solar.v1.BuildingInsights.DetectedArrays value) { + if (detectedArraysBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + detectedArrays_ = value; + } else { + detectedArraysBuilder_.setMessage(value); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + /** + * + * + *
+     * Solar arrays detected on the building. This field is only populated if
+     * DETECTED_ARRAYS is included in the request's
+     * [FindClosestBuildingInsightsRequest.additional_insights][google.maps.solar.v1.FindClosestBuildingInsightsRequest.additional_insights].
+     * 
+ * + * .google.maps.solar.v1.BuildingInsights.DetectedArrays detected_arrays = 12; + */ + public Builder setDetectedArrays( + com.google.maps.solar.v1.BuildingInsights.DetectedArrays.Builder builderForValue) { + if (detectedArraysBuilder_ == null) { + detectedArrays_ = builderForValue.build(); + } else { + detectedArraysBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + /** + * + * + *
+     * Solar arrays detected on the building. This field is only populated if
+     * DETECTED_ARRAYS is included in the request's
+     * [FindClosestBuildingInsightsRequest.additional_insights][google.maps.solar.v1.FindClosestBuildingInsightsRequest.additional_insights].
+     * 
+ * + * .google.maps.solar.v1.BuildingInsights.DetectedArrays detected_arrays = 12; + */ + public Builder mergeDetectedArrays( + com.google.maps.solar.v1.BuildingInsights.DetectedArrays value) { + if (detectedArraysBuilder_ == null) { + if (((bitField0_ & 0x00000800) != 0) + && detectedArrays_ != null + && detectedArrays_ + != com.google.maps.solar.v1.BuildingInsights.DetectedArrays.getDefaultInstance()) { + getDetectedArraysBuilder().mergeFrom(value); + } else { + detectedArrays_ = value; + } + } else { + detectedArraysBuilder_.mergeFrom(value); + } + if (detectedArrays_ != null) { + bitField0_ |= 0x00000800; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Solar arrays detected on the building. This field is only populated if
+     * DETECTED_ARRAYS is included in the request's
+     * [FindClosestBuildingInsightsRequest.additional_insights][google.maps.solar.v1.FindClosestBuildingInsightsRequest.additional_insights].
+     * 
+ * + * .google.maps.solar.v1.BuildingInsights.DetectedArrays detected_arrays = 12; + */ + public Builder clearDetectedArrays() { + bitField0_ = (bitField0_ & ~0x00000800); + detectedArrays_ = null; + if (detectedArraysBuilder_ != null) { + detectedArraysBuilder_.dispose(); + detectedArraysBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Solar arrays detected on the building. This field is only populated if
+     * DETECTED_ARRAYS is included in the request's
+     * [FindClosestBuildingInsightsRequest.additional_insights][google.maps.solar.v1.FindClosestBuildingInsightsRequest.additional_insights].
+     * 
+ * + * .google.maps.solar.v1.BuildingInsights.DetectedArrays detected_arrays = 12; + */ + public com.google.maps.solar.v1.BuildingInsights.DetectedArrays.Builder + getDetectedArraysBuilder() { + bitField0_ |= 0x00000800; + onChanged(); + return internalGetDetectedArraysFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Solar arrays detected on the building. This field is only populated if
+     * DETECTED_ARRAYS is included in the request's
+     * [FindClosestBuildingInsightsRequest.additional_insights][google.maps.solar.v1.FindClosestBuildingInsightsRequest.additional_insights].
+     * 
+ * + * .google.maps.solar.v1.BuildingInsights.DetectedArrays detected_arrays = 12; + */ + public com.google.maps.solar.v1.BuildingInsights.DetectedArraysOrBuilder + getDetectedArraysOrBuilder() { + if (detectedArraysBuilder_ != null) { + return detectedArraysBuilder_.getMessageOrBuilder(); + } else { + return detectedArrays_ == null + ? com.google.maps.solar.v1.BuildingInsights.DetectedArrays.getDefaultInstance() + : detectedArrays_; + } + } + + /** + * + * + *
+     * Solar arrays detected on the building. This field is only populated if
+     * DETECTED_ARRAYS is included in the request's
+     * [FindClosestBuildingInsightsRequest.additional_insights][google.maps.solar.v1.FindClosestBuildingInsightsRequest.additional_insights].
+     * 
+ * + * .google.maps.solar.v1.BuildingInsights.DetectedArrays detected_arrays = 12; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.maps.solar.v1.BuildingInsights.DetectedArrays, + com.google.maps.solar.v1.BuildingInsights.DetectedArrays.Builder, + com.google.maps.solar.v1.BuildingInsights.DetectedArraysOrBuilder> + internalGetDetectedArraysFieldBuilder() { + if (detectedArraysBuilder_ == null) { + detectedArraysBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.maps.solar.v1.BuildingInsights.DetectedArrays, + com.google.maps.solar.v1.BuildingInsights.DetectedArrays.Builder, + com.google.maps.solar.v1.BuildingInsights.DetectedArraysOrBuilder>( + getDetectedArrays(), getParentForChildren(), isClean()); + detectedArrays_ = null; + } + return detectedArraysBuilder_; + } + // @@protoc_insertion_point(builder_scope:google.maps.solar.v1.BuildingInsights) } diff --git a/java-maps-solar/proto-google-maps-solar-v1/src/main/java/com/google/maps/solar/v1/BuildingInsightsOrBuilder.java b/java-maps-solar/proto-google-maps-solar-v1/src/main/java/com/google/maps/solar/v1/BuildingInsightsOrBuilder.java index 1ba54f95ed68..f610af7c2b0a 100644 --- a/java-maps-solar/proto-google-maps-solar-v1/src/main/java/com/google/maps/solar/v1/BuildingInsightsOrBuilder.java +++ b/java-maps-solar/proto-google-maps-solar-v1/src/main/java/com/google/maps/solar/v1/BuildingInsightsOrBuilder.java @@ -368,4 +368,47 @@ public interface BuildingInsightsOrBuilder * @return The imageryQuality. */ com.google.maps.solar.v1.ImageryQuality getImageryQuality(); + + /** + * + * + *
+   * Solar arrays detected on the building. This field is only populated if
+   * DETECTED_ARRAYS is included in the request's
+   * [FindClosestBuildingInsightsRequest.additional_insights][google.maps.solar.v1.FindClosestBuildingInsightsRequest.additional_insights].
+   * 
+ * + * .google.maps.solar.v1.BuildingInsights.DetectedArrays detected_arrays = 12; + * + * @return Whether the detectedArrays field is set. + */ + boolean hasDetectedArrays(); + + /** + * + * + *
+   * Solar arrays detected on the building. This field is only populated if
+   * DETECTED_ARRAYS is included in the request's
+   * [FindClosestBuildingInsightsRequest.additional_insights][google.maps.solar.v1.FindClosestBuildingInsightsRequest.additional_insights].
+   * 
+ * + * .google.maps.solar.v1.BuildingInsights.DetectedArrays detected_arrays = 12; + * + * @return The detectedArrays. + */ + com.google.maps.solar.v1.BuildingInsights.DetectedArrays getDetectedArrays(); + + /** + * + * + *
+   * Solar arrays detected on the building. This field is only populated if
+   * DETECTED_ARRAYS is included in the request's
+   * [FindClosestBuildingInsightsRequest.additional_insights][google.maps.solar.v1.FindClosestBuildingInsightsRequest.additional_insights].
+   * 
+ * + * .google.maps.solar.v1.BuildingInsights.DetectedArrays detected_arrays = 12; + */ + com.google.maps.solar.v1.BuildingInsights.DetectedArraysOrBuilder getDetectedArraysOrBuilder(); } diff --git a/java-maps-solar/proto-google-maps-solar-v1/src/main/java/com/google/maps/solar/v1/DataLayerView.java b/java-maps-solar/proto-google-maps-solar-v1/src/main/java/com/google/maps/solar/v1/DataLayerView.java index a3d21a6e209b..0694430bfc75 100644 --- a/java-maps-solar/proto-google-maps-solar-v1/src/main/java/com/google/maps/solar/v1/DataLayerView.java +++ b/java-maps-solar/proto-google-maps-solar-v1/src/main/java/com/google/maps/solar/v1/DataLayerView.java @@ -235,7 +235,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType } public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.maps.solar.v1.SolarServiceProto.getDescriptor().getEnumTypes().get(0); + return com.google.maps.solar.v1.SolarServiceProto.getDescriptor().getEnumTypes().get(1); } private static final DataLayerView[] VALUES = values(); diff --git a/java-maps-solar/proto-google-maps-solar-v1/src/main/java/com/google/maps/solar/v1/Experiment.java b/java-maps-solar/proto-google-maps-solar-v1/src/main/java/com/google/maps/solar/v1/Experiment.java index 03089bdce4ae..ed5fe56d499f 100644 --- a/java-maps-solar/proto-google-maps-solar-v1/src/main/java/com/google/maps/solar/v1/Experiment.java +++ b/java-maps-solar/proto-google-maps-solar-v1/src/main/java/com/google/maps/solar/v1/Experiment.java @@ -156,7 +156,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType } public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.maps.solar.v1.SolarServiceProto.getDescriptor().getEnumTypes().get(3); + return com.google.maps.solar.v1.SolarServiceProto.getDescriptor().getEnumTypes().get(4); } private static final Experiment[] VALUES = values(); diff --git a/java-maps-solar/proto-google-maps-solar-v1/src/main/java/com/google/maps/solar/v1/FindClosestBuildingInsightsRequest.java b/java-maps-solar/proto-google-maps-solar-v1/src/main/java/com/google/maps/solar/v1/FindClosestBuildingInsightsRequest.java index 0b9a931275dd..9120742eff4a 100644 --- a/java-maps-solar/proto-google-maps-solar-v1/src/main/java/com/google/maps/solar/v1/FindClosestBuildingInsightsRequest.java +++ b/java-maps-solar/proto-google-maps-solar-v1/src/main/java/com/google/maps/solar/v1/FindClosestBuildingInsightsRequest.java @@ -55,6 +55,7 @@ private FindClosestBuildingInsightsRequest( private FindClosestBuildingInsightsRequest() { requiredQuality_ = 0; experiments_ = emptyIntList(); + additionalInsights_ = emptyIntList(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @@ -215,7 +216,13 @@ public com.google.maps.solar.v1.Experiment convert(int from) { * * *
-   * Optional. Specifies the pre-GA features to enable.
+   * Optional. Specifies the pre-GA experiments to enable. Requests using this
+   * field are classified as a pre-GA offering under the [Google Maps Platform
+   * Service Specific
+   * Terms](https://cloud.google.com/maps-platform/terms/maps-service-terms).
+   * See [launch stage
+   * descriptions](https://cloud.google.com/maps-platform/terms/launch-stages)
+   * for more details.
    * 
* * @@ -234,7 +241,13 @@ public java.util.List getExperimentsList() * * *
-   * Optional. Specifies the pre-GA features to enable.
+   * Optional. Specifies the pre-GA experiments to enable. Requests using this
+   * field are classified as a pre-GA offering under the [Google Maps Platform
+   * Service Specific
+   * Terms](https://cloud.google.com/maps-platform/terms/maps-service-terms).
+   * See [launch stage
+   * descriptions](https://cloud.google.com/maps-platform/terms/launch-stages)
+   * for more details.
    * 
* * @@ -252,7 +265,13 @@ public int getExperimentsCount() { * * *
-   * Optional. Specifies the pre-GA features to enable.
+   * Optional. Specifies the pre-GA experiments to enable. Requests using this
+   * field are classified as a pre-GA offering under the [Google Maps Platform
+   * Service Specific
+   * Terms](https://cloud.google.com/maps-platform/terms/maps-service-terms).
+   * See [launch stage
+   * descriptions](https://cloud.google.com/maps-platform/terms/launch-stages)
+   * for more details.
    * 
* * @@ -271,7 +290,13 @@ public com.google.maps.solar.v1.Experiment getExperiments(int index) { * * *
-   * Optional. Specifies the pre-GA features to enable.
+   * Optional. Specifies the pre-GA experiments to enable. Requests using this
+   * field are classified as a pre-GA offering under the [Google Maps Platform
+   * Service Specific
+   * Terms](https://cloud.google.com/maps-platform/terms/maps-service-terms).
+   * See [launch stage
+   * descriptions](https://cloud.google.com/maps-platform/terms/launch-stages)
+   * for more details.
    * 
* * @@ -289,7 +314,13 @@ public java.util.List getExperimentsValueList() { * * *
-   * Optional. Specifies the pre-GA features to enable.
+   * Optional. Specifies the pre-GA experiments to enable. Requests using this
+   * field are classified as a pre-GA offering under the [Google Maps Platform
+   * Service Specific
+   * Terms](https://cloud.google.com/maps-platform/terms/maps-service-terms).
+   * See [launch stage
+   * descriptions](https://cloud.google.com/maps-platform/terms/launch-stages)
+   * for more details.
    * 
* * @@ -306,6 +337,131 @@ public int getExperimentsValue(int index) { private int experimentsMemoizedSerializedSize; + public static final int ADDITIONAL_INSIGHTS_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private com.google.protobuf.Internal.IntList additionalInsights_ = emptyIntList(); + + private static final com.google.protobuf.Internal.IntListAdapter.IntConverter< + com.google.maps.solar.v1.AdditionalInsights> + additionalInsights_converter_ = + new com.google.protobuf.Internal.IntListAdapter.IntConverter< + com.google.maps.solar.v1.AdditionalInsights>() { + public com.google.maps.solar.v1.AdditionalInsights convert(int from) { + com.google.maps.solar.v1.AdditionalInsights result = + com.google.maps.solar.v1.AdditionalInsights.forNumber(from); + return result == null + ? com.google.maps.solar.v1.AdditionalInsights.UNRECOGNIZED + : result; + } + }; + + /** + * + * + *
+   * Optional. A list of
+   * [additional_insights][google.maps.solar.v1.FindClosestBuildingInsightsRequest.additional_insights]
+   * to be included in the response.
+   * 
+ * + * + * repeated .google.maps.solar.v1.AdditionalInsights additional_insights = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the additionalInsights. + */ + @java.lang.Override + public java.util.List getAdditionalInsightsList() { + return new com.google.protobuf.Internal.IntListAdapter< + com.google.maps.solar.v1.AdditionalInsights>( + additionalInsights_, additionalInsights_converter_); + } + + /** + * + * + *
+   * Optional. A list of
+   * [additional_insights][google.maps.solar.v1.FindClosestBuildingInsightsRequest.additional_insights]
+   * to be included in the response.
+   * 
+ * + * + * repeated .google.maps.solar.v1.AdditionalInsights additional_insights = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of additionalInsights. + */ + @java.lang.Override + public int getAdditionalInsightsCount() { + return additionalInsights_.size(); + } + + /** + * + * + *
+   * Optional. A list of
+   * [additional_insights][google.maps.solar.v1.FindClosestBuildingInsightsRequest.additional_insights]
+   * to be included in the response.
+   * 
+ * + * + * repeated .google.maps.solar.v1.AdditionalInsights additional_insights = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The additionalInsights at the given index. + */ + @java.lang.Override + public com.google.maps.solar.v1.AdditionalInsights getAdditionalInsights(int index) { + return additionalInsights_converter_.convert(additionalInsights_.getInt(index)); + } + + /** + * + * + *
+   * Optional. A list of
+   * [additional_insights][google.maps.solar.v1.FindClosestBuildingInsightsRequest.additional_insights]
+   * to be included in the response.
+   * 
+ * + * + * repeated .google.maps.solar.v1.AdditionalInsights additional_insights = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the enum numeric values on the wire for additionalInsights. + */ + @java.lang.Override + public java.util.List getAdditionalInsightsValueList() { + return additionalInsights_; + } + + /** + * + * + *
+   * Optional. A list of
+   * [additional_insights][google.maps.solar.v1.FindClosestBuildingInsightsRequest.additional_insights]
+   * to be included in the response.
+   * 
+ * + * + * repeated .google.maps.solar.v1.AdditionalInsights additional_insights = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of additionalInsights at the given index. + */ + @java.lang.Override + public int getAdditionalInsightsValue(int index) { + return additionalInsights_.getInt(index); + } + + private int additionalInsightsMemoizedSerializedSize; + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -338,6 +494,13 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < experiments_.size(); i++) { output.writeEnumNoTag(experiments_.getInt(i)); } + if (getAdditionalInsightsList().size() > 0) { + output.writeUInt32NoTag(50); + output.writeUInt32NoTag(additionalInsightsMemoizedSerializedSize); + } + for (int i = 0; i < additionalInsights_.size(); i++) { + output.writeEnumNoTag(additionalInsights_.getInt(i)); + } getUnknownFields().writeTo(output); } @@ -370,6 +533,20 @@ public int getSerializedSize() { } experimentsMemoizedSerializedSize = dataSize; } + { + int dataSize = 0; + for (int i = 0; i < additionalInsights_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag( + additionalInsights_.getInt(i)); + } + size += dataSize; + if (!getAdditionalInsightsList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + additionalInsightsMemoizedSerializedSize = dataSize; + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -393,6 +570,7 @@ public boolean equals(final java.lang.Object obj) { if (requiredQuality_ != other.requiredQuality_) return false; if (getExactQualityRequired() != other.getExactQualityRequired()) return false; if (!experiments_.equals(other.experiments_)) return false; + if (!additionalInsights_.equals(other.additionalInsights_)) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -416,6 +594,10 @@ public int hashCode() { hash = (37 * hash) + EXPERIMENTS_FIELD_NUMBER; hash = (53 * hash) + experiments_.hashCode(); } + if (getAdditionalInsightsCount() > 0) { + hash = (37 * hash) + ADDITIONAL_INSIGHTS_FIELD_NUMBER; + hash = (53 * hash) + additionalInsights_.hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -574,6 +756,7 @@ public Builder clear() { requiredQuality_ = 0; exactQualityRequired_ = false; experiments_ = emptyIntList(); + additionalInsights_ = emptyIntList(); return this; } @@ -625,6 +808,10 @@ private void buildPartial0(com.google.maps.solar.v1.FindClosestBuildingInsightsR experiments_.makeImmutable(); result.experiments_ = experiments_; } + if (((from_bitField0_ & 0x00000010) != 0)) { + additionalInsights_.makeImmutable(); + result.additionalInsights_ = additionalInsights_; + } result.bitField0_ |= to_bitField0_; } @@ -661,6 +848,17 @@ public Builder mergeFrom(com.google.maps.solar.v1.FindClosestBuildingInsightsReq } onChanged(); } + if (!other.additionalInsights_.isEmpty()) { + if (additionalInsights_.isEmpty()) { + additionalInsights_ = other.additionalInsights_; + additionalInsights_.makeImmutable(); + bitField0_ |= 0x00000010; + } else { + ensureAdditionalInsightsIsMutable(); + additionalInsights_.addAll(other.additionalInsights_); + } + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -724,6 +922,24 @@ public Builder mergeFrom( input.popLimit(limit); break; } // case 42 + case 48: + { + int tmpRaw = input.readEnum(); + ensureAdditionalInsightsIsMutable(); + additionalInsights_.addInt(tmpRaw); + break; + } // case 48 + case 50: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureAdditionalInsightsIsMutable(); + while (input.getBytesUntilLimit() > 0) { + additionalInsights_.addInt(input.readEnum()); + } + input.popLimit(limit); + break; + } // case 50 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1136,7 +1352,13 @@ private void ensureExperimentsIsMutable() { * * *
-     * Optional. Specifies the pre-GA features to enable.
+     * Optional. Specifies the pre-GA experiments to enable. Requests using this
+     * field are classified as a pre-GA offering under the [Google Maps Platform
+     * Service Specific
+     * Terms](https://cloud.google.com/maps-platform/terms/maps-service-terms).
+     * See [launch stage
+     * descriptions](https://cloud.google.com/maps-platform/terms/launch-stages)
+     * for more details.
      * 
* * @@ -1154,7 +1376,13 @@ public java.util.List getExperimentsList() * * *
-     * Optional. Specifies the pre-GA features to enable.
+     * Optional. Specifies the pre-GA experiments to enable. Requests using this
+     * field are classified as a pre-GA offering under the [Google Maps Platform
+     * Service Specific
+     * Terms](https://cloud.google.com/maps-platform/terms/maps-service-terms).
+     * See [launch stage
+     * descriptions](https://cloud.google.com/maps-platform/terms/launch-stages)
+     * for more details.
      * 
* * @@ -1171,7 +1399,13 @@ public int getExperimentsCount() { * * *
-     * Optional. Specifies the pre-GA features to enable.
+     * Optional. Specifies the pre-GA experiments to enable. Requests using this
+     * field are classified as a pre-GA offering under the [Google Maps Platform
+     * Service Specific
+     * Terms](https://cloud.google.com/maps-platform/terms/maps-service-terms).
+     * See [launch stage
+     * descriptions](https://cloud.google.com/maps-platform/terms/launch-stages)
+     * for more details.
      * 
* * @@ -1189,7 +1423,13 @@ public com.google.maps.solar.v1.Experiment getExperiments(int index) { * * *
-     * Optional. Specifies the pre-GA features to enable.
+     * Optional. Specifies the pre-GA experiments to enable. Requests using this
+     * field are classified as a pre-GA offering under the [Google Maps Platform
+     * Service Specific
+     * Terms](https://cloud.google.com/maps-platform/terms/maps-service-terms).
+     * See [launch stage
+     * descriptions](https://cloud.google.com/maps-platform/terms/launch-stages)
+     * for more details.
      * 
* * @@ -1214,7 +1454,13 @@ public Builder setExperiments(int index, com.google.maps.solar.v1.Experiment val * * *
-     * Optional. Specifies the pre-GA features to enable.
+     * Optional. Specifies the pre-GA experiments to enable. Requests using this
+     * field are classified as a pre-GA offering under the [Google Maps Platform
+     * Service Specific
+     * Terms](https://cloud.google.com/maps-platform/terms/maps-service-terms).
+     * See [launch stage
+     * descriptions](https://cloud.google.com/maps-platform/terms/launch-stages)
+     * for more details.
      * 
* * @@ -1238,7 +1484,13 @@ public Builder addExperiments(com.google.maps.solar.v1.Experiment value) { * * *
-     * Optional. Specifies the pre-GA features to enable.
+     * Optional. Specifies the pre-GA experiments to enable. Requests using this
+     * field are classified as a pre-GA offering under the [Google Maps Platform
+     * Service Specific
+     * Terms](https://cloud.google.com/maps-platform/terms/maps-service-terms).
+     * See [launch stage
+     * descriptions](https://cloud.google.com/maps-platform/terms/launch-stages)
+     * for more details.
      * 
* * @@ -1262,7 +1514,13 @@ public Builder addAllExperiments( * * *
-     * Optional. Specifies the pre-GA features to enable.
+     * Optional. Specifies the pre-GA experiments to enable. Requests using this
+     * field are classified as a pre-GA offering under the [Google Maps Platform
+     * Service Specific
+     * Terms](https://cloud.google.com/maps-platform/terms/maps-service-terms).
+     * See [launch stage
+     * descriptions](https://cloud.google.com/maps-platform/terms/launch-stages)
+     * for more details.
      * 
* * @@ -1282,7 +1540,13 @@ public Builder clearExperiments() { * * *
-     * Optional. Specifies the pre-GA features to enable.
+     * Optional. Specifies the pre-GA experiments to enable. Requests using this
+     * field are classified as a pre-GA offering under the [Google Maps Platform
+     * Service Specific
+     * Terms](https://cloud.google.com/maps-platform/terms/maps-service-terms).
+     * See [launch stage
+     * descriptions](https://cloud.google.com/maps-platform/terms/launch-stages)
+     * for more details.
      * 
* * @@ -1300,7 +1564,13 @@ public java.util.List getExperimentsValueList() { * * *
-     * Optional. Specifies the pre-GA features to enable.
+     * Optional. Specifies the pre-GA experiments to enable. Requests using this
+     * field are classified as a pre-GA offering under the [Google Maps Platform
+     * Service Specific
+     * Terms](https://cloud.google.com/maps-platform/terms/maps-service-terms).
+     * See [launch stage
+     * descriptions](https://cloud.google.com/maps-platform/terms/launch-stages)
+     * for more details.
      * 
* * @@ -1318,7 +1588,13 @@ public int getExperimentsValue(int index) { * * *
-     * Optional. Specifies the pre-GA features to enable.
+     * Optional. Specifies the pre-GA experiments to enable. Requests using this
+     * field are classified as a pre-GA offering under the [Google Maps Platform
+     * Service Specific
+     * Terms](https://cloud.google.com/maps-platform/terms/maps-service-terms).
+     * See [launch stage
+     * descriptions](https://cloud.google.com/maps-platform/terms/launch-stages)
+     * for more details.
      * 
* * @@ -1340,7 +1616,13 @@ public Builder setExperimentsValue(int index, int value) { * * *
-     * Optional. Specifies the pre-GA features to enable.
+     * Optional. Specifies the pre-GA experiments to enable. Requests using this
+     * field are classified as a pre-GA offering under the [Google Maps Platform
+     * Service Specific
+     * Terms](https://cloud.google.com/maps-platform/terms/maps-service-terms).
+     * See [launch stage
+     * descriptions](https://cloud.google.com/maps-platform/terms/launch-stages)
+     * for more details.
      * 
* * @@ -1361,7 +1643,13 @@ public Builder addExperimentsValue(int value) { * * *
-     * Optional. Specifies the pre-GA features to enable.
+     * Optional. Specifies the pre-GA experiments to enable. Requests using this
+     * field are classified as a pre-GA offering under the [Google Maps Platform
+     * Service Specific
+     * Terms](https://cloud.google.com/maps-platform/terms/maps-service-terms).
+     * See [launch stage
+     * descriptions](https://cloud.google.com/maps-platform/terms/launch-stages)
+     * for more details.
      * 
* * @@ -1380,6 +1668,289 @@ public Builder addAllExperimentsValue(java.lang.Iterable valu return this; } + private com.google.protobuf.Internal.IntList additionalInsights_ = emptyIntList(); + + private void ensureAdditionalInsightsIsMutable() { + if (!additionalInsights_.isModifiable()) { + additionalInsights_ = makeMutableCopy(additionalInsights_); + } + bitField0_ |= 0x00000010; + } + + /** + * + * + *
+     * Optional. A list of
+     * [additional_insights][google.maps.solar.v1.FindClosestBuildingInsightsRequest.additional_insights]
+     * to be included in the response.
+     * 
+ * + * + * repeated .google.maps.solar.v1.AdditionalInsights additional_insights = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the additionalInsights. + */ + public java.util.List getAdditionalInsightsList() { + return new com.google.protobuf.Internal.IntListAdapter< + com.google.maps.solar.v1.AdditionalInsights>( + additionalInsights_, additionalInsights_converter_); + } + + /** + * + * + *
+     * Optional. A list of
+     * [additional_insights][google.maps.solar.v1.FindClosestBuildingInsightsRequest.additional_insights]
+     * to be included in the response.
+     * 
+ * + * + * repeated .google.maps.solar.v1.AdditionalInsights additional_insights = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of additionalInsights. + */ + public int getAdditionalInsightsCount() { + return additionalInsights_.size(); + } + + /** + * + * + *
+     * Optional. A list of
+     * [additional_insights][google.maps.solar.v1.FindClosestBuildingInsightsRequest.additional_insights]
+     * to be included in the response.
+     * 
+ * + * + * repeated .google.maps.solar.v1.AdditionalInsights additional_insights = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The additionalInsights at the given index. + */ + public com.google.maps.solar.v1.AdditionalInsights getAdditionalInsights(int index) { + return additionalInsights_converter_.convert(additionalInsights_.getInt(index)); + } + + /** + * + * + *
+     * Optional. A list of
+     * [additional_insights][google.maps.solar.v1.FindClosestBuildingInsightsRequest.additional_insights]
+     * to be included in the response.
+     * 
+ * + * + * repeated .google.maps.solar.v1.AdditionalInsights additional_insights = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The additionalInsights to set. + * @return This builder for chaining. + */ + public Builder setAdditionalInsights( + int index, com.google.maps.solar.v1.AdditionalInsights value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAdditionalInsightsIsMutable(); + additionalInsights_.setInt(index, value.getNumber()); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A list of
+     * [additional_insights][google.maps.solar.v1.FindClosestBuildingInsightsRequest.additional_insights]
+     * to be included in the response.
+     * 
+ * + * + * repeated .google.maps.solar.v1.AdditionalInsights additional_insights = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The additionalInsights to add. + * @return This builder for chaining. + */ + public Builder addAdditionalInsights(com.google.maps.solar.v1.AdditionalInsights value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAdditionalInsightsIsMutable(); + additionalInsights_.addInt(value.getNumber()); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A list of
+     * [additional_insights][google.maps.solar.v1.FindClosestBuildingInsightsRequest.additional_insights]
+     * to be included in the response.
+     * 
+ * + * + * repeated .google.maps.solar.v1.AdditionalInsights additional_insights = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The additionalInsights to add. + * @return This builder for chaining. + */ + public Builder addAllAdditionalInsights( + java.lang.Iterable values) { + ensureAdditionalInsightsIsMutable(); + for (com.google.maps.solar.v1.AdditionalInsights value : values) { + additionalInsights_.addInt(value.getNumber()); + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A list of
+     * [additional_insights][google.maps.solar.v1.FindClosestBuildingInsightsRequest.additional_insights]
+     * to be included in the response.
+     * 
+ * + * + * repeated .google.maps.solar.v1.AdditionalInsights additional_insights = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearAdditionalInsights() { + additionalInsights_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A list of
+     * [additional_insights][google.maps.solar.v1.FindClosestBuildingInsightsRequest.additional_insights]
+     * to be included in the response.
+     * 
+ * + * + * repeated .google.maps.solar.v1.AdditionalInsights additional_insights = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the enum numeric values on the wire for additionalInsights. + */ + public java.util.List getAdditionalInsightsValueList() { + additionalInsights_.makeImmutable(); + return additionalInsights_; + } + + /** + * + * + *
+     * Optional. A list of
+     * [additional_insights][google.maps.solar.v1.FindClosestBuildingInsightsRequest.additional_insights]
+     * to be included in the response.
+     * 
+ * + * + * repeated .google.maps.solar.v1.AdditionalInsights additional_insights = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of additionalInsights at the given index. + */ + public int getAdditionalInsightsValue(int index) { + return additionalInsights_.getInt(index); + } + + /** + * + * + *
+     * Optional. A list of
+     * [additional_insights][google.maps.solar.v1.FindClosestBuildingInsightsRequest.additional_insights]
+     * to be included in the response.
+     * 
+ * + * + * repeated .google.maps.solar.v1.AdditionalInsights additional_insights = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for additionalInsights to set. + * @return This builder for chaining. + */ + public Builder setAdditionalInsightsValue(int index, int value) { + ensureAdditionalInsightsIsMutable(); + additionalInsights_.setInt(index, value); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A list of
+     * [additional_insights][google.maps.solar.v1.FindClosestBuildingInsightsRequest.additional_insights]
+     * to be included in the response.
+     * 
+ * + * + * repeated .google.maps.solar.v1.AdditionalInsights additional_insights = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for additionalInsights to add. + * @return This builder for chaining. + */ + public Builder addAdditionalInsightsValue(int value) { + ensureAdditionalInsightsIsMutable(); + additionalInsights_.addInt(value); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A list of
+     * [additional_insights][google.maps.solar.v1.FindClosestBuildingInsightsRequest.additional_insights]
+     * to be included in the response.
+     * 
+ * + * + * repeated .google.maps.solar.v1.AdditionalInsights additional_insights = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The enum numeric values on the wire for additionalInsights to add. + * @return This builder for chaining. + */ + public Builder addAllAdditionalInsightsValue(java.lang.Iterable values) { + ensureAdditionalInsightsIsMutable(); + for (int value : values) { + additionalInsights_.addInt(value); + } + onChanged(); + return this; + } + // @@protoc_insertion_point(builder_scope:google.maps.solar.v1.FindClosestBuildingInsightsRequest) } diff --git a/java-maps-solar/proto-google-maps-solar-v1/src/main/java/com/google/maps/solar/v1/FindClosestBuildingInsightsRequestOrBuilder.java b/java-maps-solar/proto-google-maps-solar-v1/src/main/java/com/google/maps/solar/v1/FindClosestBuildingInsightsRequestOrBuilder.java index 2fd3b39ba138..5a874a440650 100644 --- a/java-maps-solar/proto-google-maps-solar-v1/src/main/java/com/google/maps/solar/v1/FindClosestBuildingInsightsRequestOrBuilder.java +++ b/java-maps-solar/proto-google-maps-solar-v1/src/main/java/com/google/maps/solar/v1/FindClosestBuildingInsightsRequestOrBuilder.java @@ -122,7 +122,13 @@ public interface FindClosestBuildingInsightsRequestOrBuilder * * *
-   * Optional. Specifies the pre-GA features to enable.
+   * Optional. Specifies the pre-GA experiments to enable. Requests using this
+   * field are classified as a pre-GA offering under the [Google Maps Platform
+   * Service Specific
+   * Terms](https://cloud.google.com/maps-platform/terms/maps-service-terms).
+   * See [launch stage
+   * descriptions](https://cloud.google.com/maps-platform/terms/launch-stages)
+   * for more details.
    * 
* * @@ -137,7 +143,13 @@ public interface FindClosestBuildingInsightsRequestOrBuilder * * *
-   * Optional. Specifies the pre-GA features to enable.
+   * Optional. Specifies the pre-GA experiments to enable. Requests using this
+   * field are classified as a pre-GA offering under the [Google Maps Platform
+   * Service Specific
+   * Terms](https://cloud.google.com/maps-platform/terms/maps-service-terms).
+   * See [launch stage
+   * descriptions](https://cloud.google.com/maps-platform/terms/launch-stages)
+   * for more details.
    * 
* * @@ -152,7 +164,13 @@ public interface FindClosestBuildingInsightsRequestOrBuilder * * *
-   * Optional. Specifies the pre-GA features to enable.
+   * Optional. Specifies the pre-GA experiments to enable. Requests using this
+   * field are classified as a pre-GA offering under the [Google Maps Platform
+   * Service Specific
+   * Terms](https://cloud.google.com/maps-platform/terms/maps-service-terms).
+   * See [launch stage
+   * descriptions](https://cloud.google.com/maps-platform/terms/launch-stages)
+   * for more details.
    * 
* * @@ -168,7 +186,13 @@ public interface FindClosestBuildingInsightsRequestOrBuilder * * *
-   * Optional. Specifies the pre-GA features to enable.
+   * Optional. Specifies the pre-GA experiments to enable. Requests using this
+   * field are classified as a pre-GA offering under the [Google Maps Platform
+   * Service Specific
+   * Terms](https://cloud.google.com/maps-platform/terms/maps-service-terms).
+   * See [launch stage
+   * descriptions](https://cloud.google.com/maps-platform/terms/launch-stages)
+   * for more details.
    * 
* * @@ -183,7 +207,13 @@ public interface FindClosestBuildingInsightsRequestOrBuilder * * *
-   * Optional. Specifies the pre-GA features to enable.
+   * Optional. Specifies the pre-GA experiments to enable. Requests using this
+   * field are classified as a pre-GA offering under the [Google Maps Platform
+   * Service Specific
+   * Terms](https://cloud.google.com/maps-platform/terms/maps-service-terms).
+   * See [launch stage
+   * descriptions](https://cloud.google.com/maps-platform/terms/launch-stages)
+   * for more details.
    * 
* * @@ -194,4 +224,91 @@ public interface FindClosestBuildingInsightsRequestOrBuilder * @return The enum numeric value on the wire of experiments at the given index. */ int getExperimentsValue(int index); + + /** + * + * + *
+   * Optional. A list of
+   * [additional_insights][google.maps.solar.v1.FindClosestBuildingInsightsRequest.additional_insights]
+   * to be included in the response.
+   * 
+ * + * + * repeated .google.maps.solar.v1.AdditionalInsights additional_insights = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the additionalInsights. + */ + java.util.List getAdditionalInsightsList(); + + /** + * + * + *
+   * Optional. A list of
+   * [additional_insights][google.maps.solar.v1.FindClosestBuildingInsightsRequest.additional_insights]
+   * to be included in the response.
+   * 
+ * + * + * repeated .google.maps.solar.v1.AdditionalInsights additional_insights = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of additionalInsights. + */ + int getAdditionalInsightsCount(); + + /** + * + * + *
+   * Optional. A list of
+   * [additional_insights][google.maps.solar.v1.FindClosestBuildingInsightsRequest.additional_insights]
+   * to be included in the response.
+   * 
+ * + * + * repeated .google.maps.solar.v1.AdditionalInsights additional_insights = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The additionalInsights at the given index. + */ + com.google.maps.solar.v1.AdditionalInsights getAdditionalInsights(int index); + + /** + * + * + *
+   * Optional. A list of
+   * [additional_insights][google.maps.solar.v1.FindClosestBuildingInsightsRequest.additional_insights]
+   * to be included in the response.
+   * 
+ * + * + * repeated .google.maps.solar.v1.AdditionalInsights additional_insights = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the enum numeric values on the wire for additionalInsights. + */ + java.util.List getAdditionalInsightsValueList(); + + /** + * + * + *
+   * Optional. A list of
+   * [additional_insights][google.maps.solar.v1.FindClosestBuildingInsightsRequest.additional_insights]
+   * to be included in the response.
+   * 
+ * + * + * repeated .google.maps.solar.v1.AdditionalInsights additional_insights = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of additionalInsights at the given index. + */ + int getAdditionalInsightsValue(int index); } diff --git a/java-maps-solar/proto-google-maps-solar-v1/src/main/java/com/google/maps/solar/v1/GetDataLayersRequest.java b/java-maps-solar/proto-google-maps-solar-v1/src/main/java/com/google/maps/solar/v1/GetDataLayersRequest.java index 81d8bdd05470..8babfeeb23b2 100644 --- a/java-maps-solar/proto-google-maps-solar-v1/src/main/java/com/google/maps/solar/v1/GetDataLayersRequest.java +++ b/java-maps-solar/proto-google-maps-solar-v1/src/main/java/com/google/maps/solar/v1/GetDataLayersRequest.java @@ -306,7 +306,13 @@ public com.google.maps.solar.v1.Experiment convert(int from) { * * *
-   * Optional. Specifies the pre-GA experiments to enable.
+   * Optional. Specifies the pre-GA experiments to enable. Requests using this
+   * field are classified as a pre-GA offering under the [Google Maps Platform
+   * Service Specific
+   * Terms](https://cloud.google.com/maps-platform/terms/maps-service-terms).
+   * See [launch stage descriptions](
+   * https://cloud.google.com/maps-platform/terms/launch-stages) for more
+   * details.
    * 
* * @@ -325,7 +331,13 @@ public java.util.List getExperimentsList() * * *
-   * Optional. Specifies the pre-GA experiments to enable.
+   * Optional. Specifies the pre-GA experiments to enable. Requests using this
+   * field are classified as a pre-GA offering under the [Google Maps Platform
+   * Service Specific
+   * Terms](https://cloud.google.com/maps-platform/terms/maps-service-terms).
+   * See [launch stage descriptions](
+   * https://cloud.google.com/maps-platform/terms/launch-stages) for more
+   * details.
    * 
* * @@ -343,7 +355,13 @@ public int getExperimentsCount() { * * *
-   * Optional. Specifies the pre-GA experiments to enable.
+   * Optional. Specifies the pre-GA experiments to enable. Requests using this
+   * field are classified as a pre-GA offering under the [Google Maps Platform
+   * Service Specific
+   * Terms](https://cloud.google.com/maps-platform/terms/maps-service-terms).
+   * See [launch stage descriptions](
+   * https://cloud.google.com/maps-platform/terms/launch-stages) for more
+   * details.
    * 
* * @@ -362,7 +380,13 @@ public com.google.maps.solar.v1.Experiment getExperiments(int index) { * * *
-   * Optional. Specifies the pre-GA experiments to enable.
+   * Optional. Specifies the pre-GA experiments to enable. Requests using this
+   * field are classified as a pre-GA offering under the [Google Maps Platform
+   * Service Specific
+   * Terms](https://cloud.google.com/maps-platform/terms/maps-service-terms).
+   * See [launch stage descriptions](
+   * https://cloud.google.com/maps-platform/terms/launch-stages) for more
+   * details.
    * 
* * @@ -380,7 +404,13 @@ public java.util.List getExperimentsValueList() { * * *
-   * Optional. Specifies the pre-GA experiments to enable.
+   * Optional. Specifies the pre-GA experiments to enable. Requests using this
+   * field are classified as a pre-GA offering under the [Google Maps Platform
+   * Service Specific
+   * Terms](https://cloud.google.com/maps-platform/terms/maps-service-terms).
+   * See [launch stage descriptions](
+   * https://cloud.google.com/maps-platform/terms/launch-stages) for more
+   * details.
    * 
* * @@ -1547,7 +1577,13 @@ private void ensureExperimentsIsMutable() { * * *
-     * Optional. Specifies the pre-GA experiments to enable.
+     * Optional. Specifies the pre-GA experiments to enable. Requests using this
+     * field are classified as a pre-GA offering under the [Google Maps Platform
+     * Service Specific
+     * Terms](https://cloud.google.com/maps-platform/terms/maps-service-terms).
+     * See [launch stage descriptions](
+     * https://cloud.google.com/maps-platform/terms/launch-stages) for more
+     * details.
      * 
* * @@ -1565,7 +1601,13 @@ public java.util.List getExperimentsList() * * *
-     * Optional. Specifies the pre-GA experiments to enable.
+     * Optional. Specifies the pre-GA experiments to enable. Requests using this
+     * field are classified as a pre-GA offering under the [Google Maps Platform
+     * Service Specific
+     * Terms](https://cloud.google.com/maps-platform/terms/maps-service-terms).
+     * See [launch stage descriptions](
+     * https://cloud.google.com/maps-platform/terms/launch-stages) for more
+     * details.
      * 
* * @@ -1582,7 +1624,13 @@ public int getExperimentsCount() { * * *
-     * Optional. Specifies the pre-GA experiments to enable.
+     * Optional. Specifies the pre-GA experiments to enable. Requests using this
+     * field are classified as a pre-GA offering under the [Google Maps Platform
+     * Service Specific
+     * Terms](https://cloud.google.com/maps-platform/terms/maps-service-terms).
+     * See [launch stage descriptions](
+     * https://cloud.google.com/maps-platform/terms/launch-stages) for more
+     * details.
      * 
* * @@ -1600,7 +1648,13 @@ public com.google.maps.solar.v1.Experiment getExperiments(int index) { * * *
-     * Optional. Specifies the pre-GA experiments to enable.
+     * Optional. Specifies the pre-GA experiments to enable. Requests using this
+     * field are classified as a pre-GA offering under the [Google Maps Platform
+     * Service Specific
+     * Terms](https://cloud.google.com/maps-platform/terms/maps-service-terms).
+     * See [launch stage descriptions](
+     * https://cloud.google.com/maps-platform/terms/launch-stages) for more
+     * details.
      * 
* * @@ -1625,7 +1679,13 @@ public Builder setExperiments(int index, com.google.maps.solar.v1.Experiment val * * *
-     * Optional. Specifies the pre-GA experiments to enable.
+     * Optional. Specifies the pre-GA experiments to enable. Requests using this
+     * field are classified as a pre-GA offering under the [Google Maps Platform
+     * Service Specific
+     * Terms](https://cloud.google.com/maps-platform/terms/maps-service-terms).
+     * See [launch stage descriptions](
+     * https://cloud.google.com/maps-platform/terms/launch-stages) for more
+     * details.
      * 
* * @@ -1649,7 +1709,13 @@ public Builder addExperiments(com.google.maps.solar.v1.Experiment value) { * * *
-     * Optional. Specifies the pre-GA experiments to enable.
+     * Optional. Specifies the pre-GA experiments to enable. Requests using this
+     * field are classified as a pre-GA offering under the [Google Maps Platform
+     * Service Specific
+     * Terms](https://cloud.google.com/maps-platform/terms/maps-service-terms).
+     * See [launch stage descriptions](
+     * https://cloud.google.com/maps-platform/terms/launch-stages) for more
+     * details.
      * 
* * @@ -1673,7 +1739,13 @@ public Builder addAllExperiments( * * *
-     * Optional. Specifies the pre-GA experiments to enable.
+     * Optional. Specifies the pre-GA experiments to enable. Requests using this
+     * field are classified as a pre-GA offering under the [Google Maps Platform
+     * Service Specific
+     * Terms](https://cloud.google.com/maps-platform/terms/maps-service-terms).
+     * See [launch stage descriptions](
+     * https://cloud.google.com/maps-platform/terms/launch-stages) for more
+     * details.
      * 
* * @@ -1693,7 +1765,13 @@ public Builder clearExperiments() { * * *
-     * Optional. Specifies the pre-GA experiments to enable.
+     * Optional. Specifies the pre-GA experiments to enable. Requests using this
+     * field are classified as a pre-GA offering under the [Google Maps Platform
+     * Service Specific
+     * Terms](https://cloud.google.com/maps-platform/terms/maps-service-terms).
+     * See [launch stage descriptions](
+     * https://cloud.google.com/maps-platform/terms/launch-stages) for more
+     * details.
      * 
* * @@ -1711,7 +1789,13 @@ public java.util.List getExperimentsValueList() { * * *
-     * Optional. Specifies the pre-GA experiments to enable.
+     * Optional. Specifies the pre-GA experiments to enable. Requests using this
+     * field are classified as a pre-GA offering under the [Google Maps Platform
+     * Service Specific
+     * Terms](https://cloud.google.com/maps-platform/terms/maps-service-terms).
+     * See [launch stage descriptions](
+     * https://cloud.google.com/maps-platform/terms/launch-stages) for more
+     * details.
      * 
* * @@ -1729,7 +1813,13 @@ public int getExperimentsValue(int index) { * * *
-     * Optional. Specifies the pre-GA experiments to enable.
+     * Optional. Specifies the pre-GA experiments to enable. Requests using this
+     * field are classified as a pre-GA offering under the [Google Maps Platform
+     * Service Specific
+     * Terms](https://cloud.google.com/maps-platform/terms/maps-service-terms).
+     * See [launch stage descriptions](
+     * https://cloud.google.com/maps-platform/terms/launch-stages) for more
+     * details.
      * 
* * @@ -1751,7 +1841,13 @@ public Builder setExperimentsValue(int index, int value) { * * *
-     * Optional. Specifies the pre-GA experiments to enable.
+     * Optional. Specifies the pre-GA experiments to enable. Requests using this
+     * field are classified as a pre-GA offering under the [Google Maps Platform
+     * Service Specific
+     * Terms](https://cloud.google.com/maps-platform/terms/maps-service-terms).
+     * See [launch stage descriptions](
+     * https://cloud.google.com/maps-platform/terms/launch-stages) for more
+     * details.
      * 
* * @@ -1772,7 +1868,13 @@ public Builder addExperimentsValue(int value) { * * *
-     * Optional. Specifies the pre-GA experiments to enable.
+     * Optional. Specifies the pre-GA experiments to enable. Requests using this
+     * field are classified as a pre-GA offering under the [Google Maps Platform
+     * Service Specific
+     * Terms](https://cloud.google.com/maps-platform/terms/maps-service-terms).
+     * See [launch stage descriptions](
+     * https://cloud.google.com/maps-platform/terms/launch-stages) for more
+     * details.
      * 
* * diff --git a/java-maps-solar/proto-google-maps-solar-v1/src/main/java/com/google/maps/solar/v1/GetDataLayersRequestOrBuilder.java b/java-maps-solar/proto-google-maps-solar-v1/src/main/java/com/google/maps/solar/v1/GetDataLayersRequestOrBuilder.java index 230b5ed65b8b..e29fbdfe646c 100644 --- a/java-maps-solar/proto-google-maps-solar-v1/src/main/java/com/google/maps/solar/v1/GetDataLayersRequestOrBuilder.java +++ b/java-maps-solar/proto-google-maps-solar-v1/src/main/java/com/google/maps/solar/v1/GetDataLayersRequestOrBuilder.java @@ -190,7 +190,13 @@ public interface GetDataLayersRequestOrBuilder * * *
-   * Optional. Specifies the pre-GA experiments to enable.
+   * Optional. Specifies the pre-GA experiments to enable. Requests using this
+   * field are classified as a pre-GA offering under the [Google Maps Platform
+   * Service Specific
+   * Terms](https://cloud.google.com/maps-platform/terms/maps-service-terms).
+   * See [launch stage descriptions](
+   * https://cloud.google.com/maps-platform/terms/launch-stages) for more
+   * details.
    * 
* * @@ -205,7 +211,13 @@ public interface GetDataLayersRequestOrBuilder * * *
-   * Optional. Specifies the pre-GA experiments to enable.
+   * Optional. Specifies the pre-GA experiments to enable. Requests using this
+   * field are classified as a pre-GA offering under the [Google Maps Platform
+   * Service Specific
+   * Terms](https://cloud.google.com/maps-platform/terms/maps-service-terms).
+   * See [launch stage descriptions](
+   * https://cloud.google.com/maps-platform/terms/launch-stages) for more
+   * details.
    * 
* * @@ -220,7 +232,13 @@ public interface GetDataLayersRequestOrBuilder * * *
-   * Optional. Specifies the pre-GA experiments to enable.
+   * Optional. Specifies the pre-GA experiments to enable. Requests using this
+   * field are classified as a pre-GA offering under the [Google Maps Platform
+   * Service Specific
+   * Terms](https://cloud.google.com/maps-platform/terms/maps-service-terms).
+   * See [launch stage descriptions](
+   * https://cloud.google.com/maps-platform/terms/launch-stages) for more
+   * details.
    * 
* * @@ -236,7 +254,13 @@ public interface GetDataLayersRequestOrBuilder * * *
-   * Optional. Specifies the pre-GA experiments to enable.
+   * Optional. Specifies the pre-GA experiments to enable. Requests using this
+   * field are classified as a pre-GA offering under the [Google Maps Platform
+   * Service Specific
+   * Terms](https://cloud.google.com/maps-platform/terms/maps-service-terms).
+   * See [launch stage descriptions](
+   * https://cloud.google.com/maps-platform/terms/launch-stages) for more
+   * details.
    * 
* * @@ -251,7 +275,13 @@ public interface GetDataLayersRequestOrBuilder * * *
-   * Optional. Specifies the pre-GA experiments to enable.
+   * Optional. Specifies the pre-GA experiments to enable. Requests using this
+   * field are classified as a pre-GA offering under the [Google Maps Platform
+   * Service Specific
+   * Terms](https://cloud.google.com/maps-platform/terms/maps-service-terms).
+   * See [launch stage descriptions](
+   * https://cloud.google.com/maps-platform/terms/launch-stages) for more
+   * details.
    * 
* * diff --git a/java-maps-solar/proto-google-maps-solar-v1/src/main/java/com/google/maps/solar/v1/ImageryQuality.java b/java-maps-solar/proto-google-maps-solar-v1/src/main/java/com/google/maps/solar/v1/ImageryQuality.java index f6fac9676e62..9aee2393d5e6 100644 --- a/java-maps-solar/proto-google-maps-solar-v1/src/main/java/com/google/maps/solar/v1/ImageryQuality.java +++ b/java-maps-solar/proto-google-maps-solar-v1/src/main/java/com/google/maps/solar/v1/ImageryQuality.java @@ -224,7 +224,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType } public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.maps.solar.v1.SolarServiceProto.getDescriptor().getEnumTypes().get(1); + return com.google.maps.solar.v1.SolarServiceProto.getDescriptor().getEnumTypes().get(2); } private static final ImageryQuality[] VALUES = values(); diff --git a/java-maps-solar/proto-google-maps-solar-v1/src/main/java/com/google/maps/solar/v1/SolarPanelOrientation.java b/java-maps-solar/proto-google-maps-solar-v1/src/main/java/com/google/maps/solar/v1/SolarPanelOrientation.java index 20fe21a9f85c..5c60a212f57d 100644 --- a/java-maps-solar/proto-google-maps-solar-v1/src/main/java/com/google/maps/solar/v1/SolarPanelOrientation.java +++ b/java-maps-solar/proto-google-maps-solar-v1/src/main/java/com/google/maps/solar/v1/SolarPanelOrientation.java @@ -173,7 +173,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType } public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.maps.solar.v1.SolarServiceProto.getDescriptor().getEnumTypes().get(2); + return com.google.maps.solar.v1.SolarServiceProto.getDescriptor().getEnumTypes().get(3); } private static final SolarPanelOrientation[] VALUES = values(); diff --git a/java-maps-solar/proto-google-maps-solar-v1/src/main/java/com/google/maps/solar/v1/SolarPotential.java b/java-maps-solar/proto-google-maps-solar-v1/src/main/java/com/google/maps/solar/v1/SolarPotential.java index 6772610b11c4..9a55fe5e83c7 100644 --- a/java-maps-solar/proto-google-maps-solar-v1/src/main/java/com/google/maps/solar/v1/SolarPotential.java +++ b/java-maps-solar/proto-google-maps-solar-v1/src/main/java/com/google/maps/solar/v1/SolarPotential.java @@ -479,7 +479,7 @@ public com.google.maps.solar.v1.RoofSegmentSizeAndSunshineStats getRoofSegmentSt * * *
-   * Each [SolarPanel] [google.maps.solar.v1.SolarPanel]
+   * Each [SolarPanel][google.maps.solar.v1.SolarPanel]
    * describes a single solar panel. They are listed in the order that
    * the panel layout algorithm placed this. This is usually, though
    * not always, in decreasing order of annual energy production.
@@ -496,7 +496,7 @@ public java.util.List getSolarPanelsList()
    *
    *
    * 
-   * Each [SolarPanel] [google.maps.solar.v1.SolarPanel]
+   * Each [SolarPanel][google.maps.solar.v1.SolarPanel]
    * describes a single solar panel. They are listed in the order that
    * the panel layout algorithm placed this. This is usually, though
    * not always, in decreasing order of annual energy production.
@@ -514,7 +514,7 @@ public java.util.List getSolarPanelsList()
    *
    *
    * 
-   * Each [SolarPanel] [google.maps.solar.v1.SolarPanel]
+   * Each [SolarPanel][google.maps.solar.v1.SolarPanel]
    * describes a single solar panel. They are listed in the order that
    * the panel layout algorithm placed this. This is usually, though
    * not always, in decreasing order of annual energy production.
@@ -531,7 +531,7 @@ public int getSolarPanelsCount() {
    *
    *
    * 
-   * Each [SolarPanel] [google.maps.solar.v1.SolarPanel]
+   * Each [SolarPanel][google.maps.solar.v1.SolarPanel]
    * describes a single solar panel. They are listed in the order that
    * the panel layout algorithm placed this. This is usually, though
    * not always, in decreasing order of annual energy production.
@@ -548,7 +548,7 @@ public com.google.maps.solar.v1.SolarPanel getSolarPanels(int index) {
    *
    *
    * 
-   * Each [SolarPanel] [google.maps.solar.v1.SolarPanel]
+   * Each [SolarPanel][google.maps.solar.v1.SolarPanel]
    * describes a single solar panel. They are listed in the order that
    * the panel layout algorithm placed this. This is usually, though
    * not always, in decreasing order of annual energy production.
@@ -3014,7 +3014,7 @@ private void ensureSolarPanelsIsMutable() {
      *
      *
      * 
-     * Each [SolarPanel] [google.maps.solar.v1.SolarPanel]
+     * Each [SolarPanel][google.maps.solar.v1.SolarPanel]
      * describes a single solar panel. They are listed in the order that
      * the panel layout algorithm placed this. This is usually, though
      * not always, in decreasing order of annual energy production.
@@ -3034,7 +3034,7 @@ public java.util.List getSolarPanelsList()
      *
      *
      * 
-     * Each [SolarPanel] [google.maps.solar.v1.SolarPanel]
+     * Each [SolarPanel][google.maps.solar.v1.SolarPanel]
      * describes a single solar panel. They are listed in the order that
      * the panel layout algorithm placed this. This is usually, though
      * not always, in decreasing order of annual energy production.
@@ -3054,7 +3054,7 @@ public int getSolarPanelsCount() {
      *
      *
      * 
-     * Each [SolarPanel] [google.maps.solar.v1.SolarPanel]
+     * Each [SolarPanel][google.maps.solar.v1.SolarPanel]
      * describes a single solar panel. They are listed in the order that
      * the panel layout algorithm placed this. This is usually, though
      * not always, in decreasing order of annual energy production.
@@ -3074,7 +3074,7 @@ public com.google.maps.solar.v1.SolarPanel getSolarPanels(int index) {
      *
      *
      * 
-     * Each [SolarPanel] [google.maps.solar.v1.SolarPanel]
+     * Each [SolarPanel][google.maps.solar.v1.SolarPanel]
      * describes a single solar panel. They are listed in the order that
      * the panel layout algorithm placed this. This is usually, though
      * not always, in decreasing order of annual energy production.
@@ -3100,7 +3100,7 @@ public Builder setSolarPanels(int index, com.google.maps.solar.v1.SolarPanel val
      *
      *
      * 
-     * Each [SolarPanel] [google.maps.solar.v1.SolarPanel]
+     * Each [SolarPanel][google.maps.solar.v1.SolarPanel]
      * describes a single solar panel. They are listed in the order that
      * the panel layout algorithm placed this. This is usually, though
      * not always, in decreasing order of annual energy production.
@@ -3124,7 +3124,7 @@ public Builder setSolarPanels(
      *
      *
      * 
-     * Each [SolarPanel] [google.maps.solar.v1.SolarPanel]
+     * Each [SolarPanel][google.maps.solar.v1.SolarPanel]
      * describes a single solar panel. They are listed in the order that
      * the panel layout algorithm placed this. This is usually, though
      * not always, in decreasing order of annual energy production.
@@ -3150,7 +3150,7 @@ public Builder addSolarPanels(com.google.maps.solar.v1.SolarPanel value) {
      *
      *
      * 
-     * Each [SolarPanel] [google.maps.solar.v1.SolarPanel]
+     * Each [SolarPanel][google.maps.solar.v1.SolarPanel]
      * describes a single solar panel. They are listed in the order that
      * the panel layout algorithm placed this. This is usually, though
      * not always, in decreasing order of annual energy production.
@@ -3176,7 +3176,7 @@ public Builder addSolarPanels(int index, com.google.maps.solar.v1.SolarPanel val
      *
      *
      * 
-     * Each [SolarPanel] [google.maps.solar.v1.SolarPanel]
+     * Each [SolarPanel][google.maps.solar.v1.SolarPanel]
      * describes a single solar panel. They are listed in the order that
      * the panel layout algorithm placed this. This is usually, though
      * not always, in decreasing order of annual energy production.
@@ -3199,7 +3199,7 @@ public Builder addSolarPanels(com.google.maps.solar.v1.SolarPanel.Builder builde
      *
      *
      * 
-     * Each [SolarPanel] [google.maps.solar.v1.SolarPanel]
+     * Each [SolarPanel][google.maps.solar.v1.SolarPanel]
      * describes a single solar panel. They are listed in the order that
      * the panel layout algorithm placed this. This is usually, though
      * not always, in decreasing order of annual energy production.
@@ -3223,7 +3223,7 @@ public Builder addSolarPanels(
      *
      *
      * 
-     * Each [SolarPanel] [google.maps.solar.v1.SolarPanel]
+     * Each [SolarPanel][google.maps.solar.v1.SolarPanel]
      * describes a single solar panel. They are listed in the order that
      * the panel layout algorithm placed this. This is usually, though
      * not always, in decreasing order of annual energy production.
@@ -3247,7 +3247,7 @@ public Builder addAllSolarPanels(
      *
      *
      * 
-     * Each [SolarPanel] [google.maps.solar.v1.SolarPanel]
+     * Each [SolarPanel][google.maps.solar.v1.SolarPanel]
      * describes a single solar panel. They are listed in the order that
      * the panel layout algorithm placed this. This is usually, though
      * not always, in decreasing order of annual energy production.
@@ -3270,7 +3270,7 @@ public Builder clearSolarPanels() {
      *
      *
      * 
-     * Each [SolarPanel] [google.maps.solar.v1.SolarPanel]
+     * Each [SolarPanel][google.maps.solar.v1.SolarPanel]
      * describes a single solar panel. They are listed in the order that
      * the panel layout algorithm placed this. This is usually, though
      * not always, in decreasing order of annual energy production.
@@ -3293,7 +3293,7 @@ public Builder removeSolarPanels(int index) {
      *
      *
      * 
-     * Each [SolarPanel] [google.maps.solar.v1.SolarPanel]
+     * Each [SolarPanel][google.maps.solar.v1.SolarPanel]
      * describes a single solar panel. They are listed in the order that
      * the panel layout algorithm placed this. This is usually, though
      * not always, in decreasing order of annual energy production.
@@ -3309,7 +3309,7 @@ public com.google.maps.solar.v1.SolarPanel.Builder getSolarPanelsBuilder(int ind
      *
      *
      * 
-     * Each [SolarPanel] [google.maps.solar.v1.SolarPanel]
+     * Each [SolarPanel][google.maps.solar.v1.SolarPanel]
      * describes a single solar panel. They are listed in the order that
      * the panel layout algorithm placed this. This is usually, though
      * not always, in decreasing order of annual energy production.
@@ -3329,7 +3329,7 @@ public com.google.maps.solar.v1.SolarPanelOrBuilder getSolarPanelsOrBuilder(int
      *
      *
      * 
-     * Each [SolarPanel] [google.maps.solar.v1.SolarPanel]
+     * Each [SolarPanel][google.maps.solar.v1.SolarPanel]
      * describes a single solar panel. They are listed in the order that
      * the panel layout algorithm placed this. This is usually, though
      * not always, in decreasing order of annual energy production.
@@ -3350,7 +3350,7 @@ public com.google.maps.solar.v1.SolarPanelOrBuilder getSolarPanelsOrBuilder(int
      *
      *
      * 
-     * Each [SolarPanel] [google.maps.solar.v1.SolarPanel]
+     * Each [SolarPanel][google.maps.solar.v1.SolarPanel]
      * describes a single solar panel. They are listed in the order that
      * the panel layout algorithm placed this. This is usually, though
      * not always, in decreasing order of annual energy production.
@@ -3367,7 +3367,7 @@ public com.google.maps.solar.v1.SolarPanel.Builder addSolarPanelsBuilder() {
      *
      *
      * 
-     * Each [SolarPanel] [google.maps.solar.v1.SolarPanel]
+     * Each [SolarPanel][google.maps.solar.v1.SolarPanel]
      * describes a single solar panel. They are listed in the order that
      * the panel layout algorithm placed this. This is usually, though
      * not always, in decreasing order of annual energy production.
@@ -3384,7 +3384,7 @@ public com.google.maps.solar.v1.SolarPanel.Builder addSolarPanelsBuilder(int ind
      *
      *
      * 
-     * Each [SolarPanel] [google.maps.solar.v1.SolarPanel]
+     * Each [SolarPanel][google.maps.solar.v1.SolarPanel]
      * describes a single solar panel. They are listed in the order that
      * the panel layout algorithm placed this. This is usually, though
      * not always, in decreasing order of annual energy production.
diff --git a/java-maps-solar/proto-google-maps-solar-v1/src/main/java/com/google/maps/solar/v1/SolarPotentialOrBuilder.java b/java-maps-solar/proto-google-maps-solar-v1/src/main/java/com/google/maps/solar/v1/SolarPotentialOrBuilder.java
index 0bb3df46a982..845877045170 100644
--- a/java-maps-solar/proto-google-maps-solar-v1/src/main/java/com/google/maps/solar/v1/SolarPotentialOrBuilder.java
+++ b/java-maps-solar/proto-google-maps-solar-v1/src/main/java/com/google/maps/solar/v1/SolarPotentialOrBuilder.java
@@ -316,7 +316,7 @@ com.google.maps.solar.v1.RoofSegmentSizeAndSunshineStatsOrBuilder getRoofSegment
    *
    *
    * 
-   * Each [SolarPanel] [google.maps.solar.v1.SolarPanel]
+   * Each [SolarPanel][google.maps.solar.v1.SolarPanel]
    * describes a single solar panel. They are listed in the order that
    * the panel layout algorithm placed this. This is usually, though
    * not always, in decreasing order of annual energy production.
@@ -330,7 +330,7 @@ com.google.maps.solar.v1.RoofSegmentSizeAndSunshineStatsOrBuilder getRoofSegment
    *
    *
    * 
-   * Each [SolarPanel] [google.maps.solar.v1.SolarPanel]
+   * Each [SolarPanel][google.maps.solar.v1.SolarPanel]
    * describes a single solar panel. They are listed in the order that
    * the panel layout algorithm placed this. This is usually, though
    * not always, in decreasing order of annual energy production.
@@ -344,7 +344,7 @@ com.google.maps.solar.v1.RoofSegmentSizeAndSunshineStatsOrBuilder getRoofSegment
    *
    *
    * 
-   * Each [SolarPanel] [google.maps.solar.v1.SolarPanel]
+   * Each [SolarPanel][google.maps.solar.v1.SolarPanel]
    * describes a single solar panel. They are listed in the order that
    * the panel layout algorithm placed this. This is usually, though
    * not always, in decreasing order of annual energy production.
@@ -358,7 +358,7 @@ com.google.maps.solar.v1.RoofSegmentSizeAndSunshineStatsOrBuilder getRoofSegment
    *
    *
    * 
-   * Each [SolarPanel] [google.maps.solar.v1.SolarPanel]
+   * Each [SolarPanel][google.maps.solar.v1.SolarPanel]
    * describes a single solar panel. They are listed in the order that
    * the panel layout algorithm placed this. This is usually, though
    * not always, in decreasing order of annual energy production.
@@ -373,7 +373,7 @@ com.google.maps.solar.v1.RoofSegmentSizeAndSunshineStatsOrBuilder getRoofSegment
    *
    *
    * 
-   * Each [SolarPanel] [google.maps.solar.v1.SolarPanel]
+   * Each [SolarPanel][google.maps.solar.v1.SolarPanel]
    * describes a single solar panel. They are listed in the order that
    * the panel layout algorithm placed this. This is usually, though
    * not always, in decreasing order of annual energy production.
diff --git a/java-maps-solar/proto-google-maps-solar-v1/src/main/java/com/google/maps/solar/v1/SolarServiceProto.java b/java-maps-solar/proto-google-maps-solar-v1/src/main/java/com/google/maps/solar/v1/SolarServiceProto.java
index e3eb6f530f39..8eba92701d60 100644
--- a/java-maps-solar/proto-google-maps-solar-v1/src/main/java/com/google/maps/solar/v1/SolarServiceProto.java
+++ b/java-maps-solar/proto-google-maps-solar-v1/src/main/java/com/google/maps/solar/v1/SolarServiceProto.java
@@ -52,6 +52,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r
       internal_static_google_maps_solar_v1_BuildingInsights_descriptor;
   static final com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_google_maps_solar_v1_BuildingInsights_fieldAccessorTable;
+  static final com.google.protobuf.Descriptors.Descriptor
+      internal_static_google_maps_solar_v1_BuildingInsights_DetectedArrays_descriptor;
+  static final com.google.protobuf.GeneratedMessage.FieldAccessorTable
+      internal_static_google_maps_solar_v1_BuildingInsights_DetectedArrays_fieldAccessorTable;
   static final com.google.protobuf.Descriptors.Descriptor
       internal_static_google_maps_solar_v1_SolarPotential_descriptor;
   static final com.google.protobuf.GeneratedMessage.FieldAccessorTable
@@ -127,16 +131,19 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
           + "otations.proto\032\027google/api/client.proto\032"
           + "\037google/api/field_behavior.proto\032\031google"
           + "/api/httpbody.proto\032\026google/type/date.pr"
-          + "oto\032\030google/type/latlng.proto\032\027google/type/money.proto\"\366\001\n"
+          + "oto\032\030google/type/latlng.proto\032\027google/type/money.proto\"\302\002\n"
           + "\"FindClosestBuildingInsightsRequest\022*\n"
           + "\010location\030\001 \001(\0132\023.google.type.LatLngB\003\340A\002\022C\n"
           + "\020required_quality\030\003 "
           + "\001(\0162$.google.maps.solar.v1.ImageryQualityB\003\340A\001\022#\n"
           + "\026exact_quality_required\030\004 \001(\010B\003\340A\001\022:\n"
-          + "\013experiments\030\005 \003(\0162 .google.maps.solar.v1.ExperimentB\003\340A\001\"M\n"
+          + "\013experiments\030\005 \003(\0162"
+          + " .google.maps.solar.v1.ExperimentB\003\340A\001\022J\n"
+          + "\023additional_insights\030\006"
+          + " \003(\0162(.google.maps.solar.v1.AdditionalInsightsB\003\340A\001\"M\n"
           + "\tLatLngBox\022\037\n"
           + "\002sw\030\001 \001(\0132\023.google.type.LatLng\022\037\n"
-          + "\002ne\030\002 \001(\0132\023.google.type.LatLng\"\267\003\n"
+          + "\002ne\030\002 \001(\0132\023.google.type.LatLng\"\327\006\n"
           + "\020BuildingInsights\022\014\n"
           + "\004name\030\001 \001(\t\022#\n"
           + "\006center\030\002 \001(\0132\023.google.type.LatLng\0225\n"
@@ -149,7 +156,18 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
           + "\013region_code\030\007 \001(\t\022=\n"
           + "\017solar_potential\030\010 \001(\0132$.google.maps.solar.v1.SolarPotential\022=\n"
           + "\017imagery_quality\030\n"
-          + " \001(\0162$.google.maps.solar.v1.ImageryQuality\"\262\005\n"
+          + " \001(\0162$.google.maps.solar.v1.ImageryQuality\022N\n"
+          + "\017detected_arrays\030\014"
+          + " \001(\01325.google.maps.solar.v1.BuildingInsights.DetectedArrays\032\315\002\n"
+          + "\016DetectedArrays\022_\n"
+          + "\020detection_status\030\001 \001(\0162E.google.maps."
+          + "solar.v1.BuildingInsights.DetectedArrays.DetectionStatus\022.\n"
+          + "\023latest_capture_date\030\003 \001(\0132\021.google.type.Date\"\251\001\n"
+          + "\017DetectionStatus\022 \n"
+          + "\034DETECTION_STATUS_UNSPECIFIED\020\000\022%\n"
+          + "!DETECTION_STATUS_DATA_UNAVAILABLE\020\001\022$\n"
+          + " DETECTION_STATUS_ARRAYS_DETECTED\020\002\022\'\n"
+          + "#DETECTION_STATUS_NO_ARRAYS_DETECTED\020\003\"\262\005\n"
           + "\016SolarPotential\022\036\n"
           + "\026max_array_panels_count\030\001 \001(\005\022\034\n"
           + "\024panel_capacity_watts\030\t \001(\002\022\033\n"
@@ -164,13 +182,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
           + " \001(\0132*.google.maps.solar.v1.SizeAndSunshineStats\022B\n"
           + "\016building_stats\030\r"
           + " \001(\0132*.google.maps.solar.v1.SizeAndSunshineStats\022Q\n"
-          + "\022roof_segment_stats\030\006 \003(\01325.google.ma"
-          + "ps.solar.v1.RoofSegmentSizeAndSunshineStats\0226\n"
+          + "\022roof_segment_stats\030\006 \003(\013"
+          + "25.google.maps.solar.v1.RoofSegmentSizeAndSunshineStats\0226\n"
           + "\014solar_panels\030\016 \003(\0132 .google.maps.solar.v1.SolarPanel\022C\n"
           + "\023solar_panel_configs\030\007"
           + " \003(\0132&.google.maps.solar.v1.SolarPanelConfig\022C\n"
-          + "\022financial_analyses\030\010 \003(\0132\'.g"
-          + "oogle.maps.solar.v1.FinancialAnalysis\"\346\002\n"
+          + "\022financial_analyses\030\010"
+          + " \003(\0132\'.google.maps.solar.v1.FinancialAnalysis\"\346\002\n"
           + "\037RoofSegmentSizeAndSunshineStats\022\032\n\r"
           + "pitch_degrees\030\001 \001(\002H\000\210\001\001\022\034\n"
           + "\017azimuth_degrees\030\002 \001(\002H\001\210\001\001\0229\n"
@@ -195,9 +213,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
           + "\020SolarPanelConfig\022\024\n"
           + "\014panels_count\030\001 \001(\005\022\034\n"
           + "\024yearly_energy_dc_kwh\030\002 \001(\002\022H\n"
-          + "\026roof_segment_summaries\030\004 \003(\013"
-          + "2(.google.maps.solar.v1.RoofSegmentSummary\"\326\001\n"
-          + "\022RoofSegmentSummary\022\032\n\r"
+          + "\026roof_segment_summaries\030\004"
+          + " \003(\0132(.google.maps.solar.v1.RoofSegmentSummary\"\326\001\n"
+          + "\022RoofSegmentSummary\022\032\n"
+          + "\r"
           + "pitch_degrees\030\002 \001(\002H\000\210\001\001\022\034\n"
           + "\017azimuth_degrees\030\003 \001(\002H\001\210\001\001\022\024\n"
           + "\014panels_count\030\007 \001(\005\022\034\n"
@@ -260,8 +279,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
           + "\010location\030\001 \001(\0132\023.google.type.LatLngB\003\340A\002\022\032\n\r"
           + "radius_meters\030\002 \001(\002B\003\340A\002\0226\n"
           + "\004view\030\003 \001(\0162#.google.maps.solar.v1.DataLayerViewB\003\340A\001\022C\n"
-          + "\020required_quality\030\005 \001(\0162"
-          + "$.google.maps.solar.v1.ImageryQualityB\003\340A\001\022\036\n"
+          + "\020required_quality\030\005"
+          + " \001(\0162$.google.maps.solar.v1.ImageryQualityB\003\340A\001\022\036\n"
           + "\021pixel_size_meters\030\006 \001(\002B\003\340A\001\022#\n"
           + "\026exact_quality_required\030\007 \001(\010B\003\340A\001\022:\n"
           + "\013experiments\030\010 \003(\0162"
@@ -277,7 +296,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
           + "\021hourly_shade_urls\030\010 \003(\t\022=\n"
           + "\017imagery_quality\030\t \001(\0162$.google.maps.solar.v1.ImageryQuality\"$\n"
           + "\021GetGeoTiffRequest\022\017\n"
-          + "\002id\030\001 \001(\tB\003\340A\002*\251\001\n\r"
+          + "\002id\030\001 \001(\tB\003\340A\002*N\n"
+          + "\022AdditionalInsights\022#\n"
+          + "\037ADDITIONAL_INSIGHTS_UNSPECIFIED\020\000\022\023\n"
+          + "\017DETECTED_ARRAYS\020\002*\251\001\n\r"
           + "DataLayerView\022\037\n"
           + "\033DATA_LAYER_VIEW_UNSPECIFIED\020\000\022\r\n"
           + "\tDSM_LAYER\020\001\022\022\n"
@@ -299,21 +321,19 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
           + "\026EXPERIMENT_UNSPECIFIED\020\000\022\025\n"
           + "\021EXPANDED_COVERAGE\020\0012\336\003\n"
           + "\005Solar\022\251\001\n"
-          + "\033FindClosestBuildingInsights\0228.google.maps.solar.v1.F"
-          + "indClosestBuildingInsightsRequest\032&.goog"
-          + "le.maps.solar.v1.BuildingInsights\"(\202\323\344\223\002\"\022"
+          + "\033FindClosestBuildingInsights\0228.google.map"
+          + "s.solar.v1.FindClosestBuildingInsightsRe"
+          + "quest\032&.google.maps.solar.v1.BuildingInsights\"(\202\323\344\223\002\"\022"
           + " /v1/buildingInsights:findClosest\022y\n\r"
-          + "GetDataLayers\022*.google.maps.solar.v1.GetDataLayersRequest\032"
-          + " .google.maps.solar.v1."
-          + "DataLayers\"\032\202\323\344\223\002\024\022\022/v1/dataLayers:get\022d\n\n"
-          + "GetGeoTiff\022\'.google.maps.solar.v1.GetG"
-          + "eoTiffRequest\032\024.google.api.HttpBody\"\027\202\323\344"
-          + "\223\002\021\022\017/v1/geoTiff:get\032H\312A\024solar.googleapi"
-          + "s.com\322A.https://www.googleapis.com/auth/cloud-platformB\267\001\n"
-          + "\030com.google.maps.solar.v1B\021SolarServiceProtoP\001Z4cloud.google.c"
-          + "om/go/maps/solar/apiv1/solarpb;solarpb\242\002"
-          + "\007GGMPV1A\252\002\024Google.Maps.Solar.V1\312\002\024Google"
-          + "\\Maps\\Solar\\V1\352\002\027Google::Maps::Solar::V1b\006proto3"
+          + "GetDataLayers\022*.google.maps.solar.v1.GetDataLayersRequest\032 .google.ma"
+          + "ps.solar.v1.DataLayers\"\032\202\323\344\223\002\024\022\022/v1/dataLayers:get\022d\n\n"
+          + "GetGeoTiff\022\'.google.maps.solar.v1.GetGeoTiffRequest\032\024.google.api.H"
+          + "ttpBody\"\027\202\323\344\223\002\021\022\017/v1/geoTiff:get\032H\312A\024sol"
+          + "ar.googleapis.com\322A.https://www.googleapis.com/auth/cloud-platformB\267\001\n"
+          + "\030com.google.maps.solar.v1B\021SolarServiceProtoP\001Z4cl"
+          + "oud.google.com/go/maps/solar/apiv1/solar"
+          + "pb;solarpb\242\002\007GGMPV1A\252\002\024Google.Maps.Solar"
+          + ".V1\312\002\024Google\\Maps\\Solar\\V1\352\002\027Google::Maps::Solar::V1b\006proto3"
     };
     descriptor =
         com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
@@ -333,7 +353,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
         new com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_google_maps_solar_v1_FindClosestBuildingInsightsRequest_descriptor,
             new java.lang.String[] {
-              "Location", "RequiredQuality", "ExactQualityRequired", "Experiments",
+              "Location",
+              "RequiredQuality",
+              "ExactQualityRequired",
+              "Experiments",
+              "AdditionalInsights",
             });
     internal_static_google_maps_solar_v1_LatLngBox_descriptor = getDescriptor().getMessageType(1);
     internal_static_google_maps_solar_v1_LatLngBox_fieldAccessorTable =
@@ -359,6 +383,15 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
               "RegionCode",
               "SolarPotential",
               "ImageryQuality",
+              "DetectedArrays",
+            });
+    internal_static_google_maps_solar_v1_BuildingInsights_DetectedArrays_descriptor =
+        internal_static_google_maps_solar_v1_BuildingInsights_descriptor.getNestedType(0);
+    internal_static_google_maps_solar_v1_BuildingInsights_DetectedArrays_fieldAccessorTable =
+        new com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+            internal_static_google_maps_solar_v1_BuildingInsights_DetectedArrays_descriptor,
+            new java.lang.String[] {
+              "DetectionStatus", "LatestCaptureDate",
             });
     internal_static_google_maps_solar_v1_SolarPotential_descriptor =
         getDescriptor().getMessageType(3);
diff --git a/java-maps-solar/proto-google-maps-solar-v1/src/main/proto/google/maps/solar/v1/solar_service.proto b/java-maps-solar/proto-google-maps-solar-v1/src/main/proto/google/maps/solar/v1/solar_service.proto
index 1d2cf2accf1b..f4c0a7c11ea3 100644
--- a/java-maps-solar/proto-google-maps-solar-v1/src/main/proto/google/maps/solar/v1/solar_service.proto
+++ b/java-maps-solar/proto-google-maps-solar-v1/src/main/proto/google/maps/solar/v1/solar_service.proto
@@ -1,4 +1,4 @@
-// Copyright 2025 Google LLC
+// Copyright 2026 Google LLC
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -85,8 +85,20 @@ message FindClosestBuildingInsightsRequest {
   // imagery is returned if `required_quality` is set to `MEDIUM`.
   bool exact_quality_required = 4 [(google.api.field_behavior) = OPTIONAL];
 
-  // Optional. Specifies the pre-GA features to enable.
+  // Optional. Specifies the pre-GA experiments to enable. Requests using this
+  // field are classified as a pre-GA offering under the [Google Maps Platform
+  // Service Specific
+  // Terms](https://cloud.google.com/maps-platform/terms/maps-service-terms).
+  // See [launch stage
+  // descriptions](https://cloud.google.com/maps-platform/terms/launch-stages)
+  // for more details.
   repeated Experiment experiments = 5 [(google.api.field_behavior) = OPTIONAL];
+
+  // Optional. A list of
+  // [additional_insights][google.maps.solar.v1.FindClosestBuildingInsightsRequest.additional_insights]
+  // to be included in the response.
+  repeated AdditionalInsights additional_insights = 6
+      [(google.api.field_behavior) = OPTIONAL];
 }
 
 // A bounding box in lat/lng coordinates.
@@ -102,6 +114,30 @@ message LatLngBox {
 // Information about the location, dimensions, and solar potential of a
 // building.
 message BuildingInsights {
+  // Information about solar arrays detected on the building.
+  message DetectedArrays {
+    // Indicates the detection status of solar arrays for this building.
+    enum DetectionStatus {
+      // Unspecified status.
+      DETECTION_STATUS_UNSPECIFIED = 0;
+
+      // Detected solar array data is unavailable for this building.
+      DETECTION_STATUS_DATA_UNAVAILABLE = 1;
+
+      // At least one solar array has been detected for this building.
+      DETECTION_STATUS_ARRAYS_DETECTED = 2;
+
+      // No solar arrays detected for this building.
+      DETECTION_STATUS_NO_ARRAYS_DETECTED = 3;
+    }
+
+    // Indicates the detection status of solar arrays for this building.
+    DetectionStatus detection_status = 1;
+
+    // The date indicating when the latest solar array data was captured.
+    google.type.Date latest_capture_date = 3;
+  }
+
   // The resource name for the building, of the format `buildings/{place_id}`.
   string name = 1;
 
@@ -135,6 +171,11 @@ message BuildingInsights {
 
   // The quality of the imagery used to compute the data for this building.
   ImageryQuality imagery_quality = 10;
+
+  // Solar arrays detected on the building. This field is only populated if
+  // DETECTED_ARRAYS is included in the request's
+  // [FindClosestBuildingInsightsRequest.additional_insights][google.maps.solar.v1.FindClosestBuildingInsightsRequest.additional_insights].
+  DetectedArrays detected_arrays = 12;
 }
 
 // Information about the solar potential of a building. A number of
@@ -202,7 +243,7 @@ message SolarPotential {
   // Size and sunlight quantiles for each roof segment.
   repeated RoofSegmentSizeAndSunshineStats roof_segment_stats = 6;
 
-  // Each [SolarPanel] [google.maps.solar.v1.SolarPanel]
+  // Each [SolarPanel][google.maps.solar.v1.SolarPanel]
   // describes a single solar panel. They are listed in the order that
   // the panel layout algorithm placed this. This is usually, though
   // not always, in decreasing order of annual energy production.
@@ -566,7 +607,13 @@ message GetDataLayersRequest {
   // imagery is returned if `required_quality` is set to `MEDIUM`.
   bool exact_quality_required = 7 [(google.api.field_behavior) = OPTIONAL];
 
-  // Optional. Specifies the pre-GA experiments to enable.
+  // Optional. Specifies the pre-GA experiments to enable. Requests using this
+  // field are classified as a pre-GA offering under the [Google Maps Platform
+  // Service Specific
+  // Terms](https://cloud.google.com/maps-platform/terms/maps-service-terms).
+  // See [launch stage descriptions](
+  // https://cloud.google.com/maps-platform/terms/launch-stages) for more
+  // details.
   repeated Experiment experiments = 8 [(google.api.field_behavior) = OPTIONAL];
 }
 
@@ -658,6 +705,21 @@ message GetGeoTiffRequest {
   string id = 1 [(google.api.field_behavior) = REQUIRED];
 }
 
+// Additional building information such as roof geometry and
+// solar panel arrays that can be returned in BuildingInsights.
+//
+// New values may be added to this enum in the future.
+enum AdditionalInsights {
+  // The default value. The default BuildingInsights will be returned.
+  ADDITIONAL_INSIGHTS_UNSPECIFIED = 0;
+
+  // Determines whether the response will include the detected arrays.
+  //
+  // If specified, the `detected_arrays` field will be populated in the
+  // response.
+  DETECTED_ARRAYS = 2;
+}
+
 // What subset of the solar information to return.
 enum DataLayerView {
   // Equivalent to FULL.
diff --git a/java-maps-solar/samples/snippets/generated/com/google/maps/solar/v1/solar/findclosestbuildinginsights/AsyncFindClosestBuildingInsights.java b/java-maps-solar/samples/snippets/generated/com/google/maps/solar/v1/solar/findclosestbuildinginsights/AsyncFindClosestBuildingInsights.java
index bd384452ce9d..76b4ea897a98 100644
--- a/java-maps-solar/samples/snippets/generated/com/google/maps/solar/v1/solar/findclosestbuildinginsights/AsyncFindClosestBuildingInsights.java
+++ b/java-maps-solar/samples/snippets/generated/com/google/maps/solar/v1/solar/findclosestbuildinginsights/AsyncFindClosestBuildingInsights.java
@@ -18,6 +18,7 @@
 
 // [START solar_v1_generated_Solar_FindClosestBuildingInsights_async]
 import com.google.api.core.ApiFuture;
+import com.google.maps.solar.v1.AdditionalInsights;
 import com.google.maps.solar.v1.BuildingInsights;
 import com.google.maps.solar.v1.Experiment;
 import com.google.maps.solar.v1.FindClosestBuildingInsightsRequest;
@@ -45,6 +46,7 @@ public static void asyncFindClosestBuildingInsights() throws Exception {
               .setRequiredQuality(ImageryQuality.forNumber(0))
               .setExactQualityRequired(true)
               .addAllExperiments(new ArrayList())
+              .addAllAdditionalInsights(new ArrayList())
               .build();
       ApiFuture future =
           solarClient.findClosestBuildingInsightsCallable().futureCall(request);
diff --git a/java-maps-solar/samples/snippets/generated/com/google/maps/solar/v1/solar/findclosestbuildinginsights/SyncFindClosestBuildingInsights.java b/java-maps-solar/samples/snippets/generated/com/google/maps/solar/v1/solar/findclosestbuildinginsights/SyncFindClosestBuildingInsights.java
index 231af3bada3a..8f84004da510 100644
--- a/java-maps-solar/samples/snippets/generated/com/google/maps/solar/v1/solar/findclosestbuildinginsights/SyncFindClosestBuildingInsights.java
+++ b/java-maps-solar/samples/snippets/generated/com/google/maps/solar/v1/solar/findclosestbuildinginsights/SyncFindClosestBuildingInsights.java
@@ -17,6 +17,7 @@
 package com.google.maps.solar.v1.samples;
 
 // [START solar_v1_generated_Solar_FindClosestBuildingInsights_sync]
+import com.google.maps.solar.v1.AdditionalInsights;
 import com.google.maps.solar.v1.BuildingInsights;
 import com.google.maps.solar.v1.Experiment;
 import com.google.maps.solar.v1.FindClosestBuildingInsightsRequest;
@@ -44,6 +45,7 @@ public static void syncFindClosestBuildingInsights() throws Exception {
               .setRequiredQuality(ImageryQuality.forNumber(0))
               .setExactQualityRequired(true)
               .addAllExperiments(new ArrayList())
+              .addAllAdditionalInsights(new ArrayList())
               .build();
       BuildingInsights response = solarClient.findClosestBuildingInsights(request);
     }
diff --git a/java-marketingplatformadminapi/admin/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/MarketingplatformAdminServiceClient.java b/java-marketingplatformadminapi/admin/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/MarketingplatformAdminServiceClient.java
index ae854ecfd2be..ffa869f57f74 100644
--- a/java-marketingplatformadminapi/admin/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/MarketingplatformAdminServiceClient.java
+++ b/java-marketingplatformadminapi/admin/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/MarketingplatformAdminServiceClient.java
@@ -29,6 +29,7 @@
 import com.google.api.gax.rpc.UnaryCallable;
 import com.google.common.util.concurrent.MoreExecutors;
 import com.google.protobuf.Empty;
+import com.google.protobuf.FieldMask;
 import java.io.IOException;
 import java.util.List;
 import java.util.concurrent.TimeUnit;
@@ -69,7 +70,7 @@
  *    
  *    
  *      

GetOrganization - *

Lookup for a single organization. + *

Looks up a single organization. * *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    @@ -196,7 +197,7 @@ * * *

    ReportPropertyUsage - *

    Get the usage and billing data for properties within the organization for the specified month. + *

    Gets the usage and billing data for properties within the organization for the specified month. *

    Per direct client org, user needs to be OrgAdmin/BillingAdmin on the organization in order to view the billing and usage data. *

    Per sales partner client org, user needs to be OrgAdmin/BillingAdmin on the sales partner org in order to view the billing and usage data, or OrgAdmin/BillingAdmin on the sales partner client org in order to view the usage data only. * @@ -214,6 +215,272 @@ *

* * + * + *

GetUserGroup + *

Looks up a single user group. + * + *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getUserGroup(GetUserGroupRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getUserGroup(UserGroupName name) + *

  • getUserGroup(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getUserGroupCallable() + *

+ * + * + * + *

ListUserGroups + *

Returns a list of user groups in the specified GMP organization. + * + *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listUserGroups(ListUserGroupsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listUserGroups(OrganizationName parent) + *

  • listUserGroups(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listUserGroupsPagedCallable() + *

  • listUserGroupsCallable() + *

+ * + * + * + *

CreateUserGroup + *

Creates a user group in the specified GMP organization. + * + *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createUserGroup(CreateUserGroupRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • createUserGroup(OrganizationName parent, UserGroup userGroup) + *

  • createUserGroup(String parent, UserGroup userGroup) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createUserGroupCallable() + *

+ * + * + * + *

UpdateUserGroup + *

Updates a user group in the specified GMP organization. + * + *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateUserGroup(UpdateUserGroupRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updateUserGroup(UserGroup userGroup, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateUserGroupCallable() + *

+ * + * + * + *

DeleteUserGroup + *

Deletes a user group in the specified GMP organization. + * + *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteUserGroup(DeleteUserGroupRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • deleteUserGroup(UserGroupName name) + *

  • deleteUserGroup(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteUserGroupCallable() + *

+ * + * + * + *

GetUserGroupMember + *

Looks up a single user group member. + * + *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getUserGroupMember(GetUserGroupMemberRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getUserGroupMember(UserGroupMemberName name) + *

  • getUserGroupMember(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getUserGroupMemberCallable() + *

+ * + * + * + *

ListUserGroupMembers + *

Returns a list of members in the specified user group. + * + *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listUserGroupMembers(ListUserGroupMembersRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listUserGroupMembers(UserGroupName parent) + *

  • listUserGroupMembers(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listUserGroupMembersPagedCallable() + *

  • listUserGroupMembersCallable() + *

+ * + * + * + *

CreateUserGroupMember + *

Adds a member to the specified GMP user group. + * + *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createUserGroupMember(CreateUserGroupMemberRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • createUserGroupMember(UserGroupName parent, UserGroupMember userGroupMember) + *

  • createUserGroupMember(String parent, UserGroupMember userGroupMember) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createUserGroupMemberCallable() + *

+ * + * + * + *

UpdateUserGroupMember + *

Updates a member in the specified GMP user group. + * + *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateUserGroupMember(UpdateUserGroupMemberRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updateUserGroupMember(UserGroupMember userGroupMember, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateUserGroupMemberCallable() + *

+ * + * + * + *

DeleteUserGroupMember + *

Deletes a member in the specified GMP user group. + * + *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteUserGroupMember(DeleteUserGroupMemberRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • deleteUserGroupMember(UserGroupMemberName name) + *

  • deleteUserGroupMember(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteUserGroupMemberCallable() + *

+ * + * + * + *

GetAdminAccessBinding + *

Looks up a single admin access binding. + * + *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getAdminAccessBinding(GetAdminAccessBindingRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getAdminAccessBinding(AdminAccessBindingName name) + *

  • getAdminAccessBinding(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getAdminAccessBindingCallable() + *

+ * + * + * + *

ListAdminAccessBindings + *

Returns a list of admin access bindings in the specified GMP organization. + * + *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listAdminAccessBindings(ListAdminAccessBindingsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listAdminAccessBindings(OrganizationName parent) + *

  • listAdminAccessBindings(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listAdminAccessBindingsPagedCallable() + *

  • listAdminAccessBindingsCallable() + *

+ * + * + * + *

CreateAdminAccessBinding + *

Creates an admin access binding in the specified GMP organization. + * + *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createAdminAccessBinding(CreateAdminAccessBindingRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • createAdminAccessBinding(OrganizationName parent, AdminAccessBinding adminAccessBinding) + *

  • createAdminAccessBinding(String parent, AdminAccessBinding adminAccessBinding) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createAdminAccessBindingCallable() + *

+ * + * + * + *

UpdateAdminAccessBinding + *

Updates an admin access binding in the specified GMP organization. + * + *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateAdminAccessBinding(UpdateAdminAccessBindingRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updateAdminAccessBinding(AdminAccessBinding adminAccessBinding, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateAdminAccessBindingCallable() + *

+ * + * * * *

See the individual methods for example code. @@ -330,7 +597,7 @@ public MarketingplatformAdminServiceStub getStub() { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lookup for a single organization. + * Looks up a single organization. * *

Sample code: * @@ -358,7 +625,7 @@ public final Organization getOrganization(@Nullable OrganizationName name) { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lookup for a single organization. + * Looks up a single organization. * *

Sample code: * @@ -385,7 +652,7 @@ public final Organization getOrganization(String name) { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lookup for a single organization. + * Looks up a single organization. * *

Sample code: * @@ -414,7 +681,7 @@ public final Organization getOrganization(GetOrganizationRequest request) { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lookup for a single organization. + * Looks up a single organization. * *

Sample code: * @@ -1202,7 +1469,7 @@ public final SetPropertyServiceLevelResponse setPropertyServiceLevel( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Get the usage and billing data for properties within the organization for the specified month. + * Gets the usage and billing data for properties within the organization for the specified month. * *

Per direct client org, user needs to be OrgAdmin/BillingAdmin on the organization in order * to view the billing and usage data. @@ -1239,7 +1506,7 @@ public final ReportPropertyUsageResponse reportPropertyUsage(String organization // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Get the usage and billing data for properties within the organization for the specified month. + * Gets the usage and billing data for properties within the organization for the specified month. * *

Per direct client org, user needs to be OrgAdmin/BillingAdmin on the organization in order * to view the billing and usage data. @@ -1277,7 +1544,7 @@ public final ReportPropertyUsageResponse reportPropertyUsage(ReportPropertyUsage // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Get the usage and billing data for properties within the organization for the specified month. + * Gets the usage and billing data for properties within the organization for the specified month. * *

Per direct client org, user needs to be OrgAdmin/BillingAdmin on the organization in order * to view the billing and usage data. @@ -1313,30 +1580,1853 @@ public final ReportPropertyUsageResponse reportPropertyUsage(ReportPropertyUsage return stub.reportPropertyUsageCallable(); } - @Override - public final void close() { - stub.close(); - } - - @Override - public void shutdown() { - stub.shutdown(); + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Looks up a single user group. + * + *

Sample code: + * + *

{@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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
+   *     MarketingplatformAdminServiceClient.create()) {
+   *   UserGroupName name = UserGroupName.of("[ORGANIZATION]", "[USER_GROUP]");
+   *   UserGroup response = marketingplatformAdminServiceClient.getUserGroup(name);
+   * }
+   * }
+ * + * @param name Required. The name of the UserGroup to retrieve. Format: + * organizations/{org_id}/userGroups/{user_group_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final UserGroup getUserGroup(@Nullable UserGroupName name) { + GetUserGroupRequest request = + GetUserGroupRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getUserGroup(request); } - @Override - public boolean isShutdown() { - return stub.isShutdown(); + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Looks up a single user group. + * + *

Sample code: + * + *

{@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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
+   *     MarketingplatformAdminServiceClient.create()) {
+   *   String name = UserGroupName.of("[ORGANIZATION]", "[USER_GROUP]").toString();
+   *   UserGroup response = marketingplatformAdminServiceClient.getUserGroup(name);
+   * }
+   * }
+ * + * @param name Required. The name of the UserGroup to retrieve. Format: + * organizations/{org_id}/userGroups/{user_group_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final UserGroup getUserGroup(String name) { + GetUserGroupRequest request = GetUserGroupRequest.newBuilder().setName(name).build(); + return getUserGroup(request); } - @Override - public boolean isTerminated() { - return stub.isTerminated(); + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Looks up a single user group. + * + *

Sample code: + * + *

{@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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
+   *     MarketingplatformAdminServiceClient.create()) {
+   *   GetUserGroupRequest request =
+   *       GetUserGroupRequest.newBuilder()
+   *           .setName(UserGroupName.of("[ORGANIZATION]", "[USER_GROUP]").toString())
+   *           .build();
+   *   UserGroup response = marketingplatformAdminServiceClient.getUserGroup(request);
+   * }
+   * }
+ * + * @param 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 + */ + public final UserGroup getUserGroup(GetUserGroupRequest request) { + return getUserGroupCallable().call(request); } - @Override - public void shutdownNow() { - stub.shutdownNow(); - } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Looks up a single user group. + * + *

Sample code: + * + *

{@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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
+   *     MarketingplatformAdminServiceClient.create()) {
+   *   GetUserGroupRequest request =
+   *       GetUserGroupRequest.newBuilder()
+   *           .setName(UserGroupName.of("[ORGANIZATION]", "[USER_GROUP]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       marketingplatformAdminServiceClient.getUserGroupCallable().futureCall(request);
+   *   // Do something.
+   *   UserGroup response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getUserGroupCallable() { + return stub.getUserGroupCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a list of user groups in the specified GMP organization. + * + *

Sample code: + * + *

{@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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
+   *     MarketingplatformAdminServiceClient.create()) {
+   *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
+   *   for (UserGroup element :
+   *       marketingplatformAdminServiceClient.listUserGroups(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent org where this UserGroup will be listed. Format: + * organizations/{org_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListUserGroupsPagedResponse listUserGroups(@Nullable OrganizationName parent) { + ListUserGroupsRequest request = + ListUserGroupsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listUserGroups(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a list of user groups in the specified GMP organization. + * + *

Sample code: + * + *

{@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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
+   *     MarketingplatformAdminServiceClient.create()) {
+   *   String parent = OrganizationName.of("[ORGANIZATION]").toString();
+   *   for (UserGroup element :
+   *       marketingplatformAdminServiceClient.listUserGroups(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent org where this UserGroup will be listed. Format: + * organizations/{org_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListUserGroupsPagedResponse listUserGroups(String parent) { + ListUserGroupsRequest request = ListUserGroupsRequest.newBuilder().setParent(parent).build(); + return listUserGroups(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a list of user groups in the specified GMP organization. + * + *

Sample code: + * + *

{@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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
+   *     MarketingplatformAdminServiceClient.create()) {
+   *   ListUserGroupsRequest request =
+   *       ListUserGroupsRequest.newBuilder()
+   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (UserGroup element :
+   *       marketingplatformAdminServiceClient.listUserGroups(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param 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 + */ + public final ListUserGroupsPagedResponse listUserGroups(ListUserGroupsRequest request) { + return listUserGroupsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a list of user groups in the specified GMP organization. + * + *

Sample code: + * + *

{@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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
+   *     MarketingplatformAdminServiceClient.create()) {
+   *   ListUserGroupsRequest request =
+   *       ListUserGroupsRequest.newBuilder()
+   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       marketingplatformAdminServiceClient.listUserGroupsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (UserGroup element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listUserGroupsPagedCallable() { + return stub.listUserGroupsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a list of user groups in the specified GMP organization. + * + *

Sample code: + * + *

{@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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
+   *     MarketingplatformAdminServiceClient.create()) {
+   *   ListUserGroupsRequest request =
+   *       ListUserGroupsRequest.newBuilder()
+   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListUserGroupsResponse response =
+   *         marketingplatformAdminServiceClient.listUserGroupsCallable().call(request);
+   *     for (UserGroup element : response.getUserGroupsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listUserGroupsCallable() { + return stub.listUserGroupsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a user group in the specified GMP organization. + * + *

Sample code: + * + *

{@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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
+   *     MarketingplatformAdminServiceClient.create()) {
+   *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
+   *   UserGroup userGroup = UserGroup.newBuilder().build();
+   *   UserGroup response = marketingplatformAdminServiceClient.createUserGroup(parent, userGroup);
+   * }
+   * }
+ * + * @param parent Required. The parent resource where this UserGroup will be created. Format: + * organizations/{org_id} + * @param userGroup Required. The user group to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final UserGroup createUserGroup(@Nullable OrganizationName parent, UserGroup userGroup) { + CreateUserGroupRequest request = + CreateUserGroupRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setUserGroup(userGroup) + .build(); + return createUserGroup(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a user group in the specified GMP organization. + * + *

Sample code: + * + *

{@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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
+   *     MarketingplatformAdminServiceClient.create()) {
+   *   String parent = OrganizationName.of("[ORGANIZATION]").toString();
+   *   UserGroup userGroup = UserGroup.newBuilder().build();
+   *   UserGroup response = marketingplatformAdminServiceClient.createUserGroup(parent, userGroup);
+   * }
+   * }
+ * + * @param parent Required. The parent resource where this UserGroup will be created. Format: + * organizations/{org_id} + * @param userGroup Required. The user group to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final UserGroup createUserGroup(String parent, UserGroup userGroup) { + CreateUserGroupRequest request = + CreateUserGroupRequest.newBuilder().setParent(parent).setUserGroup(userGroup).build(); + return createUserGroup(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a user group in the specified GMP organization. + * + *

Sample code: + * + *

{@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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
+   *     MarketingplatformAdminServiceClient.create()) {
+   *   CreateUserGroupRequest request =
+   *       CreateUserGroupRequest.newBuilder()
+   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
+   *           .setUserGroup(UserGroup.newBuilder().build())
+   *           .build();
+   *   UserGroup response = marketingplatformAdminServiceClient.createUserGroup(request);
+   * }
+   * }
+ * + * @param 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 + */ + public final UserGroup createUserGroup(CreateUserGroupRequest request) { + return createUserGroupCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a user group in the specified GMP organization. + * + *

Sample code: + * + *

{@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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
+   *     MarketingplatformAdminServiceClient.create()) {
+   *   CreateUserGroupRequest request =
+   *       CreateUserGroupRequest.newBuilder()
+   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
+   *           .setUserGroup(UserGroup.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       marketingplatformAdminServiceClient.createUserGroupCallable().futureCall(request);
+   *   // Do something.
+   *   UserGroup response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createUserGroupCallable() { + return stub.createUserGroupCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a user group in the specified GMP organization. + * + *

Sample code: + * + *

{@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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
+   *     MarketingplatformAdminServiceClient.create()) {
+   *   UserGroup userGroup = UserGroup.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   UserGroup response =
+   *       marketingplatformAdminServiceClient.updateUserGroup(userGroup, updateMask);
+   * }
+   * }
+ * + * @param userGroup Required. The user group to update. + * @param updateMask Required. The list of fields to update. Field names must be in snake case + * (for example, "field_to_update"). Omitted fields will not be updated. To replace the entire + * entity, use one path with the string "*" to match all fields. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final UserGroup updateUserGroup(UserGroup userGroup, FieldMask updateMask) { + UpdateUserGroupRequest request = + UpdateUserGroupRequest.newBuilder() + .setUserGroup(userGroup) + .setUpdateMask(updateMask) + .build(); + return updateUserGroup(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a user group in the specified GMP organization. + * + *

Sample code: + * + *

{@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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
+   *     MarketingplatformAdminServiceClient.create()) {
+   *   UpdateUserGroupRequest request =
+   *       UpdateUserGroupRequest.newBuilder()
+   *           .setUserGroup(UserGroup.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   UserGroup response = marketingplatformAdminServiceClient.updateUserGroup(request);
+   * }
+   * }
+ * + * @param 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 + */ + public final UserGroup updateUserGroup(UpdateUserGroupRequest request) { + return updateUserGroupCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a user group in the specified GMP organization. + * + *

Sample code: + * + *

{@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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
+   *     MarketingplatformAdminServiceClient.create()) {
+   *   UpdateUserGroupRequest request =
+   *       UpdateUserGroupRequest.newBuilder()
+   *           .setUserGroup(UserGroup.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       marketingplatformAdminServiceClient.updateUserGroupCallable().futureCall(request);
+   *   // Do something.
+   *   UserGroup response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateUserGroupCallable() { + return stub.updateUserGroupCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a user group in the specified GMP organization. + * + *

Sample code: + * + *

{@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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
+   *     MarketingplatformAdminServiceClient.create()) {
+   *   UserGroupName name = UserGroupName.of("[ORGANIZATION]", "[USER_GROUP]");
+   *   marketingplatformAdminServiceClient.deleteUserGroup(name);
+   * }
+   * }
+ * + * @param name Required. The name of the user group to delete. Format: + * organizations/{org_id}/userGroups/{user_group_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteUserGroup(@Nullable UserGroupName name) { + DeleteUserGroupRequest request = + DeleteUserGroupRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteUserGroup(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a user group in the specified GMP organization. + * + *

Sample code: + * + *

{@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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
+   *     MarketingplatformAdminServiceClient.create()) {
+   *   String name = UserGroupName.of("[ORGANIZATION]", "[USER_GROUP]").toString();
+   *   marketingplatformAdminServiceClient.deleteUserGroup(name);
+   * }
+   * }
+ * + * @param name Required. The name of the user group to delete. Format: + * organizations/{org_id}/userGroups/{user_group_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteUserGroup(String name) { + DeleteUserGroupRequest request = DeleteUserGroupRequest.newBuilder().setName(name).build(); + deleteUserGroup(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a user group in the specified GMP organization. + * + *

Sample code: + * + *

{@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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
+   *     MarketingplatformAdminServiceClient.create()) {
+   *   DeleteUserGroupRequest request =
+   *       DeleteUserGroupRequest.newBuilder()
+   *           .setName(UserGroupName.of("[ORGANIZATION]", "[USER_GROUP]").toString())
+   *           .build();
+   *   marketingplatformAdminServiceClient.deleteUserGroup(request);
+   * }
+   * }
+ * + * @param 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 + */ + public final void deleteUserGroup(DeleteUserGroupRequest request) { + deleteUserGroupCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a user group in the specified GMP organization. + * + *

Sample code: + * + *

{@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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
+   *     MarketingplatformAdminServiceClient.create()) {
+   *   DeleteUserGroupRequest request =
+   *       DeleteUserGroupRequest.newBuilder()
+   *           .setName(UserGroupName.of("[ORGANIZATION]", "[USER_GROUP]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       marketingplatformAdminServiceClient.deleteUserGroupCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteUserGroupCallable() { + return stub.deleteUserGroupCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Looks up a single user group member. + * + *

Sample code: + * + *

{@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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
+   *     MarketingplatformAdminServiceClient.create()) {
+   *   UserGroupMemberName name =
+   *       UserGroupMemberName.of("[ORGANIZATION]", "[USER_GROUP]", "[MEMBER]");
+   *   UserGroupMember response = marketingplatformAdminServiceClient.getUserGroupMember(name);
+   * }
+   * }
+ * + * @param name Required. The name of the user group member to retrieve. Format: + * organizations/{org_id}/userGroups/{user_group_id}/members/{member_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final UserGroupMember getUserGroupMember(@Nullable UserGroupMemberName name) { + GetUserGroupMemberRequest request = + GetUserGroupMemberRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getUserGroupMember(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Looks up a single user group member. + * + *

Sample code: + * + *

{@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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
+   *     MarketingplatformAdminServiceClient.create()) {
+   *   String name = UserGroupMemberName.of("[ORGANIZATION]", "[USER_GROUP]", "[MEMBER]").toString();
+   *   UserGroupMember response = marketingplatformAdminServiceClient.getUserGroupMember(name);
+   * }
+   * }
+ * + * @param name Required. The name of the user group member to retrieve. Format: + * organizations/{org_id}/userGroups/{user_group_id}/members/{member_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final UserGroupMember getUserGroupMember(String name) { + GetUserGroupMemberRequest request = + GetUserGroupMemberRequest.newBuilder().setName(name).build(); + return getUserGroupMember(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Looks up a single user group member. + * + *

Sample code: + * + *

{@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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
+   *     MarketingplatformAdminServiceClient.create()) {
+   *   GetUserGroupMemberRequest request =
+   *       GetUserGroupMemberRequest.newBuilder()
+   *           .setName(
+   *               UserGroupMemberName.of("[ORGANIZATION]", "[USER_GROUP]", "[MEMBER]").toString())
+   *           .build();
+   *   UserGroupMember response = marketingplatformAdminServiceClient.getUserGroupMember(request);
+   * }
+   * }
+ * + * @param 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 + */ + public final UserGroupMember getUserGroupMember(GetUserGroupMemberRequest request) { + return getUserGroupMemberCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Looks up a single user group member. + * + *

Sample code: + * + *

{@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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
+   *     MarketingplatformAdminServiceClient.create()) {
+   *   GetUserGroupMemberRequest request =
+   *       GetUserGroupMemberRequest.newBuilder()
+   *           .setName(
+   *               UserGroupMemberName.of("[ORGANIZATION]", "[USER_GROUP]", "[MEMBER]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       marketingplatformAdminServiceClient.getUserGroupMemberCallable().futureCall(request);
+   *   // Do something.
+   *   UserGroupMember response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getUserGroupMemberCallable() { + return stub.getUserGroupMemberCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a list of members in the specified user group. + * + *

Sample code: + * + *

{@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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
+   *     MarketingplatformAdminServiceClient.create()) {
+   *   UserGroupName parent = UserGroupName.of("[ORGANIZATION]", "[USER_GROUP]");
+   *   for (UserGroupMember element :
+   *       marketingplatformAdminServiceClient.listUserGroupMembers(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent user group where this UserGroupMember will be listed. + * Format: organizations/{org_id}/userGroups/{user_group_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListUserGroupMembersPagedResponse listUserGroupMembers( + @Nullable UserGroupName parent) { + ListUserGroupMembersRequest request = + ListUserGroupMembersRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listUserGroupMembers(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a list of members in the specified user group. + * + *

Sample code: + * + *

{@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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
+   *     MarketingplatformAdminServiceClient.create()) {
+   *   String parent = UserGroupName.of("[ORGANIZATION]", "[USER_GROUP]").toString();
+   *   for (UserGroupMember element :
+   *       marketingplatformAdminServiceClient.listUserGroupMembers(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent user group where this UserGroupMember will be listed. + * Format: organizations/{org_id}/userGroups/{user_group_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListUserGroupMembersPagedResponse listUserGroupMembers(String parent) { + ListUserGroupMembersRequest request = + ListUserGroupMembersRequest.newBuilder().setParent(parent).build(); + return listUserGroupMembers(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a list of members in the specified user group. + * + *

Sample code: + * + *

{@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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
+   *     MarketingplatformAdminServiceClient.create()) {
+   *   ListUserGroupMembersRequest request =
+   *       ListUserGroupMembersRequest.newBuilder()
+   *           .setParent(UserGroupName.of("[ORGANIZATION]", "[USER_GROUP]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (UserGroupMember element :
+   *       marketingplatformAdminServiceClient.listUserGroupMembers(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param 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 + */ + public final ListUserGroupMembersPagedResponse listUserGroupMembers( + ListUserGroupMembersRequest request) { + return listUserGroupMembersPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a list of members in the specified user group. + * + *

Sample code: + * + *

{@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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
+   *     MarketingplatformAdminServiceClient.create()) {
+   *   ListUserGroupMembersRequest request =
+   *       ListUserGroupMembersRequest.newBuilder()
+   *           .setParent(UserGroupName.of("[ORGANIZATION]", "[USER_GROUP]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       marketingplatformAdminServiceClient
+   *           .listUserGroupMembersPagedCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   for (UserGroupMember element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listUserGroupMembersPagedCallable() { + return stub.listUserGroupMembersPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a list of members in the specified user group. + * + *

Sample code: + * + *

{@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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
+   *     MarketingplatformAdminServiceClient.create()) {
+   *   ListUserGroupMembersRequest request =
+   *       ListUserGroupMembersRequest.newBuilder()
+   *           .setParent(UserGroupName.of("[ORGANIZATION]", "[USER_GROUP]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListUserGroupMembersResponse response =
+   *         marketingplatformAdminServiceClient.listUserGroupMembersCallable().call(request);
+   *     for (UserGroupMember element : response.getUserGroupMembersList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listUserGroupMembersCallable() { + return stub.listUserGroupMembersCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Adds a member to the specified GMP user group. + * + *

Sample code: + * + *

{@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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
+   *     MarketingplatformAdminServiceClient.create()) {
+   *   UserGroupName parent = UserGroupName.of("[ORGANIZATION]", "[USER_GROUP]");
+   *   UserGroupMember userGroupMember = UserGroupMember.newBuilder().build();
+   *   UserGroupMember response =
+   *       marketingplatformAdminServiceClient.createUserGroupMember(parent, userGroupMember);
+   * }
+   * }
+ * + * @param parent Required. The parent resource where this UserGroupMember will be created. Format: + * organizations/{org_id}/userGroups/{user_group_id} + * @param userGroupMember Required. The user group member to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final UserGroupMember createUserGroupMember( + @Nullable UserGroupName parent, UserGroupMember userGroupMember) { + CreateUserGroupMemberRequest request = + CreateUserGroupMemberRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setUserGroupMember(userGroupMember) + .build(); + return createUserGroupMember(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Adds a member to the specified GMP user group. + * + *

Sample code: + * + *

{@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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
+   *     MarketingplatformAdminServiceClient.create()) {
+   *   String parent = UserGroupName.of("[ORGANIZATION]", "[USER_GROUP]").toString();
+   *   UserGroupMember userGroupMember = UserGroupMember.newBuilder().build();
+   *   UserGroupMember response =
+   *       marketingplatformAdminServiceClient.createUserGroupMember(parent, userGroupMember);
+   * }
+   * }
+ * + * @param parent Required. The parent resource where this UserGroupMember will be created. Format: + * organizations/{org_id}/userGroups/{user_group_id} + * @param userGroupMember Required. The user group member to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final UserGroupMember createUserGroupMember( + String parent, UserGroupMember userGroupMember) { + CreateUserGroupMemberRequest request = + CreateUserGroupMemberRequest.newBuilder() + .setParent(parent) + .setUserGroupMember(userGroupMember) + .build(); + return createUserGroupMember(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Adds a member to the specified GMP user group. + * + *

Sample code: + * + *

{@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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
+   *     MarketingplatformAdminServiceClient.create()) {
+   *   CreateUserGroupMemberRequest request =
+   *       CreateUserGroupMemberRequest.newBuilder()
+   *           .setParent(UserGroupName.of("[ORGANIZATION]", "[USER_GROUP]").toString())
+   *           .setUserGroupMember(UserGroupMember.newBuilder().build())
+   *           .build();
+   *   UserGroupMember response = marketingplatformAdminServiceClient.createUserGroupMember(request);
+   * }
+   * }
+ * + * @param 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 + */ + public final UserGroupMember createUserGroupMember(CreateUserGroupMemberRequest request) { + return createUserGroupMemberCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Adds a member to the specified GMP user group. + * + *

Sample code: + * + *

{@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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
+   *     MarketingplatformAdminServiceClient.create()) {
+   *   CreateUserGroupMemberRequest request =
+   *       CreateUserGroupMemberRequest.newBuilder()
+   *           .setParent(UserGroupName.of("[ORGANIZATION]", "[USER_GROUP]").toString())
+   *           .setUserGroupMember(UserGroupMember.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       marketingplatformAdminServiceClient.createUserGroupMemberCallable().futureCall(request);
+   *   // Do something.
+   *   UserGroupMember response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + createUserGroupMemberCallable() { + return stub.createUserGroupMemberCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a member in the specified GMP user group. + * + *

Sample code: + * + *

{@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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
+   *     MarketingplatformAdminServiceClient.create()) {
+   *   UserGroupMember userGroupMember = UserGroupMember.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   UserGroupMember response =
+   *       marketingplatformAdminServiceClient.updateUserGroupMember(userGroupMember, updateMask);
+   * }
+   * }
+ * + * @param userGroupMember Required. The user group member to update. + * @param updateMask Required. The list of fields to update. Field names must be in snake case + * (for example, "field_to_update"). Omitted fields will not be updated. To replace the entire + * entity, use one path with the string "*" to match all fields. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final UserGroupMember updateUserGroupMember( + UserGroupMember userGroupMember, FieldMask updateMask) { + UpdateUserGroupMemberRequest request = + UpdateUserGroupMemberRequest.newBuilder() + .setUserGroupMember(userGroupMember) + .setUpdateMask(updateMask) + .build(); + return updateUserGroupMember(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a member in the specified GMP user group. + * + *

Sample code: + * + *

{@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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
+   *     MarketingplatformAdminServiceClient.create()) {
+   *   UpdateUserGroupMemberRequest request =
+   *       UpdateUserGroupMemberRequest.newBuilder()
+   *           .setUserGroupMember(UserGroupMember.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   UserGroupMember response = marketingplatformAdminServiceClient.updateUserGroupMember(request);
+   * }
+   * }
+ * + * @param 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 + */ + public final UserGroupMember updateUserGroupMember(UpdateUserGroupMemberRequest request) { + return updateUserGroupMemberCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a member in the specified GMP user group. + * + *

Sample code: + * + *

{@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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
+   *     MarketingplatformAdminServiceClient.create()) {
+   *   UpdateUserGroupMemberRequest request =
+   *       UpdateUserGroupMemberRequest.newBuilder()
+   *           .setUserGroupMember(UserGroupMember.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       marketingplatformAdminServiceClient.updateUserGroupMemberCallable().futureCall(request);
+   *   // Do something.
+   *   UserGroupMember response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + updateUserGroupMemberCallable() { + return stub.updateUserGroupMemberCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a member in the specified GMP user group. + * + *

Sample code: + * + *

{@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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
+   *     MarketingplatformAdminServiceClient.create()) {
+   *   UserGroupMemberName name =
+   *       UserGroupMemberName.of("[ORGANIZATION]", "[USER_GROUP]", "[MEMBER]");
+   *   marketingplatformAdminServiceClient.deleteUserGroupMember(name);
+   * }
+   * }
+ * + * @param name Required. The name of the user group member to delete. Format: + * organizations/{org_id}/userGroups/{user_group_id}/members/{member_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteUserGroupMember(@Nullable UserGroupMemberName name) { + DeleteUserGroupMemberRequest request = + DeleteUserGroupMemberRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + deleteUserGroupMember(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a member in the specified GMP user group. + * + *

Sample code: + * + *

{@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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
+   *     MarketingplatformAdminServiceClient.create()) {
+   *   String name = UserGroupMemberName.of("[ORGANIZATION]", "[USER_GROUP]", "[MEMBER]").toString();
+   *   marketingplatformAdminServiceClient.deleteUserGroupMember(name);
+   * }
+   * }
+ * + * @param name Required. The name of the user group member to delete. Format: + * organizations/{org_id}/userGroups/{user_group_id}/members/{member_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteUserGroupMember(String name) { + DeleteUserGroupMemberRequest request = + DeleteUserGroupMemberRequest.newBuilder().setName(name).build(); + deleteUserGroupMember(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a member in the specified GMP user group. + * + *

Sample code: + * + *

{@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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
+   *     MarketingplatformAdminServiceClient.create()) {
+   *   DeleteUserGroupMemberRequest request =
+   *       DeleteUserGroupMemberRequest.newBuilder()
+   *           .setName(
+   *               UserGroupMemberName.of("[ORGANIZATION]", "[USER_GROUP]", "[MEMBER]").toString())
+   *           .build();
+   *   marketingplatformAdminServiceClient.deleteUserGroupMember(request);
+   * }
+   * }
+ * + * @param 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 + */ + public final void deleteUserGroupMember(DeleteUserGroupMemberRequest request) { + deleteUserGroupMemberCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a member in the specified GMP user group. + * + *

Sample code: + * + *

{@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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
+   *     MarketingplatformAdminServiceClient.create()) {
+   *   DeleteUserGroupMemberRequest request =
+   *       DeleteUserGroupMemberRequest.newBuilder()
+   *           .setName(
+   *               UserGroupMemberName.of("[ORGANIZATION]", "[USER_GROUP]", "[MEMBER]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       marketingplatformAdminServiceClient.deleteUserGroupMemberCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteUserGroupMemberCallable() { + return stub.deleteUserGroupMemberCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Looks up a single admin access binding. + * + *

Sample code: + * + *

{@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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
+   *     MarketingplatformAdminServiceClient.create()) {
+   *   AdminAccessBindingName name =
+   *       AdminAccessBindingName.of("[ORGANIZATION]", "[ADMIN_ACCESS_BINDING]");
+   *   AdminAccessBinding response = marketingplatformAdminServiceClient.getAdminAccessBinding(name);
+   * }
+   * }
+ * + * @param name Required. The name of the AdminAccessBinding to retrieve. Format: + * organizations/{org_id}/adminAccessBindings/{admin_access_binding_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AdminAccessBinding getAdminAccessBinding(@Nullable AdminAccessBindingName name) { + GetAdminAccessBindingRequest request = + GetAdminAccessBindingRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getAdminAccessBinding(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Looks up a single admin access binding. + * + *

Sample code: + * + *

{@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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
+   *     MarketingplatformAdminServiceClient.create()) {
+   *   String name =
+   *       AdminAccessBindingName.of("[ORGANIZATION]", "[ADMIN_ACCESS_BINDING]").toString();
+   *   AdminAccessBinding response = marketingplatformAdminServiceClient.getAdminAccessBinding(name);
+   * }
+   * }
+ * + * @param name Required. The name of the AdminAccessBinding to retrieve. Format: + * organizations/{org_id}/adminAccessBindings/{admin_access_binding_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AdminAccessBinding getAdminAccessBinding(String name) { + GetAdminAccessBindingRequest request = + GetAdminAccessBindingRequest.newBuilder().setName(name).build(); + return getAdminAccessBinding(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Looks up a single admin access binding. + * + *

Sample code: + * + *

{@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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
+   *     MarketingplatformAdminServiceClient.create()) {
+   *   GetAdminAccessBindingRequest request =
+   *       GetAdminAccessBindingRequest.newBuilder()
+   *           .setName(
+   *               AdminAccessBindingName.of("[ORGANIZATION]", "[ADMIN_ACCESS_BINDING]").toString())
+   *           .build();
+   *   AdminAccessBinding response =
+   *       marketingplatformAdminServiceClient.getAdminAccessBinding(request);
+   * }
+   * }
+ * + * @param 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 + */ + public final AdminAccessBinding getAdminAccessBinding(GetAdminAccessBindingRequest request) { + return getAdminAccessBindingCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Looks up a single admin access binding. + * + *

Sample code: + * + *

{@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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
+   *     MarketingplatformAdminServiceClient.create()) {
+   *   GetAdminAccessBindingRequest request =
+   *       GetAdminAccessBindingRequest.newBuilder()
+   *           .setName(
+   *               AdminAccessBindingName.of("[ORGANIZATION]", "[ADMIN_ACCESS_BINDING]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       marketingplatformAdminServiceClient.getAdminAccessBindingCallable().futureCall(request);
+   *   // Do something.
+   *   AdminAccessBinding response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getAdminAccessBindingCallable() { + return stub.getAdminAccessBindingCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a list of admin access bindings in the specified GMP organization. + * + *

Sample code: + * + *

{@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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
+   *     MarketingplatformAdminServiceClient.create()) {
+   *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
+   *   for (AdminAccessBinding element :
+   *       marketingplatformAdminServiceClient.listAdminAccessBindings(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent organization, which owns this collection of Admin Access + * Bindings. Format: organizations/{org_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAdminAccessBindingsPagedResponse listAdminAccessBindings( + @Nullable OrganizationName parent) { + ListAdminAccessBindingsRequest request = + ListAdminAccessBindingsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listAdminAccessBindings(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a list of admin access bindings in the specified GMP organization. + * + *

Sample code: + * + *

{@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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
+   *     MarketingplatformAdminServiceClient.create()) {
+   *   String parent = OrganizationName.of("[ORGANIZATION]").toString();
+   *   for (AdminAccessBinding element :
+   *       marketingplatformAdminServiceClient.listAdminAccessBindings(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent organization, which owns this collection of Admin Access + * Bindings. Format: organizations/{org_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAdminAccessBindingsPagedResponse listAdminAccessBindings(String parent) { + ListAdminAccessBindingsRequest request = + ListAdminAccessBindingsRequest.newBuilder().setParent(parent).build(); + return listAdminAccessBindings(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a list of admin access bindings in the specified GMP organization. + * + *

Sample code: + * + *

{@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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
+   *     MarketingplatformAdminServiceClient.create()) {
+   *   ListAdminAccessBindingsRequest request =
+   *       ListAdminAccessBindingsRequest.newBuilder()
+   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (AdminAccessBinding element :
+   *       marketingplatformAdminServiceClient.listAdminAccessBindings(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param 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 + */ + public final ListAdminAccessBindingsPagedResponse listAdminAccessBindings( + ListAdminAccessBindingsRequest request) { + return listAdminAccessBindingsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a list of admin access bindings in the specified GMP organization. + * + *

Sample code: + * + *

{@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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
+   *     MarketingplatformAdminServiceClient.create()) {
+   *   ListAdminAccessBindingsRequest request =
+   *       ListAdminAccessBindingsRequest.newBuilder()
+   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       marketingplatformAdminServiceClient
+   *           .listAdminAccessBindingsPagedCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   for (AdminAccessBinding element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listAdminAccessBindingsPagedCallable() { + return stub.listAdminAccessBindingsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a list of admin access bindings in the specified GMP organization. + * + *

Sample code: + * + *

{@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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
+   *     MarketingplatformAdminServiceClient.create()) {
+   *   ListAdminAccessBindingsRequest request =
+   *       ListAdminAccessBindingsRequest.newBuilder()
+   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListAdminAccessBindingsResponse response =
+   *         marketingplatformAdminServiceClient.listAdminAccessBindingsCallable().call(request);
+   *     for (AdminAccessBinding element : response.getAdminAccessBindingsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listAdminAccessBindingsCallable() { + return stub.listAdminAccessBindingsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an admin access binding in the specified GMP organization. + * + *

Sample code: + * + *

{@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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
+   *     MarketingplatformAdminServiceClient.create()) {
+   *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
+   *   AdminAccessBinding adminAccessBinding = AdminAccessBinding.newBuilder().build();
+   *   AdminAccessBinding response =
+   *       marketingplatformAdminServiceClient.createAdminAccessBinding(parent, adminAccessBinding);
+   * }
+   * }
+ * + * @param parent Required. The parent organization, which owns this Admin Access Binding. Format: + * organizations/{org_id} + * @param adminAccessBinding Required. The Admin Access Binding to create. + *

Only 'user_email' input is allowed. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AdminAccessBinding createAdminAccessBinding( + @Nullable OrganizationName parent, AdminAccessBinding adminAccessBinding) { + CreateAdminAccessBindingRequest request = + CreateAdminAccessBindingRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setAdminAccessBinding(adminAccessBinding) + .build(); + return createAdminAccessBinding(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an admin access binding in the specified GMP organization. + * + *

Sample code: + * + *

{@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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
+   *     MarketingplatformAdminServiceClient.create()) {
+   *   String parent = OrganizationName.of("[ORGANIZATION]").toString();
+   *   AdminAccessBinding adminAccessBinding = AdminAccessBinding.newBuilder().build();
+   *   AdminAccessBinding response =
+   *       marketingplatformAdminServiceClient.createAdminAccessBinding(parent, adminAccessBinding);
+   * }
+   * }
+ * + * @param parent Required. The parent organization, which owns this Admin Access Binding. Format: + * organizations/{org_id} + * @param adminAccessBinding Required. The Admin Access Binding to create. + *

Only 'user_email' input is allowed. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AdminAccessBinding createAdminAccessBinding( + String parent, AdminAccessBinding adminAccessBinding) { + CreateAdminAccessBindingRequest request = + CreateAdminAccessBindingRequest.newBuilder() + .setParent(parent) + .setAdminAccessBinding(adminAccessBinding) + .build(); + return createAdminAccessBinding(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an admin access binding in the specified GMP organization. + * + *

Sample code: + * + *

{@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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
+   *     MarketingplatformAdminServiceClient.create()) {
+   *   CreateAdminAccessBindingRequest request =
+   *       CreateAdminAccessBindingRequest.newBuilder()
+   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
+   *           .setAdminAccessBinding(AdminAccessBinding.newBuilder().build())
+   *           .build();
+   *   AdminAccessBinding response =
+   *       marketingplatformAdminServiceClient.createAdminAccessBinding(request);
+   * }
+   * }
+ * + * @param 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 + */ + public final AdminAccessBinding createAdminAccessBinding( + CreateAdminAccessBindingRequest request) { + return createAdminAccessBindingCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an admin access binding in the specified GMP organization. + * + *

Sample code: + * + *

{@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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
+   *     MarketingplatformAdminServiceClient.create()) {
+   *   CreateAdminAccessBindingRequest request =
+   *       CreateAdminAccessBindingRequest.newBuilder()
+   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
+   *           .setAdminAccessBinding(AdminAccessBinding.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       marketingplatformAdminServiceClient
+   *           .createAdminAccessBindingCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   AdminAccessBinding response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + createAdminAccessBindingCallable() { + return stub.createAdminAccessBindingCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an admin access binding in the specified GMP organization. + * + *

Sample code: + * + *

{@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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
+   *     MarketingplatformAdminServiceClient.create()) {
+   *   AdminAccessBinding adminAccessBinding = AdminAccessBinding.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   AdminAccessBinding response =
+   *       marketingplatformAdminServiceClient.updateAdminAccessBinding(
+   *           adminAccessBinding, updateMask);
+   * }
+   * }
+ * + * @param adminAccessBinding Required. The AdminAccessBinding to update. + * @param updateMask Required. The list of fields to update. Field names must be in snake case + * (for example, "field_to_update"). Omitted fields will not be updated. To replace the entire + * entity, use one path with the string "*" to match all fields. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AdminAccessBinding updateAdminAccessBinding( + AdminAccessBinding adminAccessBinding, FieldMask updateMask) { + UpdateAdminAccessBindingRequest request = + UpdateAdminAccessBindingRequest.newBuilder() + .setAdminAccessBinding(adminAccessBinding) + .setUpdateMask(updateMask) + .build(); + return updateAdminAccessBinding(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an admin access binding in the specified GMP organization. + * + *

Sample code: + * + *

{@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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
+   *     MarketingplatformAdminServiceClient.create()) {
+   *   UpdateAdminAccessBindingRequest request =
+   *       UpdateAdminAccessBindingRequest.newBuilder()
+   *           .setAdminAccessBinding(AdminAccessBinding.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   AdminAccessBinding response =
+   *       marketingplatformAdminServiceClient.updateAdminAccessBinding(request);
+   * }
+   * }
+ * + * @param 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 + */ + public final AdminAccessBinding updateAdminAccessBinding( + UpdateAdminAccessBindingRequest request) { + return updateAdminAccessBindingCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an admin access binding in the specified GMP organization. + * + *

Sample code: + * + *

{@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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
+   *     MarketingplatformAdminServiceClient.create()) {
+   *   UpdateAdminAccessBindingRequest request =
+   *       UpdateAdminAccessBindingRequest.newBuilder()
+   *           .setAdminAccessBinding(AdminAccessBinding.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       marketingplatformAdminServiceClient
+   *           .updateAdminAccessBindingCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   AdminAccessBinding response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + updateAdminAccessBindingCallable() { + return stub.updateAdminAccessBindingCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } @Override public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { @@ -1524,4 +3614,259 @@ protected ListAnalyticsAccountLinksFixedSizeCollection createCollection( return new ListAnalyticsAccountLinksFixedSizeCollection(pages, collectionSize); } } + + public static class ListUserGroupsPagedResponse + extends AbstractPagedListResponse< + ListUserGroupsRequest, + ListUserGroupsResponse, + UserGroup, + ListUserGroupsPage, + ListUserGroupsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListUserGroupsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListUserGroupsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListUserGroupsPagedResponse(ListUserGroupsPage page) { + super(page, ListUserGroupsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListUserGroupsPage + extends AbstractPage< + ListUserGroupsRequest, ListUserGroupsResponse, UserGroup, ListUserGroupsPage> { + + private ListUserGroupsPage( + @Nullable PageContext context, + @Nullable ListUserGroupsResponse response) { + super(context, response); + } + + private static ListUserGroupsPage createEmptyPage() { + return new ListUserGroupsPage(null, null); + } + + @Override + protected ListUserGroupsPage createPage( + @Nullable PageContext context, + @Nullable ListUserGroupsResponse response) { + return new ListUserGroupsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + @Nullable PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListUserGroupsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListUserGroupsRequest, + ListUserGroupsResponse, + UserGroup, + ListUserGroupsPage, + ListUserGroupsFixedSizeCollection> { + + private ListUserGroupsFixedSizeCollection( + @Nullable List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListUserGroupsFixedSizeCollection createEmptyCollection() { + return new ListUserGroupsFixedSizeCollection(null, 0); + } + + @Override + protected ListUserGroupsFixedSizeCollection createCollection( + @Nullable List pages, int collectionSize) { + return new ListUserGroupsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListUserGroupMembersPagedResponse + extends AbstractPagedListResponse< + ListUserGroupMembersRequest, + ListUserGroupMembersResponse, + UserGroupMember, + ListUserGroupMembersPage, + ListUserGroupMembersFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListUserGroupMembersPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListUserGroupMembersPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListUserGroupMembersPagedResponse(ListUserGroupMembersPage page) { + super(page, ListUserGroupMembersFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListUserGroupMembersPage + extends AbstractPage< + ListUserGroupMembersRequest, + ListUserGroupMembersResponse, + UserGroupMember, + ListUserGroupMembersPage> { + + private ListUserGroupMembersPage( + @Nullable + PageContext + context, + @Nullable ListUserGroupMembersResponse response) { + super(context, response); + } + + private static ListUserGroupMembersPage createEmptyPage() { + return new ListUserGroupMembersPage(null, null); + } + + @Override + protected ListUserGroupMembersPage createPage( + @Nullable + PageContext + context, + @Nullable ListUserGroupMembersResponse response) { + return new ListUserGroupMembersPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + @Nullable + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListUserGroupMembersFixedSizeCollection + extends AbstractFixedSizeCollection< + ListUserGroupMembersRequest, + ListUserGroupMembersResponse, + UserGroupMember, + ListUserGroupMembersPage, + ListUserGroupMembersFixedSizeCollection> { + + private ListUserGroupMembersFixedSizeCollection( + @Nullable List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListUserGroupMembersFixedSizeCollection createEmptyCollection() { + return new ListUserGroupMembersFixedSizeCollection(null, 0); + } + + @Override + protected ListUserGroupMembersFixedSizeCollection createCollection( + @Nullable List pages, int collectionSize) { + return new ListUserGroupMembersFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListAdminAccessBindingsPagedResponse + extends AbstractPagedListResponse< + ListAdminAccessBindingsRequest, + ListAdminAccessBindingsResponse, + AdminAccessBinding, + ListAdminAccessBindingsPage, + ListAdminAccessBindingsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + ListAdminAccessBindingsRequest, ListAdminAccessBindingsResponse, AdminAccessBinding> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListAdminAccessBindingsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListAdminAccessBindingsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListAdminAccessBindingsPagedResponse(ListAdminAccessBindingsPage page) { + super(page, ListAdminAccessBindingsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListAdminAccessBindingsPage + extends AbstractPage< + ListAdminAccessBindingsRequest, + ListAdminAccessBindingsResponse, + AdminAccessBinding, + ListAdminAccessBindingsPage> { + + private ListAdminAccessBindingsPage( + @Nullable + PageContext< + ListAdminAccessBindingsRequest, ListAdminAccessBindingsResponse, AdminAccessBinding> + context, + @Nullable ListAdminAccessBindingsResponse response) { + super(context, response); + } + + private static ListAdminAccessBindingsPage createEmptyPage() { + return new ListAdminAccessBindingsPage(null, null); + } + + @Override + protected ListAdminAccessBindingsPage createPage( + @Nullable + PageContext< + ListAdminAccessBindingsRequest, ListAdminAccessBindingsResponse, AdminAccessBinding> + context, + @Nullable ListAdminAccessBindingsResponse response) { + return new ListAdminAccessBindingsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + @Nullable + PageContext< + ListAdminAccessBindingsRequest, ListAdminAccessBindingsResponse, AdminAccessBinding> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListAdminAccessBindingsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListAdminAccessBindingsRequest, + ListAdminAccessBindingsResponse, + AdminAccessBinding, + ListAdminAccessBindingsPage, + ListAdminAccessBindingsFixedSizeCollection> { + + private ListAdminAccessBindingsFixedSizeCollection( + @Nullable List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListAdminAccessBindingsFixedSizeCollection createEmptyCollection() { + return new ListAdminAccessBindingsFixedSizeCollection(null, 0); + } + + @Override + protected ListAdminAccessBindingsFixedSizeCollection createCollection( + @Nullable List pages, int collectionSize) { + return new ListAdminAccessBindingsFixedSizeCollection(pages, collectionSize); + } + } } diff --git a/java-marketingplatformadminapi/admin/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/MarketingplatformAdminServiceSettings.java b/java-marketingplatformadminapi/admin/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/MarketingplatformAdminServiceSettings.java index abb107e3f116..3913c86f47d3 100644 --- a/java-marketingplatformadminapi/admin/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/MarketingplatformAdminServiceSettings.java +++ b/java-marketingplatformadminapi/admin/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/MarketingplatformAdminServiceSettings.java @@ -16,8 +16,11 @@ package com.google.ads.marketingplatform.admin.v1alpha; +import static com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient.ListAdminAccessBindingsPagedResponse; import static com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient.ListAnalyticsAccountLinksPagedResponse; import static com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient.ListOrganizationsPagedResponse; +import static com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient.ListUserGroupMembersPagedResponse; +import static com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient.ListUserGroupsPagedResponse; import com.google.ads.marketingplatform.admin.v1alpha.stub.MarketingplatformAdminServiceStubSettings; import com.google.api.core.ApiFunction; @@ -157,6 +160,104 @@ public UnaryCallSettings getOrganizationSe .reportPropertyUsageSettings(); } + /** Returns the object with the settings used for calls to getUserGroup. */ + public UnaryCallSettings getUserGroupSettings() { + return ((MarketingplatformAdminServiceStubSettings) getStubSettings()).getUserGroupSettings(); + } + + /** Returns the object with the settings used for calls to listUserGroups. */ + public PagedCallSettings< + ListUserGroupsRequest, ListUserGroupsResponse, ListUserGroupsPagedResponse> + listUserGroupsSettings() { + return ((MarketingplatformAdminServiceStubSettings) getStubSettings()).listUserGroupsSettings(); + } + + /** Returns the object with the settings used for calls to createUserGroup. */ + public UnaryCallSettings createUserGroupSettings() { + return ((MarketingplatformAdminServiceStubSettings) getStubSettings()) + .createUserGroupSettings(); + } + + /** Returns the object with the settings used for calls to updateUserGroup. */ + public UnaryCallSettings updateUserGroupSettings() { + return ((MarketingplatformAdminServiceStubSettings) getStubSettings()) + .updateUserGroupSettings(); + } + + /** Returns the object with the settings used for calls to deleteUserGroup. */ + public UnaryCallSettings deleteUserGroupSettings() { + return ((MarketingplatformAdminServiceStubSettings) getStubSettings()) + .deleteUserGroupSettings(); + } + + /** Returns the object with the settings used for calls to getUserGroupMember. */ + public UnaryCallSettings + getUserGroupMemberSettings() { + return ((MarketingplatformAdminServiceStubSettings) getStubSettings()) + .getUserGroupMemberSettings(); + } + + /** Returns the object with the settings used for calls to listUserGroupMembers. */ + public PagedCallSettings< + ListUserGroupMembersRequest, + ListUserGroupMembersResponse, + ListUserGroupMembersPagedResponse> + listUserGroupMembersSettings() { + return ((MarketingplatformAdminServiceStubSettings) getStubSettings()) + .listUserGroupMembersSettings(); + } + + /** Returns the object with the settings used for calls to createUserGroupMember. */ + public UnaryCallSettings + createUserGroupMemberSettings() { + return ((MarketingplatformAdminServiceStubSettings) getStubSettings()) + .createUserGroupMemberSettings(); + } + + /** Returns the object with the settings used for calls to updateUserGroupMember. */ + public UnaryCallSettings + updateUserGroupMemberSettings() { + return ((MarketingplatformAdminServiceStubSettings) getStubSettings()) + .updateUserGroupMemberSettings(); + } + + /** Returns the object with the settings used for calls to deleteUserGroupMember. */ + public UnaryCallSettings deleteUserGroupMemberSettings() { + return ((MarketingplatformAdminServiceStubSettings) getStubSettings()) + .deleteUserGroupMemberSettings(); + } + + /** Returns the object with the settings used for calls to getAdminAccessBinding. */ + public UnaryCallSettings + getAdminAccessBindingSettings() { + return ((MarketingplatformAdminServiceStubSettings) getStubSettings()) + .getAdminAccessBindingSettings(); + } + + /** Returns the object with the settings used for calls to listAdminAccessBindings. */ + public PagedCallSettings< + ListAdminAccessBindingsRequest, + ListAdminAccessBindingsResponse, + ListAdminAccessBindingsPagedResponse> + listAdminAccessBindingsSettings() { + return ((MarketingplatformAdminServiceStubSettings) getStubSettings()) + .listAdminAccessBindingsSettings(); + } + + /** Returns the object with the settings used for calls to createAdminAccessBinding. */ + public UnaryCallSettings + createAdminAccessBindingSettings() { + return ((MarketingplatformAdminServiceStubSettings) getStubSettings()) + .createAdminAccessBindingSettings(); + } + + /** Returns the object with the settings used for calls to updateAdminAccessBinding. */ + public UnaryCallSettings + updateAdminAccessBindingSettings() { + return ((MarketingplatformAdminServiceStubSettings) getStubSettings()) + .updateAdminAccessBindingSettings(); + } + public static final MarketingplatformAdminServiceSettings create( MarketingplatformAdminServiceStubSettings stub) throws IOException { return new MarketingplatformAdminServiceSettings.Builder(stub.toBuilder()).build(); @@ -324,6 +425,93 @@ public Builder applyToAllUnaryMethods( return getStubSettingsBuilder().reportPropertyUsageSettings(); } + /** Returns the builder for the settings used for calls to getUserGroup. */ + public UnaryCallSettings.Builder getUserGroupSettings() { + return getStubSettingsBuilder().getUserGroupSettings(); + } + + /** Returns the builder for the settings used for calls to listUserGroups. */ + public PagedCallSettings.Builder< + ListUserGroupsRequest, ListUserGroupsResponse, ListUserGroupsPagedResponse> + listUserGroupsSettings() { + return getStubSettingsBuilder().listUserGroupsSettings(); + } + + /** Returns the builder for the settings used for calls to createUserGroup. */ + public UnaryCallSettings.Builder createUserGroupSettings() { + return getStubSettingsBuilder().createUserGroupSettings(); + } + + /** Returns the builder for the settings used for calls to updateUserGroup. */ + public UnaryCallSettings.Builder updateUserGroupSettings() { + return getStubSettingsBuilder().updateUserGroupSettings(); + } + + /** Returns the builder for the settings used for calls to deleteUserGroup. */ + public UnaryCallSettings.Builder deleteUserGroupSettings() { + return getStubSettingsBuilder().deleteUserGroupSettings(); + } + + /** Returns the builder for the settings used for calls to getUserGroupMember. */ + public UnaryCallSettings.Builder + getUserGroupMemberSettings() { + return getStubSettingsBuilder().getUserGroupMemberSettings(); + } + + /** Returns the builder for the settings used for calls to listUserGroupMembers. */ + public PagedCallSettings.Builder< + ListUserGroupMembersRequest, + ListUserGroupMembersResponse, + ListUserGroupMembersPagedResponse> + listUserGroupMembersSettings() { + return getStubSettingsBuilder().listUserGroupMembersSettings(); + } + + /** Returns the builder for the settings used for calls to createUserGroupMember. */ + public UnaryCallSettings.Builder + createUserGroupMemberSettings() { + return getStubSettingsBuilder().createUserGroupMemberSettings(); + } + + /** Returns the builder for the settings used for calls to updateUserGroupMember. */ + public UnaryCallSettings.Builder + updateUserGroupMemberSettings() { + return getStubSettingsBuilder().updateUserGroupMemberSettings(); + } + + /** Returns the builder for the settings used for calls to deleteUserGroupMember. */ + public UnaryCallSettings.Builder + deleteUserGroupMemberSettings() { + return getStubSettingsBuilder().deleteUserGroupMemberSettings(); + } + + /** Returns the builder for the settings used for calls to getAdminAccessBinding. */ + public UnaryCallSettings.Builder + getAdminAccessBindingSettings() { + return getStubSettingsBuilder().getAdminAccessBindingSettings(); + } + + /** Returns the builder for the settings used for calls to listAdminAccessBindings. */ + public PagedCallSettings.Builder< + ListAdminAccessBindingsRequest, + ListAdminAccessBindingsResponse, + ListAdminAccessBindingsPagedResponse> + listAdminAccessBindingsSettings() { + return getStubSettingsBuilder().listAdminAccessBindingsSettings(); + } + + /** Returns the builder for the settings used for calls to createAdminAccessBinding. */ + public UnaryCallSettings.Builder + createAdminAccessBindingSettings() { + return getStubSettingsBuilder().createAdminAccessBindingSettings(); + } + + /** Returns the builder for the settings used for calls to updateAdminAccessBinding. */ + public UnaryCallSettings.Builder + updateAdminAccessBindingSettings() { + return getStubSettingsBuilder().updateAdminAccessBindingSettings(); + } + @Override public MarketingplatformAdminServiceSettings build() throws IOException { return new MarketingplatformAdminServiceSettings(this); diff --git a/java-marketingplatformadminapi/admin/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/gapic_metadata.json b/java-marketingplatformadminapi/admin/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/gapic_metadata.json index 711fb9cc6655..abec1075e356 100644 --- a/java-marketingplatformadminapi/admin/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/gapic_metadata.json +++ b/java-marketingplatformadminapi/admin/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/gapic_metadata.json @@ -10,29 +10,71 @@ "grpc": { "libraryClient": "MarketingplatformAdminServiceClient", "rpcs": { + "CreateAdminAccessBinding": { + "methods": ["createAdminAccessBinding", "createAdminAccessBinding", "createAdminAccessBinding", "createAdminAccessBindingCallable"] + }, "CreateAnalyticsAccountLink": { "methods": ["createAnalyticsAccountLink", "createAnalyticsAccountLink", "createAnalyticsAccountLink", "createAnalyticsAccountLinkCallable"] }, + "CreateUserGroup": { + "methods": ["createUserGroup", "createUserGroup", "createUserGroup", "createUserGroupCallable"] + }, + "CreateUserGroupMember": { + "methods": ["createUserGroupMember", "createUserGroupMember", "createUserGroupMember", "createUserGroupMemberCallable"] + }, "DeleteAnalyticsAccountLink": { "methods": ["deleteAnalyticsAccountLink", "deleteAnalyticsAccountLink", "deleteAnalyticsAccountLink", "deleteAnalyticsAccountLinkCallable"] }, + "DeleteUserGroup": { + "methods": ["deleteUserGroup", "deleteUserGroup", "deleteUserGroup", "deleteUserGroupCallable"] + }, + "DeleteUserGroupMember": { + "methods": ["deleteUserGroupMember", "deleteUserGroupMember", "deleteUserGroupMember", "deleteUserGroupMemberCallable"] + }, "FindSalesPartnerManagedClients": { "methods": ["findSalesPartnerManagedClients", "findSalesPartnerManagedClientsCallable"] }, + "GetAdminAccessBinding": { + "methods": ["getAdminAccessBinding", "getAdminAccessBinding", "getAdminAccessBinding", "getAdminAccessBindingCallable"] + }, "GetOrganization": { "methods": ["getOrganization", "getOrganization", "getOrganization", "getOrganizationCallable"] }, + "GetUserGroup": { + "methods": ["getUserGroup", "getUserGroup", "getUserGroup", "getUserGroupCallable"] + }, + "GetUserGroupMember": { + "methods": ["getUserGroupMember", "getUserGroupMember", "getUserGroupMember", "getUserGroupMemberCallable"] + }, + "ListAdminAccessBindings": { + "methods": ["listAdminAccessBindings", "listAdminAccessBindings", "listAdminAccessBindings", "listAdminAccessBindingsPagedCallable", "listAdminAccessBindingsCallable"] + }, "ListAnalyticsAccountLinks": { "methods": ["listAnalyticsAccountLinks", "listAnalyticsAccountLinks", "listAnalyticsAccountLinks", "listAnalyticsAccountLinksPagedCallable", "listAnalyticsAccountLinksCallable"] }, "ListOrganizations": { "methods": ["listOrganizations", "listOrganizationsPagedCallable", "listOrganizationsCallable"] }, + "ListUserGroupMembers": { + "methods": ["listUserGroupMembers", "listUserGroupMembers", "listUserGroupMembers", "listUserGroupMembersPagedCallable", "listUserGroupMembersCallable"] + }, + "ListUserGroups": { + "methods": ["listUserGroups", "listUserGroups", "listUserGroups", "listUserGroupsPagedCallable", "listUserGroupsCallable"] + }, "ReportPropertyUsage": { "methods": ["reportPropertyUsage", "reportPropertyUsage", "reportPropertyUsageCallable"] }, "SetPropertyServiceLevel": { "methods": ["setPropertyServiceLevel", "setPropertyServiceLevel", "setPropertyServiceLevelCallable"] + }, + "UpdateAdminAccessBinding": { + "methods": ["updateAdminAccessBinding", "updateAdminAccessBinding", "updateAdminAccessBindingCallable"] + }, + "UpdateUserGroup": { + "methods": ["updateUserGroup", "updateUserGroup", "updateUserGroupCallable"] + }, + "UpdateUserGroupMember": { + "methods": ["updateUserGroupMember", "updateUserGroupMember", "updateUserGroupMemberCallable"] } } } diff --git a/java-marketingplatformadminapi/admin/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/stub/GrpcMarketingplatformAdminServiceStub.java b/java-marketingplatformadminapi/admin/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/stub/GrpcMarketingplatformAdminServiceStub.java index de81457e7799..61e0a3b18fe3 100644 --- a/java-marketingplatformadminapi/admin/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/stub/GrpcMarketingplatformAdminServiceStub.java +++ b/java-marketingplatformadminapi/admin/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/stub/GrpcMarketingplatformAdminServiceStub.java @@ -16,24 +16,47 @@ package com.google.ads.marketingplatform.admin.v1alpha.stub; +import static com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient.ListAdminAccessBindingsPagedResponse; import static com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient.ListAnalyticsAccountLinksPagedResponse; import static com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient.ListOrganizationsPagedResponse; +import static com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient.ListUserGroupMembersPagedResponse; +import static com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient.ListUserGroupsPagedResponse; +import com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding; import com.google.ads.marketingplatform.admin.v1alpha.AnalyticsAccountLink; +import com.google.ads.marketingplatform.admin.v1alpha.CreateAdminAccessBindingRequest; import com.google.ads.marketingplatform.admin.v1alpha.CreateAnalyticsAccountLinkRequest; +import com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupMemberRequest; +import com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupRequest; import com.google.ads.marketingplatform.admin.v1alpha.DeleteAnalyticsAccountLinkRequest; +import com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupMemberRequest; +import com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupRequest; import com.google.ads.marketingplatform.admin.v1alpha.FindSalesPartnerManagedClientsRequest; import com.google.ads.marketingplatform.admin.v1alpha.FindSalesPartnerManagedClientsResponse; +import com.google.ads.marketingplatform.admin.v1alpha.GetAdminAccessBindingRequest; import com.google.ads.marketingplatform.admin.v1alpha.GetOrganizationRequest; +import com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupMemberRequest; +import com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupRequest; +import com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsRequest; +import com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsResponse; import com.google.ads.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest; import com.google.ads.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksResponse; import com.google.ads.marketingplatform.admin.v1alpha.ListOrganizationsRequest; import com.google.ads.marketingplatform.admin.v1alpha.ListOrganizationsResponse; +import com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersRequest; +import com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersResponse; +import com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsRequest; +import com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsResponse; import com.google.ads.marketingplatform.admin.v1alpha.Organization; import com.google.ads.marketingplatform.admin.v1alpha.ReportPropertyUsageRequest; import com.google.ads.marketingplatform.admin.v1alpha.ReportPropertyUsageResponse; import com.google.ads.marketingplatform.admin.v1alpha.SetPropertyServiceLevelRequest; import com.google.ads.marketingplatform.admin.v1alpha.SetPropertyServiceLevelResponse; +import com.google.ads.marketingplatform.admin.v1alpha.UpdateAdminAccessBindingRequest; +import com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupMemberRequest; +import com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupRequest; +import com.google.ads.marketingplatform.admin.v1alpha.UserGroup; +import com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember; import com.google.api.core.BetaApi; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.core.BackgroundResourceAggregation; @@ -171,6 +194,178 @@ public class GrpcMarketingplatformAdminServiceStub extends MarketingplatformAdmi .setSampledToLocalTracing(true) .build(); + private static final MethodDescriptor + getUserGroupMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.marketingplatform.admin.v1alpha.MarketingplatformAdminService/GetUserGroup") + .setRequestMarshaller(ProtoUtils.marshaller(GetUserGroupRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(UserGroup.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + listUserGroupsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.marketingplatform.admin.v1alpha.MarketingplatformAdminService/ListUserGroups") + .setRequestMarshaller( + ProtoUtils.marshaller(ListUserGroupsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListUserGroupsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + createUserGroupMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.marketingplatform.admin.v1alpha.MarketingplatformAdminService/CreateUserGroup") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateUserGroupRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(UserGroup.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + updateUserGroupMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.marketingplatform.admin.v1alpha.MarketingplatformAdminService/UpdateUserGroup") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateUserGroupRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(UserGroup.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + deleteUserGroupMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.marketingplatform.admin.v1alpha.MarketingplatformAdminService/DeleteUserGroup") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteUserGroupRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + getUserGroupMemberMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.marketingplatform.admin.v1alpha.MarketingplatformAdminService/GetUserGroupMember") + .setRequestMarshaller( + ProtoUtils.marshaller(GetUserGroupMemberRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(UserGroupMember.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + listUserGroupMembersMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.marketingplatform.admin.v1alpha.MarketingplatformAdminService/ListUserGroupMembers") + .setRequestMarshaller( + ProtoUtils.marshaller(ListUserGroupMembersRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListUserGroupMembersResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + createUserGroupMemberMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.marketingplatform.admin.v1alpha.MarketingplatformAdminService/CreateUserGroupMember") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateUserGroupMemberRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(UserGroupMember.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + updateUserGroupMemberMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.marketingplatform.admin.v1alpha.MarketingplatformAdminService/UpdateUserGroupMember") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateUserGroupMemberRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(UserGroupMember.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + deleteUserGroupMemberMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.marketingplatform.admin.v1alpha.MarketingplatformAdminService/DeleteUserGroupMember") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteUserGroupMemberRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + getAdminAccessBindingMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.marketingplatform.admin.v1alpha.MarketingplatformAdminService/GetAdminAccessBinding") + .setRequestMarshaller( + ProtoUtils.marshaller(GetAdminAccessBindingRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(AdminAccessBinding.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor< + ListAdminAccessBindingsRequest, ListAdminAccessBindingsResponse> + listAdminAccessBindingsMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.marketingplatform.admin.v1alpha.MarketingplatformAdminService/ListAdminAccessBindings") + .setRequestMarshaller( + ProtoUtils.marshaller(ListAdminAccessBindingsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListAdminAccessBindingsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + createAdminAccessBindingMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.marketingplatform.admin.v1alpha.MarketingplatformAdminService/CreateAdminAccessBinding") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateAdminAccessBindingRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(AdminAccessBinding.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + updateAdminAccessBindingMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.marketingplatform.admin.v1alpha.MarketingplatformAdminService/UpdateAdminAccessBinding") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateAdminAccessBindingRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(AdminAccessBinding.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + private final UnaryCallable getOrganizationCallable; private final UnaryCallable listOrganizationsCallable; @@ -192,6 +387,34 @@ public class GrpcMarketingplatformAdminServiceStub extends MarketingplatformAdmi setPropertyServiceLevelCallable; private final UnaryCallable reportPropertyUsageCallable; + private final UnaryCallable getUserGroupCallable; + private final UnaryCallable listUserGroupsCallable; + private final UnaryCallable + listUserGroupsPagedCallable; + private final UnaryCallable createUserGroupCallable; + private final UnaryCallable updateUserGroupCallable; + private final UnaryCallable deleteUserGroupCallable; + private final UnaryCallable + getUserGroupMemberCallable; + private final UnaryCallable + listUserGroupMembersCallable; + private final UnaryCallable + listUserGroupMembersPagedCallable; + private final UnaryCallable + createUserGroupMemberCallable; + private final UnaryCallable + updateUserGroupMemberCallable; + private final UnaryCallable deleteUserGroupMemberCallable; + private final UnaryCallable + getAdminAccessBindingCallable; + private final UnaryCallable + listAdminAccessBindingsCallable; + private final UnaryCallable + listAdminAccessBindingsPagedCallable; + private final UnaryCallable + createAdminAccessBindingCallable; + private final UnaryCallable + updateAdminAccessBindingCallable; private final BackgroundResource backgroundResources; private final GrpcOperationsStub operationsStub; @@ -333,6 +556,171 @@ protected GrpcMarketingplatformAdminServiceStub( return builder.build(); }) .build(); + GrpcCallSettings getUserGroupTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getUserGroupMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings + listUserGroupsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listUserGroupsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings createUserGroupTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createUserGroupMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings updateUserGroupTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateUserGroupMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("user_group.name", String.valueOf(request.getUserGroup().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteUserGroupTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteUserGroupMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings + getUserGroupMemberTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getUserGroupMemberMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings + listUserGroupMembersTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listUserGroupMembersMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings + createUserGroupMemberTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createUserGroupMemberMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings + updateUserGroupMemberTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateUserGroupMemberMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "user_group_member.name", + String.valueOf(request.getUserGroupMember().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteUserGroupMemberTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteUserGroupMemberMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings + getAdminAccessBindingTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getAdminAccessBindingMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings + listAdminAccessBindingsTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(listAdminAccessBindingsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings + createAdminAccessBindingTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createAdminAccessBindingMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings + updateAdminAccessBindingTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateAdminAccessBindingMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "admin_access_binding.name", + String.valueOf(request.getAdminAccessBinding().getName())); + return builder.build(); + }) + .build(); this.getOrganizationCallable = callableFactory.createUnaryCallable( @@ -382,6 +770,79 @@ protected GrpcMarketingplatformAdminServiceStub( reportPropertyUsageTransportSettings, settings.reportPropertyUsageSettings(), clientContext); + this.getUserGroupCallable = + callableFactory.createUnaryCallable( + getUserGroupTransportSettings, settings.getUserGroupSettings(), clientContext); + this.listUserGroupsCallable = + callableFactory.createUnaryCallable( + listUserGroupsTransportSettings, settings.listUserGroupsSettings(), clientContext); + this.listUserGroupsPagedCallable = + callableFactory.createPagedCallable( + listUserGroupsTransportSettings, settings.listUserGroupsSettings(), clientContext); + this.createUserGroupCallable = + callableFactory.createUnaryCallable( + createUserGroupTransportSettings, settings.createUserGroupSettings(), clientContext); + this.updateUserGroupCallable = + callableFactory.createUnaryCallable( + updateUserGroupTransportSettings, settings.updateUserGroupSettings(), clientContext); + this.deleteUserGroupCallable = + callableFactory.createUnaryCallable( + deleteUserGroupTransportSettings, settings.deleteUserGroupSettings(), clientContext); + this.getUserGroupMemberCallable = + callableFactory.createUnaryCallable( + getUserGroupMemberTransportSettings, + settings.getUserGroupMemberSettings(), + clientContext); + this.listUserGroupMembersCallable = + callableFactory.createUnaryCallable( + listUserGroupMembersTransportSettings, + settings.listUserGroupMembersSettings(), + clientContext); + this.listUserGroupMembersPagedCallable = + callableFactory.createPagedCallable( + listUserGroupMembersTransportSettings, + settings.listUserGroupMembersSettings(), + clientContext); + this.createUserGroupMemberCallable = + callableFactory.createUnaryCallable( + createUserGroupMemberTransportSettings, + settings.createUserGroupMemberSettings(), + clientContext); + this.updateUserGroupMemberCallable = + callableFactory.createUnaryCallable( + updateUserGroupMemberTransportSettings, + settings.updateUserGroupMemberSettings(), + clientContext); + this.deleteUserGroupMemberCallable = + callableFactory.createUnaryCallable( + deleteUserGroupMemberTransportSettings, + settings.deleteUserGroupMemberSettings(), + clientContext); + this.getAdminAccessBindingCallable = + callableFactory.createUnaryCallable( + getAdminAccessBindingTransportSettings, + settings.getAdminAccessBindingSettings(), + clientContext); + this.listAdminAccessBindingsCallable = + callableFactory.createUnaryCallable( + listAdminAccessBindingsTransportSettings, + settings.listAdminAccessBindingsSettings(), + clientContext); + this.listAdminAccessBindingsPagedCallable = + callableFactory.createPagedCallable( + listAdminAccessBindingsTransportSettings, + settings.listAdminAccessBindingsSettings(), + clientContext); + this.createAdminAccessBindingCallable = + callableFactory.createUnaryCallable( + createAdminAccessBindingTransportSettings, + settings.createAdminAccessBindingSettings(), + clientContext); + this.updateAdminAccessBindingCallable = + callableFactory.createUnaryCallable( + updateAdminAccessBindingTransportSettings, + settings.updateAdminAccessBindingSettings(), + clientContext); this.backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); @@ -451,6 +912,101 @@ public UnaryCallable getOrganizationCallab return reportPropertyUsageCallable; } + @Override + public UnaryCallable getUserGroupCallable() { + return getUserGroupCallable; + } + + @Override + public UnaryCallable listUserGroupsCallable() { + return listUserGroupsCallable; + } + + @Override + public UnaryCallable + listUserGroupsPagedCallable() { + return listUserGroupsPagedCallable; + } + + @Override + public UnaryCallable createUserGroupCallable() { + return createUserGroupCallable; + } + + @Override + public UnaryCallable updateUserGroupCallable() { + return updateUserGroupCallable; + } + + @Override + public UnaryCallable deleteUserGroupCallable() { + return deleteUserGroupCallable; + } + + @Override + public UnaryCallable getUserGroupMemberCallable() { + return getUserGroupMemberCallable; + } + + @Override + public UnaryCallable + listUserGroupMembersCallable() { + return listUserGroupMembersCallable; + } + + @Override + public UnaryCallable + listUserGroupMembersPagedCallable() { + return listUserGroupMembersPagedCallable; + } + + @Override + public UnaryCallable + createUserGroupMemberCallable() { + return createUserGroupMemberCallable; + } + + @Override + public UnaryCallable + updateUserGroupMemberCallable() { + return updateUserGroupMemberCallable; + } + + @Override + public UnaryCallable deleteUserGroupMemberCallable() { + return deleteUserGroupMemberCallable; + } + + @Override + public UnaryCallable + getAdminAccessBindingCallable() { + return getAdminAccessBindingCallable; + } + + @Override + public UnaryCallable + listAdminAccessBindingsCallable() { + return listAdminAccessBindingsCallable; + } + + @Override + public UnaryCallable + listAdminAccessBindingsPagedCallable() { + return listAdminAccessBindingsPagedCallable; + } + + @Override + public UnaryCallable + createAdminAccessBindingCallable() { + return createAdminAccessBindingCallable; + } + + @Override + public UnaryCallable + updateAdminAccessBindingCallable() { + return updateAdminAccessBindingCallable; + } + @Override public final void close() { try { diff --git a/java-marketingplatformadminapi/admin/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/stub/HttpJsonMarketingplatformAdminServiceStub.java b/java-marketingplatformadminapi/admin/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/stub/HttpJsonMarketingplatformAdminServiceStub.java index 94da39cb8b95..2457b025e42f 100644 --- a/java-marketingplatformadminapi/admin/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/stub/HttpJsonMarketingplatformAdminServiceStub.java +++ b/java-marketingplatformadminapi/admin/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/stub/HttpJsonMarketingplatformAdminServiceStub.java @@ -16,24 +16,47 @@ package com.google.ads.marketingplatform.admin.v1alpha.stub; +import static com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient.ListAdminAccessBindingsPagedResponse; import static com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient.ListAnalyticsAccountLinksPagedResponse; import static com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient.ListOrganizationsPagedResponse; +import static com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient.ListUserGroupMembersPagedResponse; +import static com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient.ListUserGroupsPagedResponse; +import com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding; import com.google.ads.marketingplatform.admin.v1alpha.AnalyticsAccountLink; +import com.google.ads.marketingplatform.admin.v1alpha.CreateAdminAccessBindingRequest; import com.google.ads.marketingplatform.admin.v1alpha.CreateAnalyticsAccountLinkRequest; +import com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupMemberRequest; +import com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupRequest; import com.google.ads.marketingplatform.admin.v1alpha.DeleteAnalyticsAccountLinkRequest; +import com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupMemberRequest; +import com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupRequest; import com.google.ads.marketingplatform.admin.v1alpha.FindSalesPartnerManagedClientsRequest; import com.google.ads.marketingplatform.admin.v1alpha.FindSalesPartnerManagedClientsResponse; +import com.google.ads.marketingplatform.admin.v1alpha.GetAdminAccessBindingRequest; import com.google.ads.marketingplatform.admin.v1alpha.GetOrganizationRequest; +import com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupMemberRequest; +import com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupRequest; +import com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsRequest; +import com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsResponse; import com.google.ads.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest; import com.google.ads.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksResponse; import com.google.ads.marketingplatform.admin.v1alpha.ListOrganizationsRequest; import com.google.ads.marketingplatform.admin.v1alpha.ListOrganizationsResponse; +import com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersRequest; +import com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersResponse; +import com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsRequest; +import com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsResponse; import com.google.ads.marketingplatform.admin.v1alpha.Organization; import com.google.ads.marketingplatform.admin.v1alpha.ReportPropertyUsageRequest; import com.google.ads.marketingplatform.admin.v1alpha.ReportPropertyUsageResponse; import com.google.ads.marketingplatform.admin.v1alpha.SetPropertyServiceLevelRequest; import com.google.ads.marketingplatform.admin.v1alpha.SetPropertyServiceLevelResponse; +import com.google.ads.marketingplatform.admin.v1alpha.UpdateAdminAccessBindingRequest; +import com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupMemberRequest; +import com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupRequest; +import com.google.ads.marketingplatform.admin.v1alpha.UserGroup; +import com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember; import com.google.api.core.BetaApi; import com.google.api.core.InternalApi; import com.google.api.gax.core.BackgroundResource; @@ -384,6 +407,536 @@ public class HttpJsonMarketingplatformAdminServiceStub extends Marketingplatform .build()) .build(); + private static final ApiMethodDescriptor + getUserGroupMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.marketingplatform.admin.v1alpha.MarketingplatformAdminService/GetUserGroup") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{name=organizations/*/userGroups/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(UserGroup.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listUserGroupsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.marketingplatform.admin.v1alpha.MarketingplatformAdminService/ListUserGroups") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{parent=organizations/*}/userGroups", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListUserGroupsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createUserGroupMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.marketingplatform.admin.v1alpha.MarketingplatformAdminService/CreateUserGroup") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{parent=organizations/*}/userGroups", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("userGroup", request.getUserGroup(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(UserGroup.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateUserGroupMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.marketingplatform.admin.v1alpha.MarketingplatformAdminService/UpdateUserGroup") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{userGroup.name=organizations/*/userGroups/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "userGroup.name", request.getUserGroup().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("userGroup", request.getUserGroup(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(UserGroup.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteUserGroupMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.marketingplatform.admin.v1alpha.MarketingplatformAdminService/DeleteUserGroup") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{name=organizations/*/userGroups/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getUserGroupMemberMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.marketingplatform.admin.v1alpha.MarketingplatformAdminService/GetUserGroupMember") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{name=organizations/*/userGroups/*/members/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(UserGroupMember.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + ListUserGroupMembersRequest, ListUserGroupMembersResponse> + listUserGroupMembersMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.marketingplatform.admin.v1alpha.MarketingplatformAdminService/ListUserGroupMembers") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{parent=organizations/*/userGroups/*}/members", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListUserGroupMembersResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createUserGroupMemberMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.marketingplatform.admin.v1alpha.MarketingplatformAdminService/CreateUserGroupMember") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{parent=organizations/*/userGroups/*}/members", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("userGroupMember", request.getUserGroupMember(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(UserGroupMember.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateUserGroupMemberMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.marketingplatform.admin.v1alpha.MarketingplatformAdminService/UpdateUserGroupMember") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{userGroupMember.name=organizations/*/userGroups/*/members/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, + "userGroupMember.name", + request.getUserGroupMember().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("userGroupMember", request.getUserGroupMember(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(UserGroupMember.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteUserGroupMemberMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.marketingplatform.admin.v1alpha.MarketingplatformAdminService/DeleteUserGroupMember") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{name=organizations/*/userGroups/*/members/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getAdminAccessBindingMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.marketingplatform.admin.v1alpha.MarketingplatformAdminService/GetAdminAccessBinding") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{name=organizations/*/adminAccessBindings/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(AdminAccessBinding.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + ListAdminAccessBindingsRequest, ListAdminAccessBindingsResponse> + listAdminAccessBindingsMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.marketingplatform.admin.v1alpha.MarketingplatformAdminService/ListAdminAccessBindings") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{parent=organizations/*}/adminAccessBindings", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListAdminAccessBindingsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createAdminAccessBindingMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.marketingplatform.admin.v1alpha.MarketingplatformAdminService/CreateAdminAccessBinding") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{parent=organizations/*}/adminAccessBindings", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody( + "adminAccessBinding", request.getAdminAccessBinding(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(AdminAccessBinding.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateAdminAccessBindingMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.marketingplatform.admin.v1alpha.MarketingplatformAdminService/UpdateAdminAccessBinding") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{adminAccessBinding.name=organizations/*/adminAccessBindings/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, + "adminAccessBinding.name", + request.getAdminAccessBinding().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody( + "adminAccessBinding", request.getAdminAccessBinding(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(AdminAccessBinding.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + private final UnaryCallable getOrganizationCallable; private final UnaryCallable listOrganizationsCallable; @@ -405,6 +958,34 @@ public class HttpJsonMarketingplatformAdminServiceStub extends Marketingplatform setPropertyServiceLevelCallable; private final UnaryCallable reportPropertyUsageCallable; + private final UnaryCallable getUserGroupCallable; + private final UnaryCallable listUserGroupsCallable; + private final UnaryCallable + listUserGroupsPagedCallable; + private final UnaryCallable createUserGroupCallable; + private final UnaryCallable updateUserGroupCallable; + private final UnaryCallable deleteUserGroupCallable; + private final UnaryCallable + getUserGroupMemberCallable; + private final UnaryCallable + listUserGroupMembersCallable; + private final UnaryCallable + listUserGroupMembersPagedCallable; + private final UnaryCallable + createUserGroupMemberCallable; + private final UnaryCallable + updateUserGroupMemberCallable; + private final UnaryCallable deleteUserGroupMemberCallable; + private final UnaryCallable + getAdminAccessBindingCallable; + private final UnaryCallable + listAdminAccessBindingsCallable; + private final UnaryCallable + listAdminAccessBindingsPagedCallable; + private final UnaryCallable + createAdminAccessBindingCallable; + private final UnaryCallable + updateAdminAccessBindingCallable; private final BackgroundResource backgroundResources; private final HttpJsonStubCallableFactory callableFactory; @@ -555,6 +1136,187 @@ protected HttpJsonMarketingplatformAdminServiceStub( return builder.build(); }) .build(); + HttpJsonCallSettings getUserGroupTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getUserGroupMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings + listUserGroupsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listUserGroupsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings createUserGroupTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createUserGroupMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings updateUserGroupTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateUserGroupMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("user_group.name", String.valueOf(request.getUserGroup().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteUserGroupTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteUserGroupMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings + getUserGroupMemberTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getUserGroupMemberMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings + listUserGroupMembersTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(listUserGroupMembersMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings + createUserGroupMemberTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createUserGroupMemberMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings + updateUserGroupMemberTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateUserGroupMemberMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "user_group_member.name", + String.valueOf(request.getUserGroupMember().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + deleteUserGroupMemberTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteUserGroupMemberMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings + getAdminAccessBindingTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getAdminAccessBindingMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings + listAdminAccessBindingsTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(listAdminAccessBindingsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings + createAdminAccessBindingTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createAdminAccessBindingMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings + updateAdminAccessBindingTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateAdminAccessBindingMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "admin_access_binding.name", + String.valueOf(request.getAdminAccessBinding().getName())); + return builder.build(); + }) + .build(); this.getOrganizationCallable = callableFactory.createUnaryCallable( @@ -604,6 +1366,79 @@ protected HttpJsonMarketingplatformAdminServiceStub( reportPropertyUsageTransportSettings, settings.reportPropertyUsageSettings(), clientContext); + this.getUserGroupCallable = + callableFactory.createUnaryCallable( + getUserGroupTransportSettings, settings.getUserGroupSettings(), clientContext); + this.listUserGroupsCallable = + callableFactory.createUnaryCallable( + listUserGroupsTransportSettings, settings.listUserGroupsSettings(), clientContext); + this.listUserGroupsPagedCallable = + callableFactory.createPagedCallable( + listUserGroupsTransportSettings, settings.listUserGroupsSettings(), clientContext); + this.createUserGroupCallable = + callableFactory.createUnaryCallable( + createUserGroupTransportSettings, settings.createUserGroupSettings(), clientContext); + this.updateUserGroupCallable = + callableFactory.createUnaryCallable( + updateUserGroupTransportSettings, settings.updateUserGroupSettings(), clientContext); + this.deleteUserGroupCallable = + callableFactory.createUnaryCallable( + deleteUserGroupTransportSettings, settings.deleteUserGroupSettings(), clientContext); + this.getUserGroupMemberCallable = + callableFactory.createUnaryCallable( + getUserGroupMemberTransportSettings, + settings.getUserGroupMemberSettings(), + clientContext); + this.listUserGroupMembersCallable = + callableFactory.createUnaryCallable( + listUserGroupMembersTransportSettings, + settings.listUserGroupMembersSettings(), + clientContext); + this.listUserGroupMembersPagedCallable = + callableFactory.createPagedCallable( + listUserGroupMembersTransportSettings, + settings.listUserGroupMembersSettings(), + clientContext); + this.createUserGroupMemberCallable = + callableFactory.createUnaryCallable( + createUserGroupMemberTransportSettings, + settings.createUserGroupMemberSettings(), + clientContext); + this.updateUserGroupMemberCallable = + callableFactory.createUnaryCallable( + updateUserGroupMemberTransportSettings, + settings.updateUserGroupMemberSettings(), + clientContext); + this.deleteUserGroupMemberCallable = + callableFactory.createUnaryCallable( + deleteUserGroupMemberTransportSettings, + settings.deleteUserGroupMemberSettings(), + clientContext); + this.getAdminAccessBindingCallable = + callableFactory.createUnaryCallable( + getAdminAccessBindingTransportSettings, + settings.getAdminAccessBindingSettings(), + clientContext); + this.listAdminAccessBindingsCallable = + callableFactory.createUnaryCallable( + listAdminAccessBindingsTransportSettings, + settings.listAdminAccessBindingsSettings(), + clientContext); + this.listAdminAccessBindingsPagedCallable = + callableFactory.createPagedCallable( + listAdminAccessBindingsTransportSettings, + settings.listAdminAccessBindingsSettings(), + clientContext); + this.createAdminAccessBindingCallable = + callableFactory.createUnaryCallable( + createAdminAccessBindingTransportSettings, + settings.createAdminAccessBindingSettings(), + clientContext); + this.updateAdminAccessBindingCallable = + callableFactory.createUnaryCallable( + updateAdminAccessBindingTransportSettings, + settings.updateAdminAccessBindingSettings(), + clientContext); this.backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); @@ -620,6 +1455,20 @@ public static List getMethodDescriptors() { methodDescriptors.add(deleteAnalyticsAccountLinkMethodDescriptor); methodDescriptors.add(setPropertyServiceLevelMethodDescriptor); methodDescriptors.add(reportPropertyUsageMethodDescriptor); + methodDescriptors.add(getUserGroupMethodDescriptor); + methodDescriptors.add(listUserGroupsMethodDescriptor); + methodDescriptors.add(createUserGroupMethodDescriptor); + methodDescriptors.add(updateUserGroupMethodDescriptor); + methodDescriptors.add(deleteUserGroupMethodDescriptor); + methodDescriptors.add(getUserGroupMemberMethodDescriptor); + methodDescriptors.add(listUserGroupMembersMethodDescriptor); + methodDescriptors.add(createUserGroupMemberMethodDescriptor); + methodDescriptors.add(updateUserGroupMemberMethodDescriptor); + methodDescriptors.add(deleteUserGroupMemberMethodDescriptor); + methodDescriptors.add(getAdminAccessBindingMethodDescriptor); + methodDescriptors.add(listAdminAccessBindingsMethodDescriptor); + methodDescriptors.add(createAdminAccessBindingMethodDescriptor); + methodDescriptors.add(updateAdminAccessBindingMethodDescriptor); return methodDescriptors; } @@ -683,6 +1532,101 @@ public UnaryCallable getOrganizationCallab return reportPropertyUsageCallable; } + @Override + public UnaryCallable getUserGroupCallable() { + return getUserGroupCallable; + } + + @Override + public UnaryCallable listUserGroupsCallable() { + return listUserGroupsCallable; + } + + @Override + public UnaryCallable + listUserGroupsPagedCallable() { + return listUserGroupsPagedCallable; + } + + @Override + public UnaryCallable createUserGroupCallable() { + return createUserGroupCallable; + } + + @Override + public UnaryCallable updateUserGroupCallable() { + return updateUserGroupCallable; + } + + @Override + public UnaryCallable deleteUserGroupCallable() { + return deleteUserGroupCallable; + } + + @Override + public UnaryCallable getUserGroupMemberCallable() { + return getUserGroupMemberCallable; + } + + @Override + public UnaryCallable + listUserGroupMembersCallable() { + return listUserGroupMembersCallable; + } + + @Override + public UnaryCallable + listUserGroupMembersPagedCallable() { + return listUserGroupMembersPagedCallable; + } + + @Override + public UnaryCallable + createUserGroupMemberCallable() { + return createUserGroupMemberCallable; + } + + @Override + public UnaryCallable + updateUserGroupMemberCallable() { + return updateUserGroupMemberCallable; + } + + @Override + public UnaryCallable deleteUserGroupMemberCallable() { + return deleteUserGroupMemberCallable; + } + + @Override + public UnaryCallable + getAdminAccessBindingCallable() { + return getAdminAccessBindingCallable; + } + + @Override + public UnaryCallable + listAdminAccessBindingsCallable() { + return listAdminAccessBindingsCallable; + } + + @Override + public UnaryCallable + listAdminAccessBindingsPagedCallable() { + return listAdminAccessBindingsPagedCallable; + } + + @Override + public UnaryCallable + createAdminAccessBindingCallable() { + return createAdminAccessBindingCallable; + } + + @Override + public UnaryCallable + updateAdminAccessBindingCallable() { + return updateAdminAccessBindingCallable; + } + @Override public final void close() { try { diff --git a/java-marketingplatformadminapi/admin/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/stub/MarketingplatformAdminServiceStub.java b/java-marketingplatformadminapi/admin/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/stub/MarketingplatformAdminServiceStub.java index 4dcd03a2c2d3..d579c0d5054e 100644 --- a/java-marketingplatformadminapi/admin/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/stub/MarketingplatformAdminServiceStub.java +++ b/java-marketingplatformadminapi/admin/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/stub/MarketingplatformAdminServiceStub.java @@ -16,24 +16,47 @@ package com.google.ads.marketingplatform.admin.v1alpha.stub; +import static com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient.ListAdminAccessBindingsPagedResponse; import static com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient.ListAnalyticsAccountLinksPagedResponse; import static com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient.ListOrganizationsPagedResponse; +import static com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient.ListUserGroupMembersPagedResponse; +import static com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient.ListUserGroupsPagedResponse; +import com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding; import com.google.ads.marketingplatform.admin.v1alpha.AnalyticsAccountLink; +import com.google.ads.marketingplatform.admin.v1alpha.CreateAdminAccessBindingRequest; import com.google.ads.marketingplatform.admin.v1alpha.CreateAnalyticsAccountLinkRequest; +import com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupMemberRequest; +import com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupRequest; import com.google.ads.marketingplatform.admin.v1alpha.DeleteAnalyticsAccountLinkRequest; +import com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupMemberRequest; +import com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupRequest; import com.google.ads.marketingplatform.admin.v1alpha.FindSalesPartnerManagedClientsRequest; import com.google.ads.marketingplatform.admin.v1alpha.FindSalesPartnerManagedClientsResponse; +import com.google.ads.marketingplatform.admin.v1alpha.GetAdminAccessBindingRequest; import com.google.ads.marketingplatform.admin.v1alpha.GetOrganizationRequest; +import com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupMemberRequest; +import com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupRequest; +import com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsRequest; +import com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsResponse; import com.google.ads.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest; import com.google.ads.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksResponse; import com.google.ads.marketingplatform.admin.v1alpha.ListOrganizationsRequest; import com.google.ads.marketingplatform.admin.v1alpha.ListOrganizationsResponse; +import com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersRequest; +import com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersResponse; +import com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsRequest; +import com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsResponse; import com.google.ads.marketingplatform.admin.v1alpha.Organization; import com.google.ads.marketingplatform.admin.v1alpha.ReportPropertyUsageRequest; import com.google.ads.marketingplatform.admin.v1alpha.ReportPropertyUsageResponse; import com.google.ads.marketingplatform.admin.v1alpha.SetPropertyServiceLevelRequest; import com.google.ads.marketingplatform.admin.v1alpha.SetPropertyServiceLevelResponse; +import com.google.ads.marketingplatform.admin.v1alpha.UpdateAdminAccessBindingRequest; +import com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupMemberRequest; +import com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupRequest; +import com.google.ads.marketingplatform.admin.v1alpha.UserGroup; +import com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember; import com.google.api.core.BetaApi; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.rpc.UnaryCallable; @@ -106,6 +129,85 @@ public UnaryCallable getOrganizationCallab throw new UnsupportedOperationException("Not implemented: reportPropertyUsageCallable()"); } + public UnaryCallable getUserGroupCallable() { + throw new UnsupportedOperationException("Not implemented: getUserGroupCallable()"); + } + + public UnaryCallable + listUserGroupsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listUserGroupsPagedCallable()"); + } + + public UnaryCallable listUserGroupsCallable() { + throw new UnsupportedOperationException("Not implemented: listUserGroupsCallable()"); + } + + public UnaryCallable createUserGroupCallable() { + throw new UnsupportedOperationException("Not implemented: createUserGroupCallable()"); + } + + public UnaryCallable updateUserGroupCallable() { + throw new UnsupportedOperationException("Not implemented: updateUserGroupCallable()"); + } + + public UnaryCallable deleteUserGroupCallable() { + throw new UnsupportedOperationException("Not implemented: deleteUserGroupCallable()"); + } + + public UnaryCallable getUserGroupMemberCallable() { + throw new UnsupportedOperationException("Not implemented: getUserGroupMemberCallable()"); + } + + public UnaryCallable + listUserGroupMembersPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listUserGroupMembersPagedCallable()"); + } + + public UnaryCallable + listUserGroupMembersCallable() { + throw new UnsupportedOperationException("Not implemented: listUserGroupMembersCallable()"); + } + + public UnaryCallable + createUserGroupMemberCallable() { + throw new UnsupportedOperationException("Not implemented: createUserGroupMemberCallable()"); + } + + public UnaryCallable + updateUserGroupMemberCallable() { + throw new UnsupportedOperationException("Not implemented: updateUserGroupMemberCallable()"); + } + + public UnaryCallable deleteUserGroupMemberCallable() { + throw new UnsupportedOperationException("Not implemented: deleteUserGroupMemberCallable()"); + } + + public UnaryCallable + getAdminAccessBindingCallable() { + throw new UnsupportedOperationException("Not implemented: getAdminAccessBindingCallable()"); + } + + public UnaryCallable + listAdminAccessBindingsPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listAdminAccessBindingsPagedCallable()"); + } + + public UnaryCallable + listAdminAccessBindingsCallable() { + throw new UnsupportedOperationException("Not implemented: listAdminAccessBindingsCallable()"); + } + + public UnaryCallable + createAdminAccessBindingCallable() { + throw new UnsupportedOperationException("Not implemented: createAdminAccessBindingCallable()"); + } + + public UnaryCallable + updateAdminAccessBindingCallable() { + throw new UnsupportedOperationException("Not implemented: updateAdminAccessBindingCallable()"); + } + @Override public abstract void close(); } diff --git a/java-marketingplatformadminapi/admin/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/stub/MarketingplatformAdminServiceStubSettings.java b/java-marketingplatformadminapi/admin/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/stub/MarketingplatformAdminServiceStubSettings.java index 1d480b3f69b2..114f407f9b03 100644 --- a/java-marketingplatformadminapi/admin/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/stub/MarketingplatformAdminServiceStubSettings.java +++ b/java-marketingplatformadminapi/admin/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/stub/MarketingplatformAdminServiceStubSettings.java @@ -16,24 +16,47 @@ package com.google.ads.marketingplatform.admin.v1alpha.stub; +import static com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient.ListAdminAccessBindingsPagedResponse; import static com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient.ListAnalyticsAccountLinksPagedResponse; import static com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient.ListOrganizationsPagedResponse; +import static com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient.ListUserGroupMembersPagedResponse; +import static com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient.ListUserGroupsPagedResponse; +import com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding; import com.google.ads.marketingplatform.admin.v1alpha.AnalyticsAccountLink; +import com.google.ads.marketingplatform.admin.v1alpha.CreateAdminAccessBindingRequest; import com.google.ads.marketingplatform.admin.v1alpha.CreateAnalyticsAccountLinkRequest; +import com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupMemberRequest; +import com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupRequest; import com.google.ads.marketingplatform.admin.v1alpha.DeleteAnalyticsAccountLinkRequest; +import com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupMemberRequest; +import com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupRequest; import com.google.ads.marketingplatform.admin.v1alpha.FindSalesPartnerManagedClientsRequest; import com.google.ads.marketingplatform.admin.v1alpha.FindSalesPartnerManagedClientsResponse; +import com.google.ads.marketingplatform.admin.v1alpha.GetAdminAccessBindingRequest; import com.google.ads.marketingplatform.admin.v1alpha.GetOrganizationRequest; +import com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupMemberRequest; +import com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupRequest; +import com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsRequest; +import com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsResponse; import com.google.ads.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest; import com.google.ads.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksResponse; import com.google.ads.marketingplatform.admin.v1alpha.ListOrganizationsRequest; import com.google.ads.marketingplatform.admin.v1alpha.ListOrganizationsResponse; +import com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersRequest; +import com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersResponse; +import com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsRequest; +import com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsResponse; import com.google.ads.marketingplatform.admin.v1alpha.Organization; import com.google.ads.marketingplatform.admin.v1alpha.ReportPropertyUsageRequest; import com.google.ads.marketingplatform.admin.v1alpha.ReportPropertyUsageResponse; import com.google.ads.marketingplatform.admin.v1alpha.SetPropertyServiceLevelRequest; import com.google.ads.marketingplatform.admin.v1alpha.SetPropertyServiceLevelResponse; +import com.google.ads.marketingplatform.admin.v1alpha.UpdateAdminAccessBindingRequest; +import com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupMemberRequest; +import com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupRequest; +import com.google.ads.marketingplatform.admin.v1alpha.UserGroup; +import com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember; import com.google.api.core.ApiFunction; import com.google.api.core.ApiFuture; import com.google.api.core.BetaApi; @@ -158,6 +181,37 @@ public class MarketingplatformAdminServiceStubSettings setPropertyServiceLevelSettings; private final UnaryCallSettings reportPropertyUsageSettings; + private final UnaryCallSettings getUserGroupSettings; + private final PagedCallSettings< + ListUserGroupsRequest, ListUserGroupsResponse, ListUserGroupsPagedResponse> + listUserGroupsSettings; + private final UnaryCallSettings createUserGroupSettings; + private final UnaryCallSettings updateUserGroupSettings; + private final UnaryCallSettings deleteUserGroupSettings; + private final UnaryCallSettings + getUserGroupMemberSettings; + private final PagedCallSettings< + ListUserGroupMembersRequest, + ListUserGroupMembersResponse, + ListUserGroupMembersPagedResponse> + listUserGroupMembersSettings; + private final UnaryCallSettings + createUserGroupMemberSettings; + private final UnaryCallSettings + updateUserGroupMemberSettings; + private final UnaryCallSettings + deleteUserGroupMemberSettings; + private final UnaryCallSettings + getAdminAccessBindingSettings; + private final PagedCallSettings< + ListAdminAccessBindingsRequest, + ListAdminAccessBindingsResponse, + ListAdminAccessBindingsPagedResponse> + listAdminAccessBindingsSettings; + private final UnaryCallSettings + createAdminAccessBindingSettings; + private final UnaryCallSettings + updateAdminAccessBindingSettings; private static final PagedListDescriptor< ListOrganizationsRequest, ListOrganizationsResponse, Organization> @@ -242,6 +296,123 @@ public Iterable extractResources( } }; + private static final PagedListDescriptor + LIST_USER_GROUPS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListUserGroupsRequest injectToken(ListUserGroupsRequest payload, String token) { + return ListUserGroupsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListUserGroupsRequest injectPageSize( + ListUserGroupsRequest payload, int pageSize) { + return ListUserGroupsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListUserGroupsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListUserGroupsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListUserGroupsResponse payload) { + return payload.getUserGroupsList(); + } + }; + + private static final PagedListDescriptor< + ListUserGroupMembersRequest, ListUserGroupMembersResponse, UserGroupMember> + LIST_USER_GROUP_MEMBERS_PAGE_STR_DESC = + new PagedListDescriptor< + ListUserGroupMembersRequest, ListUserGroupMembersResponse, UserGroupMember>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListUserGroupMembersRequest injectToken( + ListUserGroupMembersRequest payload, String token) { + return ListUserGroupMembersRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListUserGroupMembersRequest injectPageSize( + ListUserGroupMembersRequest payload, int pageSize) { + return ListUserGroupMembersRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListUserGroupMembersRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListUserGroupMembersResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListUserGroupMembersResponse payload) { + return payload.getUserGroupMembersList(); + } + }; + + private static final PagedListDescriptor< + ListAdminAccessBindingsRequest, ListAdminAccessBindingsResponse, AdminAccessBinding> + LIST_ADMIN_ACCESS_BINDINGS_PAGE_STR_DESC = + new PagedListDescriptor< + ListAdminAccessBindingsRequest, + ListAdminAccessBindingsResponse, + AdminAccessBinding>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListAdminAccessBindingsRequest injectToken( + ListAdminAccessBindingsRequest payload, String token) { + return ListAdminAccessBindingsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListAdminAccessBindingsRequest injectPageSize( + ListAdminAccessBindingsRequest payload, int pageSize) { + return ListAdminAccessBindingsRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(ListAdminAccessBindingsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListAdminAccessBindingsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListAdminAccessBindingsResponse payload) { + return payload.getAdminAccessBindingsList(); + } + }; + private static final PagedListResponseFactory< ListOrganizationsRequest, ListOrganizationsResponse, ListOrganizationsPagedResponse> LIST_ORGANIZATIONS_PAGE_STR_FACT = @@ -291,6 +462,74 @@ public ApiFuture getFuturePagedResponse( } }; + private static final PagedListResponseFactory< + ListUserGroupsRequest, ListUserGroupsResponse, ListUserGroupsPagedResponse> + LIST_USER_GROUPS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListUserGroupsRequest, ListUserGroupsResponse, ListUserGroupsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListUserGroupsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_USER_GROUPS_PAGE_STR_DESC, request, context); + return ListUserGroupsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListUserGroupMembersRequest, + ListUserGroupMembersResponse, + ListUserGroupMembersPagedResponse> + LIST_USER_GROUP_MEMBERS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListUserGroupMembersRequest, + ListUserGroupMembersResponse, + ListUserGroupMembersPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListUserGroupMembersRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListUserGroupMembersRequest, ListUserGroupMembersResponse, UserGroupMember> + pageContext = + PageContext.create( + callable, LIST_USER_GROUP_MEMBERS_PAGE_STR_DESC, request, context); + return ListUserGroupMembersPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListAdminAccessBindingsRequest, + ListAdminAccessBindingsResponse, + ListAdminAccessBindingsPagedResponse> + LIST_ADMIN_ACCESS_BINDINGS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListAdminAccessBindingsRequest, + ListAdminAccessBindingsResponse, + ListAdminAccessBindingsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable + callable, + ListAdminAccessBindingsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListAdminAccessBindingsRequest, + ListAdminAccessBindingsResponse, + AdminAccessBinding> + pageContext = + PageContext.create( + callable, LIST_ADMIN_ACCESS_BINDINGS_PAGE_STR_DESC, request, context); + return ListAdminAccessBindingsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + /** Returns the object with the settings used for calls to getOrganization. */ public UnaryCallSettings getOrganizationSettings() { return getOrganizationSettings; @@ -343,6 +582,92 @@ public UnaryCallSettings getOrganizationSe return reportPropertyUsageSettings; } + /** Returns the object with the settings used for calls to getUserGroup. */ + public UnaryCallSettings getUserGroupSettings() { + return getUserGroupSettings; + } + + /** Returns the object with the settings used for calls to listUserGroups. */ + public PagedCallSettings< + ListUserGroupsRequest, ListUserGroupsResponse, ListUserGroupsPagedResponse> + listUserGroupsSettings() { + return listUserGroupsSettings; + } + + /** Returns the object with the settings used for calls to createUserGroup. */ + public UnaryCallSettings createUserGroupSettings() { + return createUserGroupSettings; + } + + /** Returns the object with the settings used for calls to updateUserGroup. */ + public UnaryCallSettings updateUserGroupSettings() { + return updateUserGroupSettings; + } + + /** Returns the object with the settings used for calls to deleteUserGroup. */ + public UnaryCallSettings deleteUserGroupSettings() { + return deleteUserGroupSettings; + } + + /** Returns the object with the settings used for calls to getUserGroupMember. */ + public UnaryCallSettings + getUserGroupMemberSettings() { + return getUserGroupMemberSettings; + } + + /** Returns the object with the settings used for calls to listUserGroupMembers. */ + public PagedCallSettings< + ListUserGroupMembersRequest, + ListUserGroupMembersResponse, + ListUserGroupMembersPagedResponse> + listUserGroupMembersSettings() { + return listUserGroupMembersSettings; + } + + /** Returns the object with the settings used for calls to createUserGroupMember. */ + public UnaryCallSettings + createUserGroupMemberSettings() { + return createUserGroupMemberSettings; + } + + /** Returns the object with the settings used for calls to updateUserGroupMember. */ + public UnaryCallSettings + updateUserGroupMemberSettings() { + return updateUserGroupMemberSettings; + } + + /** Returns the object with the settings used for calls to deleteUserGroupMember. */ + public UnaryCallSettings deleteUserGroupMemberSettings() { + return deleteUserGroupMemberSettings; + } + + /** Returns the object with the settings used for calls to getAdminAccessBinding. */ + public UnaryCallSettings + getAdminAccessBindingSettings() { + return getAdminAccessBindingSettings; + } + + /** Returns the object with the settings used for calls to listAdminAccessBindings. */ + public PagedCallSettings< + ListAdminAccessBindingsRequest, + ListAdminAccessBindingsResponse, + ListAdminAccessBindingsPagedResponse> + listAdminAccessBindingsSettings() { + return listAdminAccessBindingsSettings; + } + + /** Returns the object with the settings used for calls to createAdminAccessBinding. */ + public UnaryCallSettings + createAdminAccessBindingSettings() { + return createAdminAccessBindingSettings; + } + + /** Returns the object with the settings used for calls to updateAdminAccessBinding. */ + public UnaryCallSettings + updateAdminAccessBindingSettings() { + return updateAdminAccessBindingSettings; + } + public MarketingplatformAdminServiceStub createStub() throws IOException { if (getTransportChannelProvider() .getTransportName() @@ -467,6 +792,20 @@ protected MarketingplatformAdminServiceStubSettings(Builder settingsBuilder) thr settingsBuilder.deleteAnalyticsAccountLinkSettings().build(); setPropertyServiceLevelSettings = settingsBuilder.setPropertyServiceLevelSettings().build(); reportPropertyUsageSettings = settingsBuilder.reportPropertyUsageSettings().build(); + getUserGroupSettings = settingsBuilder.getUserGroupSettings().build(); + listUserGroupsSettings = settingsBuilder.listUserGroupsSettings().build(); + createUserGroupSettings = settingsBuilder.createUserGroupSettings().build(); + updateUserGroupSettings = settingsBuilder.updateUserGroupSettings().build(); + deleteUserGroupSettings = settingsBuilder.deleteUserGroupSettings().build(); + getUserGroupMemberSettings = settingsBuilder.getUserGroupMemberSettings().build(); + listUserGroupMembersSettings = settingsBuilder.listUserGroupMembersSettings().build(); + createUserGroupMemberSettings = settingsBuilder.createUserGroupMemberSettings().build(); + updateUserGroupMemberSettings = settingsBuilder.updateUserGroupMemberSettings().build(); + deleteUserGroupMemberSettings = settingsBuilder.deleteUserGroupMemberSettings().build(); + getAdminAccessBindingSettings = settingsBuilder.getAdminAccessBindingSettings().build(); + listAdminAccessBindingsSettings = settingsBuilder.listAdminAccessBindingsSettings().build(); + createAdminAccessBindingSettings = settingsBuilder.createAdminAccessBindingSettings().build(); + updateAdminAccessBindingSettings = settingsBuilder.updateAdminAccessBindingSettings().build(); } @Override @@ -504,6 +843,39 @@ public static class Builder setPropertyServiceLevelSettings; private final UnaryCallSettings.Builder reportPropertyUsageSettings; + private final UnaryCallSettings.Builder getUserGroupSettings; + private final PagedCallSettings.Builder< + ListUserGroupsRequest, ListUserGroupsResponse, ListUserGroupsPagedResponse> + listUserGroupsSettings; + private final UnaryCallSettings.Builder + createUserGroupSettings; + private final UnaryCallSettings.Builder + updateUserGroupSettings; + private final UnaryCallSettings.Builder deleteUserGroupSettings; + private final UnaryCallSettings.Builder + getUserGroupMemberSettings; + private final PagedCallSettings.Builder< + ListUserGroupMembersRequest, + ListUserGroupMembersResponse, + ListUserGroupMembersPagedResponse> + listUserGroupMembersSettings; + private final UnaryCallSettings.Builder + createUserGroupMemberSettings; + private final UnaryCallSettings.Builder + updateUserGroupMemberSettings; + private final UnaryCallSettings.Builder + deleteUserGroupMemberSettings; + private final UnaryCallSettings.Builder + getAdminAccessBindingSettings; + private final PagedCallSettings.Builder< + ListAdminAccessBindingsRequest, + ListAdminAccessBindingsResponse, + ListAdminAccessBindingsPagedResponse> + listAdminAccessBindingsSettings; + private final UnaryCallSettings.Builder + createAdminAccessBindingSettings; + private final UnaryCallSettings.Builder + updateAdminAccessBindingSettings; private static final ImmutableMap> RETRYABLE_CODE_DEFINITIONS; @@ -553,6 +925,22 @@ protected Builder(@Nullable ClientContext clientContext) { deleteAnalyticsAccountLinkSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); setPropertyServiceLevelSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); reportPropertyUsageSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getUserGroupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listUserGroupsSettings = PagedCallSettings.newBuilder(LIST_USER_GROUPS_PAGE_STR_FACT); + createUserGroupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateUserGroupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteUserGroupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getUserGroupMemberSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listUserGroupMembersSettings = + PagedCallSettings.newBuilder(LIST_USER_GROUP_MEMBERS_PAGE_STR_FACT); + createUserGroupMemberSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateUserGroupMemberSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteUserGroupMemberSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getAdminAccessBindingSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listAdminAccessBindingsSettings = + PagedCallSettings.newBuilder(LIST_ADMIN_ACCESS_BINDINGS_PAGE_STR_FACT); + createAdminAccessBindingSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateAdminAccessBindingSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( @@ -563,7 +951,21 @@ protected Builder(@Nullable ClientContext clientContext) { createAnalyticsAccountLinkSettings, deleteAnalyticsAccountLinkSettings, setPropertyServiceLevelSettings, - reportPropertyUsageSettings); + reportPropertyUsageSettings, + getUserGroupSettings, + listUserGroupsSettings, + createUserGroupSettings, + updateUserGroupSettings, + deleteUserGroupSettings, + getUserGroupMemberSettings, + listUserGroupMembersSettings, + createUserGroupMemberSettings, + updateUserGroupMemberSettings, + deleteUserGroupMemberSettings, + getAdminAccessBindingSettings, + listAdminAccessBindingsSettings, + createAdminAccessBindingSettings, + updateAdminAccessBindingSettings); initDefaults(this); } @@ -579,6 +981,20 @@ protected Builder(MarketingplatformAdminServiceStubSettings settings) { deleteAnalyticsAccountLinkSettings = settings.deleteAnalyticsAccountLinkSettings.toBuilder(); setPropertyServiceLevelSettings = settings.setPropertyServiceLevelSettings.toBuilder(); reportPropertyUsageSettings = settings.reportPropertyUsageSettings.toBuilder(); + getUserGroupSettings = settings.getUserGroupSettings.toBuilder(); + listUserGroupsSettings = settings.listUserGroupsSettings.toBuilder(); + createUserGroupSettings = settings.createUserGroupSettings.toBuilder(); + updateUserGroupSettings = settings.updateUserGroupSettings.toBuilder(); + deleteUserGroupSettings = settings.deleteUserGroupSettings.toBuilder(); + getUserGroupMemberSettings = settings.getUserGroupMemberSettings.toBuilder(); + listUserGroupMembersSettings = settings.listUserGroupMembersSettings.toBuilder(); + createUserGroupMemberSettings = settings.createUserGroupMemberSettings.toBuilder(); + updateUserGroupMemberSettings = settings.updateUserGroupMemberSettings.toBuilder(); + deleteUserGroupMemberSettings = settings.deleteUserGroupMemberSettings.toBuilder(); + getAdminAccessBindingSettings = settings.getAdminAccessBindingSettings.toBuilder(); + listAdminAccessBindingsSettings = settings.listAdminAccessBindingsSettings.toBuilder(); + createAdminAccessBindingSettings = settings.createAdminAccessBindingSettings.toBuilder(); + updateAdminAccessBindingSettings = settings.updateAdminAccessBindingSettings.toBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( @@ -589,7 +1005,21 @@ protected Builder(MarketingplatformAdminServiceStubSettings settings) { createAnalyticsAccountLinkSettings, deleteAnalyticsAccountLinkSettings, setPropertyServiceLevelSettings, - reportPropertyUsageSettings); + reportPropertyUsageSettings, + getUserGroupSettings, + listUserGroupsSettings, + createUserGroupSettings, + updateUserGroupSettings, + deleteUserGroupSettings, + getUserGroupMemberSettings, + listUserGroupMembersSettings, + createUserGroupMemberSettings, + updateUserGroupMemberSettings, + deleteUserGroupMemberSettings, + getAdminAccessBindingSettings, + listAdminAccessBindingsSettings, + createAdminAccessBindingSettings, + updateAdminAccessBindingSettings); } private static Builder createDefault() { @@ -657,6 +1087,76 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + builder + .getUserGroupSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listUserGroupsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createUserGroupSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updateUserGroupSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteUserGroupSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getUserGroupMemberSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listUserGroupMembersSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createUserGroupMemberSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updateUserGroupMemberSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteUserGroupMemberSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getAdminAccessBindingSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listAdminAccessBindingsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createAdminAccessBindingSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updateAdminAccessBindingSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + return builder; } @@ -729,6 +1229,93 @@ public Builder applyToAllUnaryMethods( return reportPropertyUsageSettings; } + /** Returns the builder for the settings used for calls to getUserGroup. */ + public UnaryCallSettings.Builder getUserGroupSettings() { + return getUserGroupSettings; + } + + /** Returns the builder for the settings used for calls to listUserGroups. */ + public PagedCallSettings.Builder< + ListUserGroupsRequest, ListUserGroupsResponse, ListUserGroupsPagedResponse> + listUserGroupsSettings() { + return listUserGroupsSettings; + } + + /** Returns the builder for the settings used for calls to createUserGroup. */ + public UnaryCallSettings.Builder createUserGroupSettings() { + return createUserGroupSettings; + } + + /** Returns the builder for the settings used for calls to updateUserGroup. */ + public UnaryCallSettings.Builder updateUserGroupSettings() { + return updateUserGroupSettings; + } + + /** Returns the builder for the settings used for calls to deleteUserGroup. */ + public UnaryCallSettings.Builder deleteUserGroupSettings() { + return deleteUserGroupSettings; + } + + /** Returns the builder for the settings used for calls to getUserGroupMember. */ + public UnaryCallSettings.Builder + getUserGroupMemberSettings() { + return getUserGroupMemberSettings; + } + + /** Returns the builder for the settings used for calls to listUserGroupMembers. */ + public PagedCallSettings.Builder< + ListUserGroupMembersRequest, + ListUserGroupMembersResponse, + ListUserGroupMembersPagedResponse> + listUserGroupMembersSettings() { + return listUserGroupMembersSettings; + } + + /** Returns the builder for the settings used for calls to createUserGroupMember. */ + public UnaryCallSettings.Builder + createUserGroupMemberSettings() { + return createUserGroupMemberSettings; + } + + /** Returns the builder for the settings used for calls to updateUserGroupMember. */ + public UnaryCallSettings.Builder + updateUserGroupMemberSettings() { + return updateUserGroupMemberSettings; + } + + /** Returns the builder for the settings used for calls to deleteUserGroupMember. */ + public UnaryCallSettings.Builder + deleteUserGroupMemberSettings() { + return deleteUserGroupMemberSettings; + } + + /** Returns the builder for the settings used for calls to getAdminAccessBinding. */ + public UnaryCallSettings.Builder + getAdminAccessBindingSettings() { + return getAdminAccessBindingSettings; + } + + /** Returns the builder for the settings used for calls to listAdminAccessBindings. */ + public PagedCallSettings.Builder< + ListAdminAccessBindingsRequest, + ListAdminAccessBindingsResponse, + ListAdminAccessBindingsPagedResponse> + listAdminAccessBindingsSettings() { + return listAdminAccessBindingsSettings; + } + + /** Returns the builder for the settings used for calls to createAdminAccessBinding. */ + public UnaryCallSettings.Builder + createAdminAccessBindingSettings() { + return createAdminAccessBindingSettings; + } + + /** Returns the builder for the settings used for calls to updateAdminAccessBinding. */ + public UnaryCallSettings.Builder + updateAdminAccessBindingSettings() { + return updateAdminAccessBindingSettings; + } + @Override public MarketingplatformAdminServiceStubSettings build() throws IOException { return new MarketingplatformAdminServiceStubSettings(this); diff --git a/java-marketingplatformadminapi/admin/src/main/resources/META-INF/native-image/com.google.ads.marketingplatform.admin.v1alpha/reflect-config.json b/java-marketingplatformadminapi/admin/src/main/resources/META-INF/native-image/com.google.ads.marketingplatform.admin.v1alpha/reflect-config.json index 49b8f5197a97..a683ec14f334 100644 --- a/java-marketingplatformadminapi/admin/src/main/resources/META-INF/native-image/com.google.ads.marketingplatform.admin.v1alpha/reflect-config.json +++ b/java-marketingplatformadminapi/admin/src/main/resources/META-INF/native-image/com.google.ads.marketingplatform.admin.v1alpha/reflect-config.json @@ -1,4 +1,22 @@ [ + { + "name": "com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.ads.marketingplatform.admin.v1alpha.AnalyticsAccountLink", "queryAllDeclaredConstructors": true, @@ -35,6 +53,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.ads.marketingplatform.admin.v1alpha.CreateAdminAccessBindingRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.ads.marketingplatform.admin.v1alpha.CreateAdminAccessBindingRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.ads.marketingplatform.admin.v1alpha.CreateAnalyticsAccountLinkRequest", "queryAllDeclaredConstructors": true, @@ -53,6 +89,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupMemberRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupMemberRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.ads.marketingplatform.admin.v1alpha.DeleteAnalyticsAccountLinkRequest", "queryAllDeclaredConstructors": true, @@ -71,6 +143,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupMemberRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupMemberRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.ads.marketingplatform.admin.v1alpha.FindSalesPartnerManagedClientsRequest", "queryAllDeclaredConstructors": true, @@ -125,6 +233,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.ads.marketingplatform.admin.v1alpha.GetAdminAccessBindingRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.ads.marketingplatform.admin.v1alpha.GetAdminAccessBindingRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.ads.marketingplatform.admin.v1alpha.GetOrganizationRequest", "queryAllDeclaredConstructors": true, @@ -143,6 +269,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupMemberRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupMemberRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.ads.marketingplatform.admin.v1alpha.LinkVerificationState", "queryAllDeclaredConstructors": true, @@ -152,6 +314,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.ads.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest", "queryAllDeclaredConstructors": true, @@ -224,6 +422,78 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.ads.marketingplatform.admin.v1alpha.Organization", "queryAllDeclaredConstructors": true, @@ -242,6 +512,15 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.ads.marketingplatform.admin.v1alpha.OrganizationRole", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.ads.marketingplatform.admin.v1alpha.ReportPropertyUsageRequest", "queryAllDeclaredConstructors": true, @@ -350,6 +629,105 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.ads.marketingplatform.admin.v1alpha.UpdateAdminAccessBindingRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.ads.marketingplatform.admin.v1alpha.UpdateAdminAccessBindingRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupMemberRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupMemberRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.ads.marketingplatform.admin.v1alpha.UserGroup", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.ads.marketingplatform.admin.v1alpha.UserGroup$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember$MembershipRole", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.api.BatchingConfigProto", "queryAllDeclaredConstructors": true, @@ -1655,6 +2033,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.protobuf.FieldMask", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.FieldMask$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.type.Date", "queryAllDeclaredConstructors": true, diff --git a/java-marketingplatformadminapi/admin/src/test/java/com/google/ads/marketingplatform/admin/v1alpha/MarketingplatformAdminServiceClientHttpJsonTest.java b/java-marketingplatformadminapi/admin/src/test/java/com/google/ads/marketingplatform/admin/v1alpha/MarketingplatformAdminServiceClientHttpJsonTest.java index 26046ba60f2d..844b53e2be55 100644 --- a/java-marketingplatformadminapi/admin/src/test/java/com/google/ads/marketingplatform/admin/v1alpha/MarketingplatformAdminServiceClientHttpJsonTest.java +++ b/java-marketingplatformadminapi/admin/src/test/java/com/google/ads/marketingplatform/admin/v1alpha/MarketingplatformAdminServiceClientHttpJsonTest.java @@ -16,8 +16,11 @@ package com.google.ads.marketingplatform.admin.v1alpha; +import static com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient.ListAdminAccessBindingsPagedResponse; import static com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient.ListAnalyticsAccountLinksPagedResponse; import static com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient.ListOrganizationsPagedResponse; +import static com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient.ListUserGroupMembersPagedResponse; +import static com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient.ListUserGroupsPagedResponse; import com.google.ads.marketingplatform.admin.v1alpha.stub.HttpJsonMarketingplatformAdminServiceStub; import com.google.api.gax.core.NoCredentialsProvider; @@ -31,6 +34,7 @@ import com.google.api.gax.rpc.testing.FakeStatusCode; import com.google.common.collect.Lists; import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; @@ -657,4 +661,1200 @@ public void reportPropertyUsageExceptionTest() throws Exception { // Expected exception. } } + + @Test + public void getUserGroupTest() throws Exception { + UserGroup expectedResponse = + UserGroup.newBuilder() + .setName(UserGroupName.of("[ORGANIZATION]", "[USER_GROUP]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .build(); + mockService.addResponse(expectedResponse); + + UserGroupName name = UserGroupName.of("[ORGANIZATION]", "[USER_GROUP]"); + + UserGroup actualResponse = client.getUserGroup(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getUserGroupExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + UserGroupName name = UserGroupName.of("[ORGANIZATION]", "[USER_GROUP]"); + client.getUserGroup(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getUserGroupTest2() throws Exception { + UserGroup expectedResponse = + UserGroup.newBuilder() + .setName(UserGroupName.of("[ORGANIZATION]", "[USER_GROUP]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .build(); + mockService.addResponse(expectedResponse); + + String name = "organizations/organization-5401/userGroups/userGroup-5401"; + + UserGroup actualResponse = client.getUserGroup(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getUserGroupExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "organizations/organization-5401/userGroups/userGroup-5401"; + client.getUserGroup(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listUserGroupsTest() throws Exception { + UserGroup responsesElement = UserGroup.newBuilder().build(); + ListUserGroupsResponse expectedResponse = + ListUserGroupsResponse.newBuilder() + .setNextPageToken("") + .addAllUserGroups(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + + ListUserGroupsPagedResponse pagedListResponse = client.listUserGroups(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getUserGroupsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listUserGroupsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + client.listUserGroups(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listUserGroupsTest2() throws Exception { + UserGroup responsesElement = UserGroup.newBuilder().build(); + ListUserGroupsResponse expectedResponse = + ListUserGroupsResponse.newBuilder() + .setNextPageToken("") + .addAllUserGroups(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "organizations/organization-8287"; + + ListUserGroupsPagedResponse pagedListResponse = client.listUserGroups(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getUserGroupsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listUserGroupsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "organizations/organization-8287"; + client.listUserGroups(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createUserGroupTest() throws Exception { + UserGroup expectedResponse = + UserGroup.newBuilder() + .setName(UserGroupName.of("[ORGANIZATION]", "[USER_GROUP]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .build(); + mockService.addResponse(expectedResponse); + + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + UserGroup userGroup = UserGroup.newBuilder().build(); + + UserGroup actualResponse = client.createUserGroup(parent, userGroup); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createUserGroupExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + UserGroup userGroup = UserGroup.newBuilder().build(); + client.createUserGroup(parent, userGroup); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createUserGroupTest2() throws Exception { + UserGroup expectedResponse = + UserGroup.newBuilder() + .setName(UserGroupName.of("[ORGANIZATION]", "[USER_GROUP]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .build(); + mockService.addResponse(expectedResponse); + + String parent = "organizations/organization-8287"; + UserGroup userGroup = UserGroup.newBuilder().build(); + + UserGroup actualResponse = client.createUserGroup(parent, userGroup); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createUserGroupExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "organizations/organization-8287"; + UserGroup userGroup = UserGroup.newBuilder().build(); + client.createUserGroup(parent, userGroup); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateUserGroupTest() throws Exception { + UserGroup expectedResponse = + UserGroup.newBuilder() + .setName(UserGroupName.of("[ORGANIZATION]", "[USER_GROUP]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .build(); + mockService.addResponse(expectedResponse); + + UserGroup userGroup = + UserGroup.newBuilder() + .setName(UserGroupName.of("[ORGANIZATION]", "[USER_GROUP]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + UserGroup actualResponse = client.updateUserGroup(userGroup, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateUserGroupExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + UserGroup userGroup = + UserGroup.newBuilder() + .setName(UserGroupName.of("[ORGANIZATION]", "[USER_GROUP]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateUserGroup(userGroup, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteUserGroupTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + UserGroupName name = UserGroupName.of("[ORGANIZATION]", "[USER_GROUP]"); + + client.deleteUserGroup(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteUserGroupExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + UserGroupName name = UserGroupName.of("[ORGANIZATION]", "[USER_GROUP]"); + client.deleteUserGroup(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteUserGroupTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = "organizations/organization-5401/userGroups/userGroup-5401"; + + client.deleteUserGroup(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteUserGroupExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "organizations/organization-5401/userGroups/userGroup-5401"; + client.deleteUserGroup(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getUserGroupMemberTest() throws Exception { + UserGroupMember expectedResponse = + UserGroupMember.newBuilder() + .setName( + UserGroupMemberName.of("[ORGANIZATION]", "[USER_GROUP]", "[MEMBER]").toString()) + .build(); + mockService.addResponse(expectedResponse); + + UserGroupMemberName name = UserGroupMemberName.of("[ORGANIZATION]", "[USER_GROUP]", "[MEMBER]"); + + UserGroupMember actualResponse = client.getUserGroupMember(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getUserGroupMemberExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + UserGroupMemberName name = + UserGroupMemberName.of("[ORGANIZATION]", "[USER_GROUP]", "[MEMBER]"); + client.getUserGroupMember(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getUserGroupMemberTest2() throws Exception { + UserGroupMember expectedResponse = + UserGroupMember.newBuilder() + .setName( + UserGroupMemberName.of("[ORGANIZATION]", "[USER_GROUP]", "[MEMBER]").toString()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "organizations/organization-5778/userGroups/userGroup-5778/members/member-5778"; + + UserGroupMember actualResponse = client.getUserGroupMember(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getUserGroupMemberExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "organizations/organization-5778/userGroups/userGroup-5778/members/member-5778"; + client.getUserGroupMember(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listUserGroupMembersTest() throws Exception { + UserGroupMember responsesElement = UserGroupMember.newBuilder().build(); + ListUserGroupMembersResponse expectedResponse = + ListUserGroupMembersResponse.newBuilder() + .setNextPageToken("") + .addAllUserGroupMembers(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + UserGroupName parent = UserGroupName.of("[ORGANIZATION]", "[USER_GROUP]"); + + ListUserGroupMembersPagedResponse pagedListResponse = client.listUserGroupMembers(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getUserGroupMembersList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listUserGroupMembersExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + UserGroupName parent = UserGroupName.of("[ORGANIZATION]", "[USER_GROUP]"); + client.listUserGroupMembers(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listUserGroupMembersTest2() throws Exception { + UserGroupMember responsesElement = UserGroupMember.newBuilder().build(); + ListUserGroupMembersResponse expectedResponse = + ListUserGroupMembersResponse.newBuilder() + .setNextPageToken("") + .addAllUserGroupMembers(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "organizations/organization-3448/userGroups/userGroup-3448"; + + ListUserGroupMembersPagedResponse pagedListResponse = client.listUserGroupMembers(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getUserGroupMembersList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listUserGroupMembersExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "organizations/organization-3448/userGroups/userGroup-3448"; + client.listUserGroupMembers(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createUserGroupMemberTest() throws Exception { + UserGroupMember expectedResponse = + UserGroupMember.newBuilder() + .setName( + UserGroupMemberName.of("[ORGANIZATION]", "[USER_GROUP]", "[MEMBER]").toString()) + .build(); + mockService.addResponse(expectedResponse); + + UserGroupName parent = UserGroupName.of("[ORGANIZATION]", "[USER_GROUP]"); + UserGroupMember userGroupMember = UserGroupMember.newBuilder().build(); + + UserGroupMember actualResponse = client.createUserGroupMember(parent, userGroupMember); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createUserGroupMemberExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + UserGroupName parent = UserGroupName.of("[ORGANIZATION]", "[USER_GROUP]"); + UserGroupMember userGroupMember = UserGroupMember.newBuilder().build(); + client.createUserGroupMember(parent, userGroupMember); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createUserGroupMemberTest2() throws Exception { + UserGroupMember expectedResponse = + UserGroupMember.newBuilder() + .setName( + UserGroupMemberName.of("[ORGANIZATION]", "[USER_GROUP]", "[MEMBER]").toString()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "organizations/organization-3448/userGroups/userGroup-3448"; + UserGroupMember userGroupMember = UserGroupMember.newBuilder().build(); + + UserGroupMember actualResponse = client.createUserGroupMember(parent, userGroupMember); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createUserGroupMemberExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "organizations/organization-3448/userGroups/userGroup-3448"; + UserGroupMember userGroupMember = UserGroupMember.newBuilder().build(); + client.createUserGroupMember(parent, userGroupMember); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateUserGroupMemberTest() throws Exception { + UserGroupMember expectedResponse = + UserGroupMember.newBuilder() + .setName( + UserGroupMemberName.of("[ORGANIZATION]", "[USER_GROUP]", "[MEMBER]").toString()) + .build(); + mockService.addResponse(expectedResponse); + + UserGroupMember userGroupMember = + UserGroupMember.newBuilder() + .setName( + UserGroupMemberName.of("[ORGANIZATION]", "[USER_GROUP]", "[MEMBER]").toString()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + UserGroupMember actualResponse = client.updateUserGroupMember(userGroupMember, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateUserGroupMemberExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + UserGroupMember userGroupMember = + UserGroupMember.newBuilder() + .setName( + UserGroupMemberName.of("[ORGANIZATION]", "[USER_GROUP]", "[MEMBER]").toString()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateUserGroupMember(userGroupMember, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteUserGroupMemberTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + UserGroupMemberName name = UserGroupMemberName.of("[ORGANIZATION]", "[USER_GROUP]", "[MEMBER]"); + + client.deleteUserGroupMember(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteUserGroupMemberExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + UserGroupMemberName name = + UserGroupMemberName.of("[ORGANIZATION]", "[USER_GROUP]", "[MEMBER]"); + client.deleteUserGroupMember(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteUserGroupMemberTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = "organizations/organization-5778/userGroups/userGroup-5778/members/member-5778"; + + client.deleteUserGroupMember(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteUserGroupMemberExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "organizations/organization-5778/userGroups/userGroup-5778/members/member-5778"; + client.deleteUserGroupMember(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAdminAccessBindingTest() throws Exception { + AdminAccessBinding expectedResponse = + AdminAccessBinding.newBuilder() + .setName( + AdminAccessBindingName.of("[ORGANIZATION]", "[ADMIN_ACCESS_BINDING]").toString()) + .addAllOrganizationRoles(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + AdminAccessBindingName name = + AdminAccessBindingName.of("[ORGANIZATION]", "[ADMIN_ACCESS_BINDING]"); + + AdminAccessBinding actualResponse = client.getAdminAccessBinding(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getAdminAccessBindingExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AdminAccessBindingName name = + AdminAccessBindingName.of("[ORGANIZATION]", "[ADMIN_ACCESS_BINDING]"); + client.getAdminAccessBinding(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAdminAccessBindingTest2() throws Exception { + AdminAccessBinding expectedResponse = + AdminAccessBinding.newBuilder() + .setName( + AdminAccessBindingName.of("[ORGANIZATION]", "[ADMIN_ACCESS_BINDING]").toString()) + .addAllOrganizationRoles(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "organizations/organization-4499/adminAccessBindings/adminAccessBinding-4499"; + + AdminAccessBinding actualResponse = client.getAdminAccessBinding(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getAdminAccessBindingExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "organizations/organization-4499/adminAccessBindings/adminAccessBinding-4499"; + client.getAdminAccessBinding(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAdminAccessBindingsTest() throws Exception { + AdminAccessBinding responsesElement = AdminAccessBinding.newBuilder().build(); + ListAdminAccessBindingsResponse expectedResponse = + ListAdminAccessBindingsResponse.newBuilder() + .setNextPageToken("") + .addAllAdminAccessBindings(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + + ListAdminAccessBindingsPagedResponse pagedListResponse = client.listAdminAccessBindings(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAdminAccessBindingsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listAdminAccessBindingsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + client.listAdminAccessBindings(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAdminAccessBindingsTest2() throws Exception { + AdminAccessBinding responsesElement = AdminAccessBinding.newBuilder().build(); + ListAdminAccessBindingsResponse expectedResponse = + ListAdminAccessBindingsResponse.newBuilder() + .setNextPageToken("") + .addAllAdminAccessBindings(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "organizations/organization-8287"; + + ListAdminAccessBindingsPagedResponse pagedListResponse = client.listAdminAccessBindings(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAdminAccessBindingsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listAdminAccessBindingsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "organizations/organization-8287"; + client.listAdminAccessBindings(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createAdminAccessBindingTest() throws Exception { + AdminAccessBinding expectedResponse = + AdminAccessBinding.newBuilder() + .setName( + AdminAccessBindingName.of("[ORGANIZATION]", "[ADMIN_ACCESS_BINDING]").toString()) + .addAllOrganizationRoles(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + AdminAccessBinding adminAccessBinding = AdminAccessBinding.newBuilder().build(); + + AdminAccessBinding actualResponse = client.createAdminAccessBinding(parent, adminAccessBinding); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createAdminAccessBindingExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + AdminAccessBinding adminAccessBinding = AdminAccessBinding.newBuilder().build(); + client.createAdminAccessBinding(parent, adminAccessBinding); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createAdminAccessBindingTest2() throws Exception { + AdminAccessBinding expectedResponse = + AdminAccessBinding.newBuilder() + .setName( + AdminAccessBindingName.of("[ORGANIZATION]", "[ADMIN_ACCESS_BINDING]").toString()) + .addAllOrganizationRoles(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "organizations/organization-8287"; + AdminAccessBinding adminAccessBinding = AdminAccessBinding.newBuilder().build(); + + AdminAccessBinding actualResponse = client.createAdminAccessBinding(parent, adminAccessBinding); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createAdminAccessBindingExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "organizations/organization-8287"; + AdminAccessBinding adminAccessBinding = AdminAccessBinding.newBuilder().build(); + client.createAdminAccessBinding(parent, adminAccessBinding); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateAdminAccessBindingTest() throws Exception { + AdminAccessBinding expectedResponse = + AdminAccessBinding.newBuilder() + .setName( + AdminAccessBindingName.of("[ORGANIZATION]", "[ADMIN_ACCESS_BINDING]").toString()) + .addAllOrganizationRoles(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + AdminAccessBinding adminAccessBinding = + AdminAccessBinding.newBuilder() + .setName( + AdminAccessBindingName.of("[ORGANIZATION]", "[ADMIN_ACCESS_BINDING]").toString()) + .addAllOrganizationRoles(new ArrayList()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + AdminAccessBinding actualResponse = + client.updateAdminAccessBinding(adminAccessBinding, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateAdminAccessBindingExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AdminAccessBinding adminAccessBinding = + AdminAccessBinding.newBuilder() + .setName( + AdminAccessBindingName.of("[ORGANIZATION]", "[ADMIN_ACCESS_BINDING]").toString()) + .addAllOrganizationRoles(new ArrayList()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateAdminAccessBinding(adminAccessBinding, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } } diff --git a/java-marketingplatformadminapi/admin/src/test/java/com/google/ads/marketingplatform/admin/v1alpha/MarketingplatformAdminServiceClientTest.java b/java-marketingplatformadminapi/admin/src/test/java/com/google/ads/marketingplatform/admin/v1alpha/MarketingplatformAdminServiceClientTest.java index 17a848a1f4eb..08d45266625a 100644 --- a/java-marketingplatformadminapi/admin/src/test/java/com/google/ads/marketingplatform/admin/v1alpha/MarketingplatformAdminServiceClientTest.java +++ b/java-marketingplatformadminapi/admin/src/test/java/com/google/ads/marketingplatform/admin/v1alpha/MarketingplatformAdminServiceClientTest.java @@ -16,8 +16,11 @@ package com.google.ads.marketingplatform.admin.v1alpha; +import static com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient.ListAdminAccessBindingsPagedResponse; import static com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient.ListAnalyticsAccountLinksPagedResponse; import static com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient.ListOrganizationsPagedResponse; +import static com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient.ListUserGroupMembersPagedResponse; +import static com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient.ListUserGroupsPagedResponse; import com.google.api.gax.core.NoCredentialsProvider; import com.google.api.gax.grpc.GaxGrpcProperties; @@ -29,6 +32,7 @@ import com.google.common.collect.Lists; import com.google.protobuf.AbstractMessage; import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; import io.grpc.StatusRuntimeException; import java.io.IOException; import java.util.ArrayList; @@ -598,4 +602,1045 @@ public void reportPropertyUsageExceptionTest() throws Exception { // Expected exception. } } + + @Test + public void getUserGroupTest() throws Exception { + UserGroup expectedResponse = + UserGroup.newBuilder() + .setName(UserGroupName.of("[ORGANIZATION]", "[USER_GROUP]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .build(); + mockMarketingplatformAdminService.addResponse(expectedResponse); + + UserGroupName name = UserGroupName.of("[ORGANIZATION]", "[USER_GROUP]"); + + UserGroup actualResponse = client.getUserGroup(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockMarketingplatformAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetUserGroupRequest actualRequest = ((GetUserGroupRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getUserGroupExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMarketingplatformAdminService.addException(exception); + + try { + UserGroupName name = UserGroupName.of("[ORGANIZATION]", "[USER_GROUP]"); + client.getUserGroup(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getUserGroupTest2() throws Exception { + UserGroup expectedResponse = + UserGroup.newBuilder() + .setName(UserGroupName.of("[ORGANIZATION]", "[USER_GROUP]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .build(); + mockMarketingplatformAdminService.addResponse(expectedResponse); + + String name = "name3373707"; + + UserGroup actualResponse = client.getUserGroup(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockMarketingplatformAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetUserGroupRequest actualRequest = ((GetUserGroupRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getUserGroupExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMarketingplatformAdminService.addException(exception); + + try { + String name = "name3373707"; + client.getUserGroup(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listUserGroupsTest() throws Exception { + UserGroup responsesElement = UserGroup.newBuilder().build(); + ListUserGroupsResponse expectedResponse = + ListUserGroupsResponse.newBuilder() + .setNextPageToken("") + .addAllUserGroups(Arrays.asList(responsesElement)) + .build(); + mockMarketingplatformAdminService.addResponse(expectedResponse); + + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + + ListUserGroupsPagedResponse pagedListResponse = client.listUserGroups(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getUserGroupsList().get(0), resources.get(0)); + + List actualRequests = mockMarketingplatformAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListUserGroupsRequest actualRequest = ((ListUserGroupsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listUserGroupsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMarketingplatformAdminService.addException(exception); + + try { + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + client.listUserGroups(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listUserGroupsTest2() throws Exception { + UserGroup responsesElement = UserGroup.newBuilder().build(); + ListUserGroupsResponse expectedResponse = + ListUserGroupsResponse.newBuilder() + .setNextPageToken("") + .addAllUserGroups(Arrays.asList(responsesElement)) + .build(); + mockMarketingplatformAdminService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListUserGroupsPagedResponse pagedListResponse = client.listUserGroups(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getUserGroupsList().get(0), resources.get(0)); + + List actualRequests = mockMarketingplatformAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListUserGroupsRequest actualRequest = ((ListUserGroupsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listUserGroupsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMarketingplatformAdminService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listUserGroups(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createUserGroupTest() throws Exception { + UserGroup expectedResponse = + UserGroup.newBuilder() + .setName(UserGroupName.of("[ORGANIZATION]", "[USER_GROUP]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .build(); + mockMarketingplatformAdminService.addResponse(expectedResponse); + + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + UserGroup userGroup = UserGroup.newBuilder().build(); + + UserGroup actualResponse = client.createUserGroup(parent, userGroup); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockMarketingplatformAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateUserGroupRequest actualRequest = ((CreateUserGroupRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(userGroup, actualRequest.getUserGroup()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createUserGroupExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMarketingplatformAdminService.addException(exception); + + try { + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + UserGroup userGroup = UserGroup.newBuilder().build(); + client.createUserGroup(parent, userGroup); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createUserGroupTest2() throws Exception { + UserGroup expectedResponse = + UserGroup.newBuilder() + .setName(UserGroupName.of("[ORGANIZATION]", "[USER_GROUP]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .build(); + mockMarketingplatformAdminService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + UserGroup userGroup = UserGroup.newBuilder().build(); + + UserGroup actualResponse = client.createUserGroup(parent, userGroup); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockMarketingplatformAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateUserGroupRequest actualRequest = ((CreateUserGroupRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(userGroup, actualRequest.getUserGroup()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createUserGroupExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMarketingplatformAdminService.addException(exception); + + try { + String parent = "parent-995424086"; + UserGroup userGroup = UserGroup.newBuilder().build(); + client.createUserGroup(parent, userGroup); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateUserGroupTest() throws Exception { + UserGroup expectedResponse = + UserGroup.newBuilder() + .setName(UserGroupName.of("[ORGANIZATION]", "[USER_GROUP]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .build(); + mockMarketingplatformAdminService.addResponse(expectedResponse); + + UserGroup userGroup = UserGroup.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + UserGroup actualResponse = client.updateUserGroup(userGroup, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockMarketingplatformAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateUserGroupRequest actualRequest = ((UpdateUserGroupRequest) actualRequests.get(0)); + + Assert.assertEquals(userGroup, actualRequest.getUserGroup()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateUserGroupExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMarketingplatformAdminService.addException(exception); + + try { + UserGroup userGroup = UserGroup.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateUserGroup(userGroup, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteUserGroupTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockMarketingplatformAdminService.addResponse(expectedResponse); + + UserGroupName name = UserGroupName.of("[ORGANIZATION]", "[USER_GROUP]"); + + client.deleteUserGroup(name); + + List actualRequests = mockMarketingplatformAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteUserGroupRequest actualRequest = ((DeleteUserGroupRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteUserGroupExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMarketingplatformAdminService.addException(exception); + + try { + UserGroupName name = UserGroupName.of("[ORGANIZATION]", "[USER_GROUP]"); + client.deleteUserGroup(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteUserGroupTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockMarketingplatformAdminService.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteUserGroup(name); + + List actualRequests = mockMarketingplatformAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteUserGroupRequest actualRequest = ((DeleteUserGroupRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteUserGroupExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMarketingplatformAdminService.addException(exception); + + try { + String name = "name3373707"; + client.deleteUserGroup(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getUserGroupMemberTest() throws Exception { + UserGroupMember expectedResponse = + UserGroupMember.newBuilder() + .setName( + UserGroupMemberName.of("[ORGANIZATION]", "[USER_GROUP]", "[MEMBER]").toString()) + .build(); + mockMarketingplatformAdminService.addResponse(expectedResponse); + + UserGroupMemberName name = UserGroupMemberName.of("[ORGANIZATION]", "[USER_GROUP]", "[MEMBER]"); + + UserGroupMember actualResponse = client.getUserGroupMember(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockMarketingplatformAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetUserGroupMemberRequest actualRequest = ((GetUserGroupMemberRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getUserGroupMemberExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMarketingplatformAdminService.addException(exception); + + try { + UserGroupMemberName name = + UserGroupMemberName.of("[ORGANIZATION]", "[USER_GROUP]", "[MEMBER]"); + client.getUserGroupMember(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getUserGroupMemberTest2() throws Exception { + UserGroupMember expectedResponse = + UserGroupMember.newBuilder() + .setName( + UserGroupMemberName.of("[ORGANIZATION]", "[USER_GROUP]", "[MEMBER]").toString()) + .build(); + mockMarketingplatformAdminService.addResponse(expectedResponse); + + String name = "name3373707"; + + UserGroupMember actualResponse = client.getUserGroupMember(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockMarketingplatformAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetUserGroupMemberRequest actualRequest = ((GetUserGroupMemberRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getUserGroupMemberExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMarketingplatformAdminService.addException(exception); + + try { + String name = "name3373707"; + client.getUserGroupMember(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listUserGroupMembersTest() throws Exception { + UserGroupMember responsesElement = UserGroupMember.newBuilder().build(); + ListUserGroupMembersResponse expectedResponse = + ListUserGroupMembersResponse.newBuilder() + .setNextPageToken("") + .addAllUserGroupMembers(Arrays.asList(responsesElement)) + .build(); + mockMarketingplatformAdminService.addResponse(expectedResponse); + + UserGroupName parent = UserGroupName.of("[ORGANIZATION]", "[USER_GROUP]"); + + ListUserGroupMembersPagedResponse pagedListResponse = client.listUserGroupMembers(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getUserGroupMembersList().get(0), resources.get(0)); + + List actualRequests = mockMarketingplatformAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListUserGroupMembersRequest actualRequest = + ((ListUserGroupMembersRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listUserGroupMembersExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMarketingplatformAdminService.addException(exception); + + try { + UserGroupName parent = UserGroupName.of("[ORGANIZATION]", "[USER_GROUP]"); + client.listUserGroupMembers(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listUserGroupMembersTest2() throws Exception { + UserGroupMember responsesElement = UserGroupMember.newBuilder().build(); + ListUserGroupMembersResponse expectedResponse = + ListUserGroupMembersResponse.newBuilder() + .setNextPageToken("") + .addAllUserGroupMembers(Arrays.asList(responsesElement)) + .build(); + mockMarketingplatformAdminService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListUserGroupMembersPagedResponse pagedListResponse = client.listUserGroupMembers(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getUserGroupMembersList().get(0), resources.get(0)); + + List actualRequests = mockMarketingplatformAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListUserGroupMembersRequest actualRequest = + ((ListUserGroupMembersRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listUserGroupMembersExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMarketingplatformAdminService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listUserGroupMembers(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createUserGroupMemberTest() throws Exception { + UserGroupMember expectedResponse = + UserGroupMember.newBuilder() + .setName( + UserGroupMemberName.of("[ORGANIZATION]", "[USER_GROUP]", "[MEMBER]").toString()) + .build(); + mockMarketingplatformAdminService.addResponse(expectedResponse); + + UserGroupName parent = UserGroupName.of("[ORGANIZATION]", "[USER_GROUP]"); + UserGroupMember userGroupMember = UserGroupMember.newBuilder().build(); + + UserGroupMember actualResponse = client.createUserGroupMember(parent, userGroupMember); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockMarketingplatformAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateUserGroupMemberRequest actualRequest = + ((CreateUserGroupMemberRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(userGroupMember, actualRequest.getUserGroupMember()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createUserGroupMemberExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMarketingplatformAdminService.addException(exception); + + try { + UserGroupName parent = UserGroupName.of("[ORGANIZATION]", "[USER_GROUP]"); + UserGroupMember userGroupMember = UserGroupMember.newBuilder().build(); + client.createUserGroupMember(parent, userGroupMember); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createUserGroupMemberTest2() throws Exception { + UserGroupMember expectedResponse = + UserGroupMember.newBuilder() + .setName( + UserGroupMemberName.of("[ORGANIZATION]", "[USER_GROUP]", "[MEMBER]").toString()) + .build(); + mockMarketingplatformAdminService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + UserGroupMember userGroupMember = UserGroupMember.newBuilder().build(); + + UserGroupMember actualResponse = client.createUserGroupMember(parent, userGroupMember); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockMarketingplatformAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateUserGroupMemberRequest actualRequest = + ((CreateUserGroupMemberRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(userGroupMember, actualRequest.getUserGroupMember()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createUserGroupMemberExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMarketingplatformAdminService.addException(exception); + + try { + String parent = "parent-995424086"; + UserGroupMember userGroupMember = UserGroupMember.newBuilder().build(); + client.createUserGroupMember(parent, userGroupMember); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateUserGroupMemberTest() throws Exception { + UserGroupMember expectedResponse = + UserGroupMember.newBuilder() + .setName( + UserGroupMemberName.of("[ORGANIZATION]", "[USER_GROUP]", "[MEMBER]").toString()) + .build(); + mockMarketingplatformAdminService.addResponse(expectedResponse); + + UserGroupMember userGroupMember = UserGroupMember.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + UserGroupMember actualResponse = client.updateUserGroupMember(userGroupMember, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockMarketingplatformAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateUserGroupMemberRequest actualRequest = + ((UpdateUserGroupMemberRequest) actualRequests.get(0)); + + Assert.assertEquals(userGroupMember, actualRequest.getUserGroupMember()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateUserGroupMemberExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMarketingplatformAdminService.addException(exception); + + try { + UserGroupMember userGroupMember = UserGroupMember.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateUserGroupMember(userGroupMember, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteUserGroupMemberTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockMarketingplatformAdminService.addResponse(expectedResponse); + + UserGroupMemberName name = UserGroupMemberName.of("[ORGANIZATION]", "[USER_GROUP]", "[MEMBER]"); + + client.deleteUserGroupMember(name); + + List actualRequests = mockMarketingplatformAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteUserGroupMemberRequest actualRequest = + ((DeleteUserGroupMemberRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteUserGroupMemberExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMarketingplatformAdminService.addException(exception); + + try { + UserGroupMemberName name = + UserGroupMemberName.of("[ORGANIZATION]", "[USER_GROUP]", "[MEMBER]"); + client.deleteUserGroupMember(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteUserGroupMemberTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockMarketingplatformAdminService.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteUserGroupMember(name); + + List actualRequests = mockMarketingplatformAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteUserGroupMemberRequest actualRequest = + ((DeleteUserGroupMemberRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteUserGroupMemberExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMarketingplatformAdminService.addException(exception); + + try { + String name = "name3373707"; + client.deleteUserGroupMember(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAdminAccessBindingTest() throws Exception { + AdminAccessBinding expectedResponse = + AdminAccessBinding.newBuilder() + .setName( + AdminAccessBindingName.of("[ORGANIZATION]", "[ADMIN_ACCESS_BINDING]").toString()) + .addAllOrganizationRoles(new ArrayList()) + .build(); + mockMarketingplatformAdminService.addResponse(expectedResponse); + + AdminAccessBindingName name = + AdminAccessBindingName.of("[ORGANIZATION]", "[ADMIN_ACCESS_BINDING]"); + + AdminAccessBinding actualResponse = client.getAdminAccessBinding(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockMarketingplatformAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetAdminAccessBindingRequest actualRequest = + ((GetAdminAccessBindingRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getAdminAccessBindingExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMarketingplatformAdminService.addException(exception); + + try { + AdminAccessBindingName name = + AdminAccessBindingName.of("[ORGANIZATION]", "[ADMIN_ACCESS_BINDING]"); + client.getAdminAccessBinding(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAdminAccessBindingTest2() throws Exception { + AdminAccessBinding expectedResponse = + AdminAccessBinding.newBuilder() + .setName( + AdminAccessBindingName.of("[ORGANIZATION]", "[ADMIN_ACCESS_BINDING]").toString()) + .addAllOrganizationRoles(new ArrayList()) + .build(); + mockMarketingplatformAdminService.addResponse(expectedResponse); + + String name = "name3373707"; + + AdminAccessBinding actualResponse = client.getAdminAccessBinding(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockMarketingplatformAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetAdminAccessBindingRequest actualRequest = + ((GetAdminAccessBindingRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getAdminAccessBindingExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMarketingplatformAdminService.addException(exception); + + try { + String name = "name3373707"; + client.getAdminAccessBinding(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAdminAccessBindingsTest() throws Exception { + AdminAccessBinding responsesElement = AdminAccessBinding.newBuilder().build(); + ListAdminAccessBindingsResponse expectedResponse = + ListAdminAccessBindingsResponse.newBuilder() + .setNextPageToken("") + .addAllAdminAccessBindings(Arrays.asList(responsesElement)) + .build(); + mockMarketingplatformAdminService.addResponse(expectedResponse); + + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + + ListAdminAccessBindingsPagedResponse pagedListResponse = client.listAdminAccessBindings(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAdminAccessBindingsList().get(0), resources.get(0)); + + List actualRequests = mockMarketingplatformAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAdminAccessBindingsRequest actualRequest = + ((ListAdminAccessBindingsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAdminAccessBindingsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMarketingplatformAdminService.addException(exception); + + try { + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + client.listAdminAccessBindings(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAdminAccessBindingsTest2() throws Exception { + AdminAccessBinding responsesElement = AdminAccessBinding.newBuilder().build(); + ListAdminAccessBindingsResponse expectedResponse = + ListAdminAccessBindingsResponse.newBuilder() + .setNextPageToken("") + .addAllAdminAccessBindings(Arrays.asList(responsesElement)) + .build(); + mockMarketingplatformAdminService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListAdminAccessBindingsPagedResponse pagedListResponse = client.listAdminAccessBindings(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAdminAccessBindingsList().get(0), resources.get(0)); + + List actualRequests = mockMarketingplatformAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAdminAccessBindingsRequest actualRequest = + ((ListAdminAccessBindingsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAdminAccessBindingsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMarketingplatformAdminService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listAdminAccessBindings(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createAdminAccessBindingTest() throws Exception { + AdminAccessBinding expectedResponse = + AdminAccessBinding.newBuilder() + .setName( + AdminAccessBindingName.of("[ORGANIZATION]", "[ADMIN_ACCESS_BINDING]").toString()) + .addAllOrganizationRoles(new ArrayList()) + .build(); + mockMarketingplatformAdminService.addResponse(expectedResponse); + + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + AdminAccessBinding adminAccessBinding = AdminAccessBinding.newBuilder().build(); + + AdminAccessBinding actualResponse = client.createAdminAccessBinding(parent, adminAccessBinding); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockMarketingplatformAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateAdminAccessBindingRequest actualRequest = + ((CreateAdminAccessBindingRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(adminAccessBinding, actualRequest.getAdminAccessBinding()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createAdminAccessBindingExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMarketingplatformAdminService.addException(exception); + + try { + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + AdminAccessBinding adminAccessBinding = AdminAccessBinding.newBuilder().build(); + client.createAdminAccessBinding(parent, adminAccessBinding); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createAdminAccessBindingTest2() throws Exception { + AdminAccessBinding expectedResponse = + AdminAccessBinding.newBuilder() + .setName( + AdminAccessBindingName.of("[ORGANIZATION]", "[ADMIN_ACCESS_BINDING]").toString()) + .addAllOrganizationRoles(new ArrayList()) + .build(); + mockMarketingplatformAdminService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + AdminAccessBinding adminAccessBinding = AdminAccessBinding.newBuilder().build(); + + AdminAccessBinding actualResponse = client.createAdminAccessBinding(parent, adminAccessBinding); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockMarketingplatformAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateAdminAccessBindingRequest actualRequest = + ((CreateAdminAccessBindingRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(adminAccessBinding, actualRequest.getAdminAccessBinding()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createAdminAccessBindingExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMarketingplatformAdminService.addException(exception); + + try { + String parent = "parent-995424086"; + AdminAccessBinding adminAccessBinding = AdminAccessBinding.newBuilder().build(); + client.createAdminAccessBinding(parent, adminAccessBinding); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateAdminAccessBindingTest() throws Exception { + AdminAccessBinding expectedResponse = + AdminAccessBinding.newBuilder() + .setName( + AdminAccessBindingName.of("[ORGANIZATION]", "[ADMIN_ACCESS_BINDING]").toString()) + .addAllOrganizationRoles(new ArrayList()) + .build(); + mockMarketingplatformAdminService.addResponse(expectedResponse); + + AdminAccessBinding adminAccessBinding = AdminAccessBinding.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + AdminAccessBinding actualResponse = + client.updateAdminAccessBinding(adminAccessBinding, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockMarketingplatformAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateAdminAccessBindingRequest actualRequest = + ((UpdateAdminAccessBindingRequest) actualRequests.get(0)); + + Assert.assertEquals(adminAccessBinding, actualRequest.getAdminAccessBinding()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateAdminAccessBindingExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMarketingplatformAdminService.addException(exception); + + try { + AdminAccessBinding adminAccessBinding = AdminAccessBinding.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateAdminAccessBinding(adminAccessBinding, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } } diff --git a/java-marketingplatformadminapi/admin/src/test/java/com/google/ads/marketingplatform/admin/v1alpha/MockMarketingplatformAdminServiceImpl.java b/java-marketingplatformadminapi/admin/src/test/java/com/google/ads/marketingplatform/admin/v1alpha/MockMarketingplatformAdminServiceImpl.java index f783c67fee35..b7cbf08473ae 100644 --- a/java-marketingplatformadminapi/admin/src/test/java/com/google/ads/marketingplatform/admin/v1alpha/MockMarketingplatformAdminServiceImpl.java +++ b/java-marketingplatformadminapi/admin/src/test/java/com/google/ads/marketingplatform/admin/v1alpha/MockMarketingplatformAdminServiceImpl.java @@ -237,4 +237,310 @@ public void reportPropertyUsage( Exception.class.getName()))); } } + + @Override + public void getUserGroup( + GetUserGroupRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof UserGroup) { + requests.add(request); + responseObserver.onNext(((UserGroup) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetUserGroup, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + UserGroup.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listUserGroups( + ListUserGroupsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListUserGroupsResponse) { + requests.add(request); + responseObserver.onNext(((ListUserGroupsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListUserGroups, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListUserGroupsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createUserGroup( + CreateUserGroupRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof UserGroup) { + requests.add(request); + responseObserver.onNext(((UserGroup) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateUserGroup, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + UserGroup.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateUserGroup( + UpdateUserGroupRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof UserGroup) { + requests.add(request); + responseObserver.onNext(((UserGroup) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateUserGroup, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + UserGroup.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteUserGroup( + DeleteUserGroupRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteUserGroup, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getUserGroupMember( + GetUserGroupMemberRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof UserGroupMember) { + requests.add(request); + responseObserver.onNext(((UserGroupMember) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetUserGroupMember, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + UserGroupMember.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listUserGroupMembers( + ListUserGroupMembersRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListUserGroupMembersResponse) { + requests.add(request); + responseObserver.onNext(((ListUserGroupMembersResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListUserGroupMembers, expected %s or" + + " %s", + response == null ? "null" : response.getClass().getName(), + ListUserGroupMembersResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createUserGroupMember( + CreateUserGroupMemberRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof UserGroupMember) { + requests.add(request); + responseObserver.onNext(((UserGroupMember) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateUserGroupMember, expected %s or" + + " %s", + response == null ? "null" : response.getClass().getName(), + UserGroupMember.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateUserGroupMember( + UpdateUserGroupMemberRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof UserGroupMember) { + requests.add(request); + responseObserver.onNext(((UserGroupMember) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateUserGroupMember, expected %s or" + + " %s", + response == null ? "null" : response.getClass().getName(), + UserGroupMember.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteUserGroupMember( + DeleteUserGroupMemberRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteUserGroupMember, expected %s or" + + " %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getAdminAccessBinding( + GetAdminAccessBindingRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof AdminAccessBinding) { + requests.add(request); + responseObserver.onNext(((AdminAccessBinding) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetAdminAccessBinding, expected %s or" + + " %s", + response == null ? "null" : response.getClass().getName(), + AdminAccessBinding.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listAdminAccessBindings( + ListAdminAccessBindingsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListAdminAccessBindingsResponse) { + requests.add(request); + responseObserver.onNext(((ListAdminAccessBindingsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListAdminAccessBindings, expected %s or" + + " %s", + response == null ? "null" : response.getClass().getName(), + ListAdminAccessBindingsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createAdminAccessBinding( + CreateAdminAccessBindingRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof AdminAccessBinding) { + requests.add(request); + responseObserver.onNext(((AdminAccessBinding) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateAdminAccessBinding, expected %s" + + " or %s", + response == null ? "null" : response.getClass().getName(), + AdminAccessBinding.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateAdminAccessBinding( + UpdateAdminAccessBindingRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof AdminAccessBinding) { + requests.add(request); + responseObserver.onNext(((AdminAccessBinding) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateAdminAccessBinding, expected %s" + + " or %s", + response == null ? "null" : response.getClass().getName(), + AdminAccessBinding.class.getName(), + Exception.class.getName()))); + } + } } diff --git a/java-marketingplatformadminapi/grpc-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/MarketingplatformAdminServiceGrpc.java b/java-marketingplatformadminapi/grpc-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/MarketingplatformAdminServiceGrpc.java index 7af182de32b5..07ffc3b968ed 100644 --- a/java-marketingplatformadminapi/grpc-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/MarketingplatformAdminServiceGrpc.java +++ b/java-marketingplatformadminapi/grpc-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/MarketingplatformAdminServiceGrpc.java @@ -471,83 +471,1637 @@ private MarketingplatformAdminServiceGrpc() {} return getReportPropertyUsageMethod; } - /** Creates a new async stub that supports all call types for the service */ - public static MarketingplatformAdminServiceStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public MarketingplatformAdminServiceStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new MarketingplatformAdminServiceStub(channel, callOptions); - } - }; - return MarketingplatformAdminServiceStub.newStub(factory, channel); + private static volatile io.grpc.MethodDescriptor< + com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupRequest, + com.google.ads.marketingplatform.admin.v1alpha.UserGroup> + getGetUserGroupMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetUserGroup", + requestType = com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupRequest.class, + responseType = com.google.ads.marketingplatform.admin.v1alpha.UserGroup.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupRequest, + com.google.ads.marketingplatform.admin.v1alpha.UserGroup> + getGetUserGroupMethod() { + io.grpc.MethodDescriptor< + com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupRequest, + com.google.ads.marketingplatform.admin.v1alpha.UserGroup> + getGetUserGroupMethod; + if ((getGetUserGroupMethod = MarketingplatformAdminServiceGrpc.getGetUserGroupMethod) == null) { + synchronized (MarketingplatformAdminServiceGrpc.class) { + if ((getGetUserGroupMethod = MarketingplatformAdminServiceGrpc.getGetUserGroupMethod) + == null) { + MarketingplatformAdminServiceGrpc.getGetUserGroupMethod = + getGetUserGroupMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetUserGroup")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.ads.marketingplatform.admin.v1alpha.UserGroup + .getDefaultInstance())) + .setSchemaDescriptor( + new MarketingplatformAdminServiceMethodDescriptorSupplier("GetUserGroup")) + .build(); + } + } + } + return getGetUserGroupMethod; } - /** Creates a new blocking-style stub that supports all types of calls on the service */ - public static MarketingplatformAdminServiceBlockingV2Stub newBlockingV2Stub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public MarketingplatformAdminServiceBlockingV2Stub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new MarketingplatformAdminServiceBlockingV2Stub(channel, callOptions); - } - }; - return MarketingplatformAdminServiceBlockingV2Stub.newStub(factory, channel); + private static volatile io.grpc.MethodDescriptor< + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsRequest, + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsResponse> + getListUserGroupsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListUserGroups", + requestType = com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsRequest.class, + responseType = com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsRequest, + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsResponse> + getListUserGroupsMethod() { + io.grpc.MethodDescriptor< + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsRequest, + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsResponse> + getListUserGroupsMethod; + if ((getListUserGroupsMethod = MarketingplatformAdminServiceGrpc.getListUserGroupsMethod) + == null) { + synchronized (MarketingplatformAdminServiceGrpc.class) { + if ((getListUserGroupsMethod = MarketingplatformAdminServiceGrpc.getListUserGroupsMethod) + == null) { + MarketingplatformAdminServiceGrpc.getListUserGroupsMethod = + getListUserGroupsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListUserGroups")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new MarketingplatformAdminServiceMethodDescriptorSupplier( + "ListUserGroups")) + .build(); + } + } + } + return getListUserGroupsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupRequest, + com.google.ads.marketingplatform.admin.v1alpha.UserGroup> + getCreateUserGroupMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateUserGroup", + requestType = com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupRequest.class, + responseType = com.google.ads.marketingplatform.admin.v1alpha.UserGroup.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupRequest, + com.google.ads.marketingplatform.admin.v1alpha.UserGroup> + getCreateUserGroupMethod() { + io.grpc.MethodDescriptor< + com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupRequest, + com.google.ads.marketingplatform.admin.v1alpha.UserGroup> + getCreateUserGroupMethod; + if ((getCreateUserGroupMethod = MarketingplatformAdminServiceGrpc.getCreateUserGroupMethod) + == null) { + synchronized (MarketingplatformAdminServiceGrpc.class) { + if ((getCreateUserGroupMethod = MarketingplatformAdminServiceGrpc.getCreateUserGroupMethod) + == null) { + MarketingplatformAdminServiceGrpc.getCreateUserGroupMethod = + getCreateUserGroupMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateUserGroup")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.ads.marketingplatform.admin.v1alpha.UserGroup + .getDefaultInstance())) + .setSchemaDescriptor( + new MarketingplatformAdminServiceMethodDescriptorSupplier( + "CreateUserGroup")) + .build(); + } + } + } + return getCreateUserGroupMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupRequest, + com.google.ads.marketingplatform.admin.v1alpha.UserGroup> + getUpdateUserGroupMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateUserGroup", + requestType = com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupRequest.class, + responseType = com.google.ads.marketingplatform.admin.v1alpha.UserGroup.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupRequest, + com.google.ads.marketingplatform.admin.v1alpha.UserGroup> + getUpdateUserGroupMethod() { + io.grpc.MethodDescriptor< + com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupRequest, + com.google.ads.marketingplatform.admin.v1alpha.UserGroup> + getUpdateUserGroupMethod; + if ((getUpdateUserGroupMethod = MarketingplatformAdminServiceGrpc.getUpdateUserGroupMethod) + == null) { + synchronized (MarketingplatformAdminServiceGrpc.class) { + if ((getUpdateUserGroupMethod = MarketingplatformAdminServiceGrpc.getUpdateUserGroupMethod) + == null) { + MarketingplatformAdminServiceGrpc.getUpdateUserGroupMethod = + getUpdateUserGroupMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateUserGroup")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.ads.marketingplatform.admin.v1alpha.UserGroup + .getDefaultInstance())) + .setSchemaDescriptor( + new MarketingplatformAdminServiceMethodDescriptorSupplier( + "UpdateUserGroup")) + .build(); + } + } + } + return getUpdateUserGroupMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupRequest, + com.google.protobuf.Empty> + getDeleteUserGroupMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteUserGroup", + requestType = com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupRequest, + com.google.protobuf.Empty> + getDeleteUserGroupMethod() { + io.grpc.MethodDescriptor< + com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupRequest, + com.google.protobuf.Empty> + getDeleteUserGroupMethod; + if ((getDeleteUserGroupMethod = MarketingplatformAdminServiceGrpc.getDeleteUserGroupMethod) + == null) { + synchronized (MarketingplatformAdminServiceGrpc.class) { + if ((getDeleteUserGroupMethod = MarketingplatformAdminServiceGrpc.getDeleteUserGroupMethod) + == null) { + MarketingplatformAdminServiceGrpc.getDeleteUserGroupMethod = + getDeleteUserGroupMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteUserGroup")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new MarketingplatformAdminServiceMethodDescriptorSupplier( + "DeleteUserGroup")) + .build(); + } + } + } + return getDeleteUserGroupMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupMemberRequest, + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember> + getGetUserGroupMemberMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetUserGroupMember", + requestType = com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupMemberRequest.class, + responseType = com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupMemberRequest, + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember> + getGetUserGroupMemberMethod() { + io.grpc.MethodDescriptor< + com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupMemberRequest, + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember> + getGetUserGroupMemberMethod; + if ((getGetUserGroupMemberMethod = + MarketingplatformAdminServiceGrpc.getGetUserGroupMemberMethod) + == null) { + synchronized (MarketingplatformAdminServiceGrpc.class) { + if ((getGetUserGroupMemberMethod = + MarketingplatformAdminServiceGrpc.getGetUserGroupMemberMethod) + == null) { + MarketingplatformAdminServiceGrpc.getGetUserGroupMemberMethod = + getGetUserGroupMemberMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetUserGroupMember")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.ads.marketingplatform.admin.v1alpha + .GetUserGroupMemberRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember + .getDefaultInstance())) + .setSchemaDescriptor( + new MarketingplatformAdminServiceMethodDescriptorSupplier( + "GetUserGroupMember")) + .build(); + } + } + } + return getGetUserGroupMemberMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersRequest, + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersResponse> + getListUserGroupMembersMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListUserGroupMembers", + requestType = + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersRequest.class, + responseType = + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersRequest, + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersResponse> + getListUserGroupMembersMethod() { + io.grpc.MethodDescriptor< + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersRequest, + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersResponse> + getListUserGroupMembersMethod; + if ((getListUserGroupMembersMethod = + MarketingplatformAdminServiceGrpc.getListUserGroupMembersMethod) + == null) { + synchronized (MarketingplatformAdminServiceGrpc.class) { + if ((getListUserGroupMembersMethod = + MarketingplatformAdminServiceGrpc.getListUserGroupMembersMethod) + == null) { + MarketingplatformAdminServiceGrpc.getListUserGroupMembersMethod = + getListUserGroupMembersMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListUserGroupMembers")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.ads.marketingplatform.admin.v1alpha + .ListUserGroupMembersRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.ads.marketingplatform.admin.v1alpha + .ListUserGroupMembersResponse.getDefaultInstance())) + .setSchemaDescriptor( + new MarketingplatformAdminServiceMethodDescriptorSupplier( + "ListUserGroupMembers")) + .build(); + } + } + } + return getListUserGroupMembersMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupMemberRequest, + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember> + getCreateUserGroupMemberMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateUserGroupMember", + requestType = + com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupMemberRequest.class, + responseType = com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupMemberRequest, + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember> + getCreateUserGroupMemberMethod() { + io.grpc.MethodDescriptor< + com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupMemberRequest, + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember> + getCreateUserGroupMemberMethod; + if ((getCreateUserGroupMemberMethod = + MarketingplatformAdminServiceGrpc.getCreateUserGroupMemberMethod) + == null) { + synchronized (MarketingplatformAdminServiceGrpc.class) { + if ((getCreateUserGroupMemberMethod = + MarketingplatformAdminServiceGrpc.getCreateUserGroupMemberMethod) + == null) { + MarketingplatformAdminServiceGrpc.getCreateUserGroupMemberMethod = + getCreateUserGroupMemberMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateUserGroupMember")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.ads.marketingplatform.admin.v1alpha + .CreateUserGroupMemberRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember + .getDefaultInstance())) + .setSchemaDescriptor( + new MarketingplatformAdminServiceMethodDescriptorSupplier( + "CreateUserGroupMember")) + .build(); + } + } + } + return getCreateUserGroupMemberMethod; } - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static MarketingplatformAdminServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public MarketingplatformAdminServiceBlockingStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new MarketingplatformAdminServiceBlockingStub(channel, callOptions); - } - }; - return MarketingplatformAdminServiceBlockingStub.newStub(factory, channel); - } + private static volatile io.grpc.MethodDescriptor< + com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupMemberRequest, + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember> + getUpdateUserGroupMemberMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateUserGroupMember", + requestType = + com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupMemberRequest.class, + responseType = com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupMemberRequest, + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember> + getUpdateUserGroupMemberMethod() { + io.grpc.MethodDescriptor< + com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupMemberRequest, + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember> + getUpdateUserGroupMemberMethod; + if ((getUpdateUserGroupMemberMethod = + MarketingplatformAdminServiceGrpc.getUpdateUserGroupMemberMethod) + == null) { + synchronized (MarketingplatformAdminServiceGrpc.class) { + if ((getUpdateUserGroupMemberMethod = + MarketingplatformAdminServiceGrpc.getUpdateUserGroupMemberMethod) + == null) { + MarketingplatformAdminServiceGrpc.getUpdateUserGroupMemberMethod = + getUpdateUserGroupMemberMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpdateUserGroupMember")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.ads.marketingplatform.admin.v1alpha + .UpdateUserGroupMemberRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember + .getDefaultInstance())) + .setSchemaDescriptor( + new MarketingplatformAdminServiceMethodDescriptorSupplier( + "UpdateUserGroupMember")) + .build(); + } + } + } + return getUpdateUserGroupMemberMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupMemberRequest, + com.google.protobuf.Empty> + getDeleteUserGroupMemberMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteUserGroupMember", + requestType = + com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupMemberRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupMemberRequest, + com.google.protobuf.Empty> + getDeleteUserGroupMemberMethod() { + io.grpc.MethodDescriptor< + com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupMemberRequest, + com.google.protobuf.Empty> + getDeleteUserGroupMemberMethod; + if ((getDeleteUserGroupMemberMethod = + MarketingplatformAdminServiceGrpc.getDeleteUserGroupMemberMethod) + == null) { + synchronized (MarketingplatformAdminServiceGrpc.class) { + if ((getDeleteUserGroupMemberMethod = + MarketingplatformAdminServiceGrpc.getDeleteUserGroupMemberMethod) + == null) { + MarketingplatformAdminServiceGrpc.getDeleteUserGroupMemberMethod = + getDeleteUserGroupMemberMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeleteUserGroupMember")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.ads.marketingplatform.admin.v1alpha + .DeleteUserGroupMemberRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new MarketingplatformAdminServiceMethodDescriptorSupplier( + "DeleteUserGroupMember")) + .build(); + } + } + } + return getDeleteUserGroupMemberMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.ads.marketingplatform.admin.v1alpha.GetAdminAccessBindingRequest, + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding> + getGetAdminAccessBindingMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetAdminAccessBinding", + requestType = + com.google.ads.marketingplatform.admin.v1alpha.GetAdminAccessBindingRequest.class, + responseType = com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.ads.marketingplatform.admin.v1alpha.GetAdminAccessBindingRequest, + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding> + getGetAdminAccessBindingMethod() { + io.grpc.MethodDescriptor< + com.google.ads.marketingplatform.admin.v1alpha.GetAdminAccessBindingRequest, + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding> + getGetAdminAccessBindingMethod; + if ((getGetAdminAccessBindingMethod = + MarketingplatformAdminServiceGrpc.getGetAdminAccessBindingMethod) + == null) { + synchronized (MarketingplatformAdminServiceGrpc.class) { + if ((getGetAdminAccessBindingMethod = + MarketingplatformAdminServiceGrpc.getGetAdminAccessBindingMethod) + == null) { + MarketingplatformAdminServiceGrpc.getGetAdminAccessBindingMethod = + getGetAdminAccessBindingMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetAdminAccessBinding")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.ads.marketingplatform.admin.v1alpha + .GetAdminAccessBindingRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding + .getDefaultInstance())) + .setSchemaDescriptor( + new MarketingplatformAdminServiceMethodDescriptorSupplier( + "GetAdminAccessBinding")) + .build(); + } + } + } + return getGetAdminAccessBindingMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsRequest, + com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsResponse> + getListAdminAccessBindingsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListAdminAccessBindings", + requestType = + com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsRequest.class, + responseType = + com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsRequest, + com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsResponse> + getListAdminAccessBindingsMethod() { + io.grpc.MethodDescriptor< + com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsRequest, + com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsResponse> + getListAdminAccessBindingsMethod; + if ((getListAdminAccessBindingsMethod = + MarketingplatformAdminServiceGrpc.getListAdminAccessBindingsMethod) + == null) { + synchronized (MarketingplatformAdminServiceGrpc.class) { + if ((getListAdminAccessBindingsMethod = + MarketingplatformAdminServiceGrpc.getListAdminAccessBindingsMethod) + == null) { + MarketingplatformAdminServiceGrpc.getListAdminAccessBindingsMethod = + getListAdminAccessBindingsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListAdminAccessBindings")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.ads.marketingplatform.admin.v1alpha + .ListAdminAccessBindingsRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.ads.marketingplatform.admin.v1alpha + .ListAdminAccessBindingsResponse.getDefaultInstance())) + .setSchemaDescriptor( + new MarketingplatformAdminServiceMethodDescriptorSupplier( + "ListAdminAccessBindings")) + .build(); + } + } + } + return getListAdminAccessBindingsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.ads.marketingplatform.admin.v1alpha.CreateAdminAccessBindingRequest, + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding> + getCreateAdminAccessBindingMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateAdminAccessBinding", + requestType = + com.google.ads.marketingplatform.admin.v1alpha.CreateAdminAccessBindingRequest.class, + responseType = com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.ads.marketingplatform.admin.v1alpha.CreateAdminAccessBindingRequest, + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding> + getCreateAdminAccessBindingMethod() { + io.grpc.MethodDescriptor< + com.google.ads.marketingplatform.admin.v1alpha.CreateAdminAccessBindingRequest, + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding> + getCreateAdminAccessBindingMethod; + if ((getCreateAdminAccessBindingMethod = + MarketingplatformAdminServiceGrpc.getCreateAdminAccessBindingMethod) + == null) { + synchronized (MarketingplatformAdminServiceGrpc.class) { + if ((getCreateAdminAccessBindingMethod = + MarketingplatformAdminServiceGrpc.getCreateAdminAccessBindingMethod) + == null) { + MarketingplatformAdminServiceGrpc.getCreateAdminAccessBindingMethod = + getCreateAdminAccessBindingMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateAdminAccessBinding")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.ads.marketingplatform.admin.v1alpha + .CreateAdminAccessBindingRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding + .getDefaultInstance())) + .setSchemaDescriptor( + new MarketingplatformAdminServiceMethodDescriptorSupplier( + "CreateAdminAccessBinding")) + .build(); + } + } + } + return getCreateAdminAccessBindingMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.ads.marketingplatform.admin.v1alpha.UpdateAdminAccessBindingRequest, + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding> + getUpdateAdminAccessBindingMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateAdminAccessBinding", + requestType = + com.google.ads.marketingplatform.admin.v1alpha.UpdateAdminAccessBindingRequest.class, + responseType = com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.ads.marketingplatform.admin.v1alpha.UpdateAdminAccessBindingRequest, + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding> + getUpdateAdminAccessBindingMethod() { + io.grpc.MethodDescriptor< + com.google.ads.marketingplatform.admin.v1alpha.UpdateAdminAccessBindingRequest, + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding> + getUpdateAdminAccessBindingMethod; + if ((getUpdateAdminAccessBindingMethod = + MarketingplatformAdminServiceGrpc.getUpdateAdminAccessBindingMethod) + == null) { + synchronized (MarketingplatformAdminServiceGrpc.class) { + if ((getUpdateAdminAccessBindingMethod = + MarketingplatformAdminServiceGrpc.getUpdateAdminAccessBindingMethod) + == null) { + MarketingplatformAdminServiceGrpc.getUpdateAdminAccessBindingMethod = + getUpdateAdminAccessBindingMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpdateAdminAccessBinding")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.ads.marketingplatform.admin.v1alpha + .UpdateAdminAccessBindingRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding + .getDefaultInstance())) + .setSchemaDescriptor( + new MarketingplatformAdminServiceMethodDescriptorSupplier( + "UpdateAdminAccessBinding")) + .build(); + } + } + } + return getUpdateAdminAccessBindingMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static MarketingplatformAdminServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public MarketingplatformAdminServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new MarketingplatformAdminServiceStub(channel, callOptions); + } + }; + return MarketingplatformAdminServiceStub.newStub(factory, channel); + } + + /** Creates a new blocking-style stub that supports all types of calls on the service */ + public static MarketingplatformAdminServiceBlockingV2Stub newBlockingV2Stub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public MarketingplatformAdminServiceBlockingV2Stub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new MarketingplatformAdminServiceBlockingV2Stub(channel, callOptions); + } + }; + return MarketingplatformAdminServiceBlockingV2Stub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static MarketingplatformAdminServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public MarketingplatformAdminServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new MarketingplatformAdminServiceBlockingStub(channel, callOptions); + } + }; + return MarketingplatformAdminServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static MarketingplatformAdminServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public MarketingplatformAdminServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new MarketingplatformAdminServiceFutureStub(channel, callOptions); + } + }; + return MarketingplatformAdminServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Service Interface for the Google Marketing Platform Admin API.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Looks up a single organization.
+     * 
+ */ + default void getOrganization( + com.google.ads.marketingplatform.admin.v1alpha.GetOrganizationRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetOrganizationMethod(), responseObserver); + } + + /** + * + * + *
+     * Returns a list of organizations that the user has access to.
+     * 
+ */ + default void listOrganizations( + com.google.ads.marketingplatform.admin.v1alpha.ListOrganizationsRequest request, + io.grpc.stub.StreamObserver< + com.google.ads.marketingplatform.admin.v1alpha.ListOrganizationsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListOrganizationsMethod(), responseObserver); + } + + /** + * + * + *
+     * Returns a list of clients managed by the sales partner organization.
+     * User needs to be an OrgAdmin/BillingAdmin on the sales partner organization
+     * in order to view the end clients.
+     * 
+ */ + default void findSalesPartnerManagedClients( + com.google.ads.marketingplatform.admin.v1alpha.FindSalesPartnerManagedClientsRequest + request, + io.grpc.stub.StreamObserver< + com.google.ads.marketingplatform.admin.v1alpha + .FindSalesPartnerManagedClientsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getFindSalesPartnerManagedClientsMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists the Google Analytics accounts link to the specified Google Marketing
+     * Platform organization.
+     * 
+ */ + default void listAnalyticsAccountLinks( + com.google.ads.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest request, + io.grpc.stub.StreamObserver< + com.google.ads.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListAnalyticsAccountLinksMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates the link between the Analytics account and the Google Marketing
+     * Platform organization.
+     * User needs to be an org user, and admin on the Analytics account to create
+     * the link. If the account is already linked to an organization, user needs
+     * to unlink the account from the current organization, then try link again.
+     * 
+ */ + default void createAnalyticsAccountLink( + com.google.ads.marketingplatform.admin.v1alpha.CreateAnalyticsAccountLinkRequest request, + io.grpc.stub.StreamObserver< + com.google.ads.marketingplatform.admin.v1alpha.AnalyticsAccountLink> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateAnalyticsAccountLinkMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes the AnalyticsAccountLink, which detaches the Analytics account from
+     * the Google Marketing Platform organization.
+     * User needs to be an org user, and admin on the Analytics account in order
+     * to delete the link.
+     * 
+ */ + default void deleteAnalyticsAccountLink( + com.google.ads.marketingplatform.admin.v1alpha.DeleteAnalyticsAccountLinkRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteAnalyticsAccountLinkMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the service level for an Analytics property.
+     * 
+ */ + default void setPropertyServiceLevel( + com.google.ads.marketingplatform.admin.v1alpha.SetPropertyServiceLevelRequest request, + io.grpc.stub.StreamObserver< + com.google.ads.marketingplatform.admin.v1alpha.SetPropertyServiceLevelResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getSetPropertyServiceLevelMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets the usage and billing data for properties within the organization for
+     * the specified month.
+     * Per direct client org, user needs to be OrgAdmin/BillingAdmin on the
+     * organization in order to view the billing and usage data.
+     * Per sales partner client org, user needs to be OrgAdmin/BillingAdmin on
+     * the sales partner org in order to view the billing and usage data, or
+     * OrgAdmin/BillingAdmin on the sales partner client org in order to view the
+     * usage data only.
+     * 
+ */ + default void reportPropertyUsage( + com.google.ads.marketingplatform.admin.v1alpha.ReportPropertyUsageRequest request, + io.grpc.stub.StreamObserver< + com.google.ads.marketingplatform.admin.v1alpha.ReportPropertyUsageResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getReportPropertyUsageMethod(), responseObserver); + } + + /** + * + * + *
+     * Looks up a single user group.
+     * 
+ */ + default void getUserGroup( + com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetUserGroupMethod(), responseObserver); + } + + /** + * + * + *
+     * Returns a list of user groups in the specified GMP organization.
+     * 
+ */ + default void listUserGroups( + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsRequest request, + io.grpc.stub.StreamObserver< + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListUserGroupsMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a user group in the specified GMP organization.
+     * 
+ */ + default void createUserGroup( + com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateUserGroupMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates a user group in the specified GMP organization.
+     * 
+ */ + default void updateUserGroup( + com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateUserGroupMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a user group in the specified GMP organization.
+     * 
+ */ + default void deleteUserGroup( + com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteUserGroupMethod(), responseObserver); + } + + /** + * + * + *
+     * Looks up a single user group member.
+     * 
+ */ + default void getUserGroupMember( + com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupMemberRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetUserGroupMemberMethod(), responseObserver); + } + + /** + * + * + *
+     * Returns a list of members in the specified user group.
+     * 
+ */ + default void listUserGroupMembers( + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersRequest request, + io.grpc.stub.StreamObserver< + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListUserGroupMembersMethod(), responseObserver); + } + + /** + * + * + *
+     * Adds a member to the specified GMP user group.
+     * 
+ */ + default void createUserGroupMember( + com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupMemberRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateUserGroupMemberMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates a member in the specified GMP user group.
+     * 
+ */ + default void updateUserGroupMember( + com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupMemberRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateUserGroupMemberMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a member in the specified GMP user group.
+     * 
+ */ + default void deleteUserGroupMember( + com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupMemberRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteUserGroupMemberMethod(), responseObserver); + } + + /** + * + * + *
+     * Looks up a single admin access binding.
+     * 
+ */ + default void getAdminAccessBinding( + com.google.ads.marketingplatform.admin.v1alpha.GetAdminAccessBindingRequest request, + io.grpc.stub.StreamObserver< + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetAdminAccessBindingMethod(), responseObserver); + } + + /** + * + * + *
+     * Returns a list of admin access bindings in the specified GMP organization.
+     * 
+ */ + default void listAdminAccessBindings( + com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsRequest request, + io.grpc.stub.StreamObserver< + com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListAdminAccessBindingsMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates an admin access binding in the specified GMP organization.
+     * 
+ */ + default void createAdminAccessBinding( + com.google.ads.marketingplatform.admin.v1alpha.CreateAdminAccessBindingRequest request, + io.grpc.stub.StreamObserver< + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateAdminAccessBindingMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates an admin access binding in the specified GMP organization.
+     * 
+ */ + default void updateAdminAccessBinding( + com.google.ads.marketingplatform.admin.v1alpha.UpdateAdminAccessBindingRequest request, + io.grpc.stub.StreamObserver< + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateAdminAccessBindingMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service MarketingplatformAdminService. + * + *
+   * Service Interface for the Google Marketing Platform Admin API.
+   * 
+ */ + public abstract static class MarketingplatformAdminServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return MarketingplatformAdminServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service MarketingplatformAdminService. + * + *
+   * Service Interface for the Google Marketing Platform Admin API.
+   * 
+ */ + public static final class MarketingplatformAdminServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private MarketingplatformAdminServiceStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected MarketingplatformAdminServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new MarketingplatformAdminServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Looks up a single organization.
+     * 
+ */ + public void getOrganization( + com.google.ads.marketingplatform.admin.v1alpha.GetOrganizationRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetOrganizationMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Returns a list of organizations that the user has access to.
+     * 
+ */ + public void listOrganizations( + com.google.ads.marketingplatform.admin.v1alpha.ListOrganizationsRequest request, + io.grpc.stub.StreamObserver< + com.google.ads.marketingplatform.admin.v1alpha.ListOrganizationsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListOrganizationsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Returns a list of clients managed by the sales partner organization.
+     * User needs to be an OrgAdmin/BillingAdmin on the sales partner organization
+     * in order to view the end clients.
+     * 
+ */ + public void findSalesPartnerManagedClients( + com.google.ads.marketingplatform.admin.v1alpha.FindSalesPartnerManagedClientsRequest + request, + io.grpc.stub.StreamObserver< + com.google.ads.marketingplatform.admin.v1alpha + .FindSalesPartnerManagedClientsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getFindSalesPartnerManagedClientsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists the Google Analytics accounts link to the specified Google Marketing
+     * Platform organization.
+     * 
+ */ + public void listAnalyticsAccountLinks( + com.google.ads.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest request, + io.grpc.stub.StreamObserver< + com.google.ads.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListAnalyticsAccountLinksMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates the link between the Analytics account and the Google Marketing
+     * Platform organization.
+     * User needs to be an org user, and admin on the Analytics account to create
+     * the link. If the account is already linked to an organization, user needs
+     * to unlink the account from the current organization, then try link again.
+     * 
+ */ + public void createAnalyticsAccountLink( + com.google.ads.marketingplatform.admin.v1alpha.CreateAnalyticsAccountLinkRequest request, + io.grpc.stub.StreamObserver< + com.google.ads.marketingplatform.admin.v1alpha.AnalyticsAccountLink> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateAnalyticsAccountLinkMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes the AnalyticsAccountLink, which detaches the Analytics account from
+     * the Google Marketing Platform organization.
+     * User needs to be an org user, and admin on the Analytics account in order
+     * to delete the link.
+     * 
+ */ + public void deleteAnalyticsAccountLink( + com.google.ads.marketingplatform.admin.v1alpha.DeleteAnalyticsAccountLinkRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteAnalyticsAccountLinkMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the service level for an Analytics property.
+     * 
+ */ + public void setPropertyServiceLevel( + com.google.ads.marketingplatform.admin.v1alpha.SetPropertyServiceLevelRequest request, + io.grpc.stub.StreamObserver< + com.google.ads.marketingplatform.admin.v1alpha.SetPropertyServiceLevelResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getSetPropertyServiceLevelMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets the usage and billing data for properties within the organization for
+     * the specified month.
+     * Per direct client org, user needs to be OrgAdmin/BillingAdmin on the
+     * organization in order to view the billing and usage data.
+     * Per sales partner client org, user needs to be OrgAdmin/BillingAdmin on
+     * the sales partner org in order to view the billing and usage data, or
+     * OrgAdmin/BillingAdmin on the sales partner client org in order to view the
+     * usage data only.
+     * 
+ */ + public void reportPropertyUsage( + com.google.ads.marketingplatform.admin.v1alpha.ReportPropertyUsageRequest request, + io.grpc.stub.StreamObserver< + com.google.ads.marketingplatform.admin.v1alpha.ReportPropertyUsageResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getReportPropertyUsageMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Looks up a single user group.
+     * 
+ */ + public void getUserGroup( + com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetUserGroupMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Returns a list of user groups in the specified GMP organization.
+     * 
+ */ + public void listUserGroups( + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsRequest request, + io.grpc.stub.StreamObserver< + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListUserGroupsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a user group in the specified GMP organization.
+     * 
+ */ + public void createUserGroup( + com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateUserGroupMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates a user group in the specified GMP organization.
+     * 
+ */ + public void updateUserGroup( + com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateUserGroupMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a user group in the specified GMP organization.
+     * 
+ */ + public void deleteUserGroup( + com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteUserGroupMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Looks up a single user group member.
+     * 
+ */ + public void getUserGroupMember( + com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupMemberRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetUserGroupMemberMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Returns a list of members in the specified user group.
+     * 
+ */ + public void listUserGroupMembers( + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersRequest request, + io.grpc.stub.StreamObserver< + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListUserGroupMembersMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Adds a member to the specified GMP user group.
+     * 
+ */ + public void createUserGroupMember( + com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupMemberRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateUserGroupMemberMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates a member in the specified GMP user group.
+     * 
+ */ + public void updateUserGroupMember( + com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupMemberRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateUserGroupMemberMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a member in the specified GMP user group.
+     * 
+ */ + public void deleteUserGroupMember( + com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupMemberRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteUserGroupMemberMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Looks up a single admin access binding.
+     * 
+ */ + public void getAdminAccessBinding( + com.google.ads.marketingplatform.admin.v1alpha.GetAdminAccessBindingRequest request, + io.grpc.stub.StreamObserver< + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetAdminAccessBindingMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Returns a list of admin access bindings in the specified GMP organization.
+     * 
+ */ + public void listAdminAccessBindings( + com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsRequest request, + io.grpc.stub.StreamObserver< + com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListAdminAccessBindingsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates an admin access binding in the specified GMP organization.
+     * 
+ */ + public void createAdminAccessBinding( + com.google.ads.marketingplatform.admin.v1alpha.CreateAdminAccessBindingRequest request, + io.grpc.stub.StreamObserver< + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateAdminAccessBindingMethod(), getCallOptions()), + request, + responseObserver); + } - /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ - public static MarketingplatformAdminServiceFutureStub newFutureStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public MarketingplatformAdminServiceFutureStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new MarketingplatformAdminServiceFutureStub(channel, callOptions); - } - }; - return MarketingplatformAdminServiceFutureStub.newStub(factory, channel); + /** + * + * + *
+     * Updates an admin access binding in the specified GMP organization.
+     * 
+ */ + public void updateAdminAccessBinding( + com.google.ads.marketingplatform.admin.v1alpha.UpdateAdminAccessBindingRequest request, + io.grpc.stub.StreamObserver< + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateAdminAccessBindingMethod(), getCallOptions()), + request, + responseObserver); + } } /** - * + * A stub to allow clients to do synchronous rpc calls to service MarketingplatformAdminService. * *
    * Service Interface for the Google Marketing Platform Admin API.
    * 
*/ - public interface AsyncService { + public static final class MarketingplatformAdminServiceBlockingV2Stub + extends io.grpc.stub.AbstractBlockingStub { + private MarketingplatformAdminServiceBlockingV2Stub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected MarketingplatformAdminServiceBlockingV2Stub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new MarketingplatformAdminServiceBlockingV2Stub(channel, callOptions); + } /** * * *
-     * Lookup for a single organization.
+     * Looks up a single organization.
      * 
*/ - default void getOrganization( - com.google.ads.marketingplatform.admin.v1alpha.GetOrganizationRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getGetOrganizationMethod(), responseObserver); + public com.google.ads.marketingplatform.admin.v1alpha.Organization getOrganization( + com.google.ads.marketingplatform.admin.v1alpha.GetOrganizationRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetOrganizationMethod(), getCallOptions(), request); } /** @@ -557,13 +2111,12 @@ default void getOrganization( * Returns a list of organizations that the user has access to. *
*/ - default void listOrganizations( - com.google.ads.marketingplatform.admin.v1alpha.ListOrganizationsRequest request, - io.grpc.stub.StreamObserver< - com.google.ads.marketingplatform.admin.v1alpha.ListOrganizationsResponse> - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getListOrganizationsMethod(), responseObserver); + public com.google.ads.marketingplatform.admin.v1alpha.ListOrganizationsResponse + listOrganizations( + com.google.ads.marketingplatform.admin.v1alpha.ListOrganizationsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListOrganizationsMethod(), getCallOptions(), request); } /** @@ -575,15 +2128,13 @@ default void listOrganizations( * in order to view the end clients. *
*/ - default void findSalesPartnerManagedClients( - com.google.ads.marketingplatform.admin.v1alpha.FindSalesPartnerManagedClientsRequest - request, - io.grpc.stub.StreamObserver< - com.google.ads.marketingplatform.admin.v1alpha - .FindSalesPartnerManagedClientsResponse> - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getFindSalesPartnerManagedClientsMethod(), responseObserver); + public com.google.ads.marketingplatform.admin.v1alpha.FindSalesPartnerManagedClientsResponse + findSalesPartnerManagedClients( + com.google.ads.marketingplatform.admin.v1alpha.FindSalesPartnerManagedClientsRequest + request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getFindSalesPartnerManagedClientsMethod(), getCallOptions(), request); } /** @@ -594,13 +2145,12 @@ default void findSalesPartnerManagedClients( * Platform organization. *
*/ - default void listAnalyticsAccountLinks( - com.google.ads.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest request, - io.grpc.stub.StreamObserver< - com.google.ads.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksResponse> - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getListAnalyticsAccountLinksMethod(), responseObserver); + public com.google.ads.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksResponse + listAnalyticsAccountLinks( + com.google.ads.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListAnalyticsAccountLinksMethod(), getCallOptions(), request); } /** @@ -614,13 +2164,13 @@ default void listAnalyticsAccountLinks( * to unlink the account from the current organization, then try link again. *
*/ - default void createAnalyticsAccountLink( - com.google.ads.marketingplatform.admin.v1alpha.CreateAnalyticsAccountLinkRequest request, - io.grpc.stub.StreamObserver< - com.google.ads.marketingplatform.admin.v1alpha.AnalyticsAccountLink> - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getCreateAnalyticsAccountLinkMethod(), responseObserver); + public com.google.ads.marketingplatform.admin.v1alpha.AnalyticsAccountLink + createAnalyticsAccountLink( + com.google.ads.marketingplatform.admin.v1alpha.CreateAnalyticsAccountLinkRequest + request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCreateAnalyticsAccountLinkMethod(), getCallOptions(), request); } /** @@ -633,11 +2183,11 @@ default void createAnalyticsAccountLink( * to delete the link. *
*/ - default void deleteAnalyticsAccountLink( - com.google.ads.marketingplatform.admin.v1alpha.DeleteAnalyticsAccountLinkRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getDeleteAnalyticsAccountLinkMethod(), responseObserver); + public com.google.protobuf.Empty deleteAnalyticsAccountLink( + com.google.ads.marketingplatform.admin.v1alpha.DeleteAnalyticsAccountLinkRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDeleteAnalyticsAccountLinkMethod(), getCallOptions(), request); } /** @@ -647,20 +2197,19 @@ default void deleteAnalyticsAccountLink( * Updates the service level for an Analytics property. *
*/ - default void setPropertyServiceLevel( - com.google.ads.marketingplatform.admin.v1alpha.SetPropertyServiceLevelRequest request, - io.grpc.stub.StreamObserver< - com.google.ads.marketingplatform.admin.v1alpha.SetPropertyServiceLevelResponse> - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getSetPropertyServiceLevelMethod(), responseObserver); + public com.google.ads.marketingplatform.admin.v1alpha.SetPropertyServiceLevelResponse + setPropertyServiceLevel( + com.google.ads.marketingplatform.admin.v1alpha.SetPropertyServiceLevelRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getSetPropertyServiceLevelMethod(), getCallOptions(), request); } /** * * *
-     * Get the usage and billing data for properties within the organization for
+     * Gets the usage and billing data for properties within the organization for
      * the specified month.
      * Per direct client org, user needs to be OrgAdmin/BillingAdmin on the
      * organization in order to view the billing and usage data.
@@ -670,244 +2219,246 @@ default void setPropertyServiceLevel(
      * usage data only.
      * 
*/ - default void reportPropertyUsage( - com.google.ads.marketingplatform.admin.v1alpha.ReportPropertyUsageRequest request, - io.grpc.stub.StreamObserver< - com.google.ads.marketingplatform.admin.v1alpha.ReportPropertyUsageResponse> - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getReportPropertyUsageMethod(), responseObserver); + public com.google.ads.marketingplatform.admin.v1alpha.ReportPropertyUsageResponse + reportPropertyUsage( + com.google.ads.marketingplatform.admin.v1alpha.ReportPropertyUsageRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getReportPropertyUsageMethod(), getCallOptions(), request); } - } - /** - * Base class for the server implementation of the service MarketingplatformAdminService. - * - *
-   * Service Interface for the Google Marketing Platform Admin API.
-   * 
- */ - public abstract static class MarketingplatformAdminServiceImplBase - implements io.grpc.BindableService, AsyncService { + /** + * + * + *
+     * Looks up a single user group.
+     * 
+ */ + public com.google.ads.marketingplatform.admin.v1alpha.UserGroup getUserGroup( + com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetUserGroupMethod(), getCallOptions(), request); + } - @java.lang.Override - public final io.grpc.ServerServiceDefinition bindService() { - return MarketingplatformAdminServiceGrpc.bindService(this); + /** + * + * + *
+     * Returns a list of user groups in the specified GMP organization.
+     * 
+ */ + public com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsResponse listUserGroups( + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListUserGroupsMethod(), getCallOptions(), request); } - } - /** - * A stub to allow clients to do asynchronous rpc calls to service MarketingplatformAdminService. - * - *
-   * Service Interface for the Google Marketing Platform Admin API.
-   * 
- */ - public static final class MarketingplatformAdminServiceStub - extends io.grpc.stub.AbstractAsyncStub { - private MarketingplatformAdminServiceStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); + /** + * + * + *
+     * Creates a user group in the specified GMP organization.
+     * 
+ */ + public com.google.ads.marketingplatform.admin.v1alpha.UserGroup createUserGroup( + com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCreateUserGroupMethod(), getCallOptions(), request); } - @java.lang.Override - protected MarketingplatformAdminServiceStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new MarketingplatformAdminServiceStub(channel, callOptions); + /** + * + * + *
+     * Updates a user group in the specified GMP organization.
+     * 
+ */ + public com.google.ads.marketingplatform.admin.v1alpha.UserGroup updateUserGroup( + com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getUpdateUserGroupMethod(), getCallOptions(), request); } /** * * *
-     * Lookup for a single organization.
+     * Deletes a user group in the specified GMP organization.
      * 
*/ - public void getOrganization( - com.google.ads.marketingplatform.admin.v1alpha.GetOrganizationRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetOrganizationMethod(), getCallOptions()), - request, - responseObserver); + public com.google.protobuf.Empty deleteUserGroup( + com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDeleteUserGroupMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Looks up a single user group member.
+     * 
+ */ + public com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember getUserGroupMember( + com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupMemberRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetUserGroupMemberMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Returns a list of members in the specified user group.
+     * 
+ */ + public com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersResponse + listUserGroupMembers( + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListUserGroupMembersMethod(), getCallOptions(), request); } /** * * *
-     * Returns a list of organizations that the user has access to.
+     * Adds a member to the specified GMP user group.
      * 
*/ - public void listOrganizations( - com.google.ads.marketingplatform.admin.v1alpha.ListOrganizationsRequest request, - io.grpc.stub.StreamObserver< - com.google.ads.marketingplatform.admin.v1alpha.ListOrganizationsResponse> - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListOrganizationsMethod(), getCallOptions()), - request, - responseObserver); + public com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember createUserGroupMember( + com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupMemberRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCreateUserGroupMemberMethod(), getCallOptions(), request); } /** * * *
-     * Returns a list of clients managed by the sales partner organization.
-     * User needs to be an OrgAdmin/BillingAdmin on the sales partner organization
-     * in order to view the end clients.
+     * Updates a member in the specified GMP user group.
      * 
*/ - public void findSalesPartnerManagedClients( - com.google.ads.marketingplatform.admin.v1alpha.FindSalesPartnerManagedClientsRequest - request, - io.grpc.stub.StreamObserver< - com.google.ads.marketingplatform.admin.v1alpha - .FindSalesPartnerManagedClientsResponse> - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getFindSalesPartnerManagedClientsMethod(), getCallOptions()), - request, - responseObserver); + public com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember updateUserGroupMember( + com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupMemberRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getUpdateUserGroupMemberMethod(), getCallOptions(), request); } /** * * *
-     * Lists the Google Analytics accounts link to the specified Google Marketing
-     * Platform organization.
+     * Deletes a member in the specified GMP user group.
      * 
*/ - public void listAnalyticsAccountLinks( - com.google.ads.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest request, - io.grpc.stub.StreamObserver< - com.google.ads.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksResponse> - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListAnalyticsAccountLinksMethod(), getCallOptions()), - request, - responseObserver); + public com.google.protobuf.Empty deleteUserGroupMember( + com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupMemberRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDeleteUserGroupMemberMethod(), getCallOptions(), request); } /** * * *
-     * Creates the link between the Analytics account and the Google Marketing
-     * Platform organization.
-     * User needs to be an org user, and admin on the Analytics account to create
-     * the link. If the account is already linked to an organization, user needs
-     * to unlink the account from the current organization, then try link again.
+     * Looks up a single admin access binding.
      * 
*/ - public void createAnalyticsAccountLink( - com.google.ads.marketingplatform.admin.v1alpha.CreateAnalyticsAccountLinkRequest request, - io.grpc.stub.StreamObserver< - com.google.ads.marketingplatform.admin.v1alpha.AnalyticsAccountLink> - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateAnalyticsAccountLinkMethod(), getCallOptions()), - request, - responseObserver); + public com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding getAdminAccessBinding( + com.google.ads.marketingplatform.admin.v1alpha.GetAdminAccessBindingRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetAdminAccessBindingMethod(), getCallOptions(), request); } /** * * *
-     * Deletes the AnalyticsAccountLink, which detaches the Analytics account from
-     * the Google Marketing Platform organization.
-     * User needs to be an org user, and admin on the Analytics account in order
-     * to delete the link.
+     * Returns a list of admin access bindings in the specified GMP organization.
      * 
*/ - public void deleteAnalyticsAccountLink( - com.google.ads.marketingplatform.admin.v1alpha.DeleteAnalyticsAccountLinkRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteAnalyticsAccountLinkMethod(), getCallOptions()), - request, - responseObserver); + public com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsResponse + listAdminAccessBindings( + com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListAdminAccessBindingsMethod(), getCallOptions(), request); } /** * * *
-     * Updates the service level for an Analytics property.
+     * Creates an admin access binding in the specified GMP organization.
      * 
*/ - public void setPropertyServiceLevel( - com.google.ads.marketingplatform.admin.v1alpha.SetPropertyServiceLevelRequest request, - io.grpc.stub.StreamObserver< - com.google.ads.marketingplatform.admin.v1alpha.SetPropertyServiceLevelResponse> - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getSetPropertyServiceLevelMethod(), getCallOptions()), - request, - responseObserver); + public com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding + createAdminAccessBinding( + com.google.ads.marketingplatform.admin.v1alpha.CreateAdminAccessBindingRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCreateAdminAccessBindingMethod(), getCallOptions(), request); } /** * * *
-     * Get the usage and billing data for properties within the organization for
-     * the specified month.
-     * Per direct client org, user needs to be OrgAdmin/BillingAdmin on the
-     * organization in order to view the billing and usage data.
-     * Per sales partner client org, user needs to be OrgAdmin/BillingAdmin on
-     * the sales partner org in order to view the billing and usage data, or
-     * OrgAdmin/BillingAdmin on the sales partner client org in order to view the
-     * usage data only.
+     * Updates an admin access binding in the specified GMP organization.
      * 
*/ - public void reportPropertyUsage( - com.google.ads.marketingplatform.admin.v1alpha.ReportPropertyUsageRequest request, - io.grpc.stub.StreamObserver< - com.google.ads.marketingplatform.admin.v1alpha.ReportPropertyUsageResponse> - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getReportPropertyUsageMethod(), getCallOptions()), - request, - responseObserver); + public com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding + updateAdminAccessBinding( + com.google.ads.marketingplatform.admin.v1alpha.UpdateAdminAccessBindingRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getUpdateAdminAccessBindingMethod(), getCallOptions(), request); } } /** - * A stub to allow clients to do synchronous rpc calls to service MarketingplatformAdminService. + * A stub to allow clients to do limited synchronous rpc calls to service + * MarketingplatformAdminService. * *
    * Service Interface for the Google Marketing Platform Admin API.
    * 
*/ - public static final class MarketingplatformAdminServiceBlockingV2Stub - extends io.grpc.stub.AbstractBlockingStub { - private MarketingplatformAdminServiceBlockingV2Stub( + public static final class MarketingplatformAdminServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private MarketingplatformAdminServiceBlockingStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override - protected MarketingplatformAdminServiceBlockingV2Stub build( + protected MarketingplatformAdminServiceBlockingStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new MarketingplatformAdminServiceBlockingV2Stub(channel, callOptions); + return new MarketingplatformAdminServiceBlockingStub(channel, callOptions); } /** * * *
-     * Lookup for a single organization.
+     * Looks up a single organization.
      * 
*/ public com.google.ads.marketingplatform.admin.v1alpha.Organization getOrganization( - com.google.ads.marketingplatform.admin.v1alpha.GetOrganizationRequest request) - throws io.grpc.StatusException { - return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + com.google.ads.marketingplatform.admin.v1alpha.GetOrganizationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getGetOrganizationMethod(), getCallOptions(), request); } @@ -920,9 +2471,8 @@ public com.google.ads.marketingplatform.admin.v1alpha.Organization getOrganizati */ public com.google.ads.marketingplatform.admin.v1alpha.ListOrganizationsResponse listOrganizations( - com.google.ads.marketingplatform.admin.v1alpha.ListOrganizationsRequest request) - throws io.grpc.StatusException { - return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + com.google.ads.marketingplatform.admin.v1alpha.ListOrganizationsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getListOrganizationsMethod(), getCallOptions(), request); } @@ -938,9 +2488,8 @@ public com.google.ads.marketingplatform.admin.v1alpha.Organization getOrganizati public com.google.ads.marketingplatform.admin.v1alpha.FindSalesPartnerManagedClientsResponse findSalesPartnerManagedClients( com.google.ads.marketingplatform.admin.v1alpha.FindSalesPartnerManagedClientsRequest - request) - throws io.grpc.StatusException { - return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getFindSalesPartnerManagedClientsMethod(), getCallOptions(), request); } @@ -954,9 +2503,9 @@ public com.google.ads.marketingplatform.admin.v1alpha.Organization getOrganizati */ public com.google.ads.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksResponse listAnalyticsAccountLinks( - com.google.ads.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest request) - throws io.grpc.StatusException { - return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + com.google.ads.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest + request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getListAnalyticsAccountLinksMethod(), getCallOptions(), request); } @@ -974,9 +2523,8 @@ public com.google.ads.marketingplatform.admin.v1alpha.Organization getOrganizati public com.google.ads.marketingplatform.admin.v1alpha.AnalyticsAccountLink createAnalyticsAccountLink( com.google.ads.marketingplatform.admin.v1alpha.CreateAnalyticsAccountLinkRequest - request) - throws io.grpc.StatusException { - return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getCreateAnalyticsAccountLinkMethod(), getCallOptions(), request); } @@ -991,9 +2539,8 @@ public com.google.ads.marketingplatform.admin.v1alpha.Organization getOrganizati *
*/ public com.google.protobuf.Empty deleteAnalyticsAccountLink( - com.google.ads.marketingplatform.admin.v1alpha.DeleteAnalyticsAccountLinkRequest request) - throws io.grpc.StatusException { - return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + com.google.ads.marketingplatform.admin.v1alpha.DeleteAnalyticsAccountLinkRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getDeleteAnalyticsAccountLinkMethod(), getCallOptions(), request); } @@ -1006,9 +2553,8 @@ public com.google.protobuf.Empty deleteAnalyticsAccountLink( */ public com.google.ads.marketingplatform.admin.v1alpha.SetPropertyServiceLevelResponse setPropertyServiceLevel( - com.google.ads.marketingplatform.admin.v1alpha.SetPropertyServiceLevelRequest request) - throws io.grpc.StatusException { - return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + com.google.ads.marketingplatform.admin.v1alpha.SetPropertyServiceLevelRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getSetPropertyServiceLevelMethod(), getCallOptions(), request); } @@ -1016,7 +2562,7 @@ public com.google.protobuf.Empty deleteAnalyticsAccountLink( * * *
-     * Get the usage and billing data for properties within the organization for
+     * Gets the usage and billing data for properties within the organization for
      * the specified month.
      * Per direct client org, user needs to be OrgAdmin/BillingAdmin on the
      * organization in order to view the billing and usage data.
@@ -1028,162 +2574,197 @@ public com.google.protobuf.Empty deleteAnalyticsAccountLink(
      */
     public com.google.ads.marketingplatform.admin.v1alpha.ReportPropertyUsageResponse
         reportPropertyUsage(
-            com.google.ads.marketingplatform.admin.v1alpha.ReportPropertyUsageRequest request)
-            throws io.grpc.StatusException {
-      return io.grpc.stub.ClientCalls.blockingV2UnaryCall(
+            com.google.ads.marketingplatform.admin.v1alpha.ReportPropertyUsageRequest request) {
+      return io.grpc.stub.ClientCalls.blockingUnaryCall(
           getChannel(), getReportPropertyUsageMethod(), getCallOptions(), request);
     }
-  }
 
-  /**
-   * A stub to allow clients to do limited synchronous rpc calls to service
-   * MarketingplatformAdminService.
-   *
-   * 
-   * Service Interface for the Google Marketing Platform Admin API.
-   * 
- */ - public static final class MarketingplatformAdminServiceBlockingStub - extends io.grpc.stub.AbstractBlockingStub { - private MarketingplatformAdminServiceBlockingStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); + /** + * + * + *
+     * Looks up a single user group.
+     * 
+ */ + public com.google.ads.marketingplatform.admin.v1alpha.UserGroup getUserGroup( + com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetUserGroupMethod(), getCallOptions(), request); } - @java.lang.Override - protected MarketingplatformAdminServiceBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new MarketingplatformAdminServiceBlockingStub(channel, callOptions); + /** + * + * + *
+     * Returns a list of user groups in the specified GMP organization.
+     * 
+ */ + public com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsResponse listUserGroups( + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListUserGroupsMethod(), getCallOptions(), request); } /** * * *
-     * Lookup for a single organization.
+     * Creates a user group in the specified GMP organization.
      * 
*/ - public com.google.ads.marketingplatform.admin.v1alpha.Organization getOrganization( - com.google.ads.marketingplatform.admin.v1alpha.GetOrganizationRequest request) { + public com.google.ads.marketingplatform.admin.v1alpha.UserGroup createUserGroup( + com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetOrganizationMethod(), getCallOptions(), request); + getChannel(), getCreateUserGroupMethod(), getCallOptions(), request); } /** * * *
-     * Returns a list of organizations that the user has access to.
+     * Updates a user group in the specified GMP organization.
      * 
*/ - public com.google.ads.marketingplatform.admin.v1alpha.ListOrganizationsResponse - listOrganizations( - com.google.ads.marketingplatform.admin.v1alpha.ListOrganizationsRequest request) { + public com.google.ads.marketingplatform.admin.v1alpha.UserGroup updateUserGroup( + com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListOrganizationsMethod(), getCallOptions(), request); + getChannel(), getUpdateUserGroupMethod(), getCallOptions(), request); } /** * * *
-     * Returns a list of clients managed by the sales partner organization.
-     * User needs to be an OrgAdmin/BillingAdmin on the sales partner organization
-     * in order to view the end clients.
+     * Deletes a user group in the specified GMP organization.
      * 
*/ - public com.google.ads.marketingplatform.admin.v1alpha.FindSalesPartnerManagedClientsResponse - findSalesPartnerManagedClients( - com.google.ads.marketingplatform.admin.v1alpha.FindSalesPartnerManagedClientsRequest - request) { + public com.google.protobuf.Empty deleteUserGroup( + com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getFindSalesPartnerManagedClientsMethod(), getCallOptions(), request); + getChannel(), getDeleteUserGroupMethod(), getCallOptions(), request); } /** * * *
-     * Lists the Google Analytics accounts link to the specified Google Marketing
-     * Platform organization.
+     * Looks up a single user group member.
      * 
*/ - public com.google.ads.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksResponse - listAnalyticsAccountLinks( - com.google.ads.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest - request) { + public com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember getUserGroupMember( + com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupMemberRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListAnalyticsAccountLinksMethod(), getCallOptions(), request); + getChannel(), getGetUserGroupMemberMethod(), getCallOptions(), request); } /** * * *
-     * Creates the link between the Analytics account and the Google Marketing
-     * Platform organization.
-     * User needs to be an org user, and admin on the Analytics account to create
-     * the link. If the account is already linked to an organization, user needs
-     * to unlink the account from the current organization, then try link again.
+     * Returns a list of members in the specified user group.
      * 
*/ - public com.google.ads.marketingplatform.admin.v1alpha.AnalyticsAccountLink - createAnalyticsAccountLink( - com.google.ads.marketingplatform.admin.v1alpha.CreateAnalyticsAccountLinkRequest - request) { + public com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersResponse + listUserGroupMembers( + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListUserGroupMembersMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Adds a member to the specified GMP user group.
+     * 
+ */ + public com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember createUserGroupMember( + com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupMemberRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateUserGroupMemberMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates a member in the specified GMP user group.
+     * 
+ */ + public com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember updateUserGroupMember( + com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupMemberRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateUserGroupMemberMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a member in the specified GMP user group.
+     * 
+ */ + public com.google.protobuf.Empty deleteUserGroupMember( + com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupMemberRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteUserGroupMemberMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Looks up a single admin access binding.
+     * 
+ */ + public com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding getAdminAccessBinding( + com.google.ads.marketingplatform.admin.v1alpha.GetAdminAccessBindingRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateAnalyticsAccountLinkMethod(), getCallOptions(), request); + getChannel(), getGetAdminAccessBindingMethod(), getCallOptions(), request); } /** * * *
-     * Deletes the AnalyticsAccountLink, which detaches the Analytics account from
-     * the Google Marketing Platform organization.
-     * User needs to be an org user, and admin on the Analytics account in order
-     * to delete the link.
+     * Returns a list of admin access bindings in the specified GMP organization.
      * 
*/ - public com.google.protobuf.Empty deleteAnalyticsAccountLink( - com.google.ads.marketingplatform.admin.v1alpha.DeleteAnalyticsAccountLinkRequest request) { + public com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsResponse + listAdminAccessBindings( + com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteAnalyticsAccountLinkMethod(), getCallOptions(), request); + getChannel(), getListAdminAccessBindingsMethod(), getCallOptions(), request); } /** * * *
-     * Updates the service level for an Analytics property.
+     * Creates an admin access binding in the specified GMP organization.
      * 
*/ - public com.google.ads.marketingplatform.admin.v1alpha.SetPropertyServiceLevelResponse - setPropertyServiceLevel( - com.google.ads.marketingplatform.admin.v1alpha.SetPropertyServiceLevelRequest request) { + public com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding + createAdminAccessBinding( + com.google.ads.marketingplatform.admin.v1alpha.CreateAdminAccessBindingRequest + request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getSetPropertyServiceLevelMethod(), getCallOptions(), request); + getChannel(), getCreateAdminAccessBindingMethod(), getCallOptions(), request); } /** * * *
-     * Get the usage and billing data for properties within the organization for
-     * the specified month.
-     * Per direct client org, user needs to be OrgAdmin/BillingAdmin on the
-     * organization in order to view the billing and usage data.
-     * Per sales partner client org, user needs to be OrgAdmin/BillingAdmin on
-     * the sales partner org in order to view the billing and usage data, or
-     * OrgAdmin/BillingAdmin on the sales partner client org in order to view the
-     * usage data only.
+     * Updates an admin access binding in the specified GMP organization.
      * 
*/ - public com.google.ads.marketingplatform.admin.v1alpha.ReportPropertyUsageResponse - reportPropertyUsage( - com.google.ads.marketingplatform.admin.v1alpha.ReportPropertyUsageRequest request) { + public com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding + updateAdminAccessBinding( + com.google.ads.marketingplatform.admin.v1alpha.UpdateAdminAccessBindingRequest + request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getReportPropertyUsageMethod(), getCallOptions(), request); + getChannel(), getUpdateAdminAccessBindingMethod(), getCallOptions(), request); } } @@ -1212,7 +2793,7 @@ protected MarketingplatformAdminServiceFutureStub build( * * *
-     * Lookup for a single organization.
+     * Looks up a single organization.
      * 
*/ public com.google.common.util.concurrent.ListenableFuture< @@ -1331,7 +2912,7 @@ protected MarketingplatformAdminServiceFutureStub build( * * *
-     * Get the usage and billing data for properties within the organization for
+     * Gets the usage and billing data for properties within the organization for
      * the specified month.
      * Per direct client org, user needs to be OrgAdmin/BillingAdmin on the
      * organization in order to view the billing and usage data.
@@ -1348,6 +2929,215 @@ protected MarketingplatformAdminServiceFutureStub build(
       return io.grpc.stub.ClientCalls.futureUnaryCall(
           getChannel().newCall(getReportPropertyUsageMethod(), getCallOptions()), request);
     }
+
+    /**
+     *
+     *
+     * 
+     * Looks up a single user group.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.ads.marketingplatform.admin.v1alpha.UserGroup> + getUserGroup(com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetUserGroupMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Returns a list of user groups in the specified GMP organization.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsResponse> + listUserGroups( + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListUserGroupsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a user group in the specified GMP organization.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.ads.marketingplatform.admin.v1alpha.UserGroup> + createUserGroup( + com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateUserGroupMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates a user group in the specified GMP organization.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.ads.marketingplatform.admin.v1alpha.UserGroup> + updateUserGroup( + com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateUserGroupMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a user group in the specified GMP organization.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteUserGroup( + com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteUserGroupMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Looks up a single user group member.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember> + getUserGroupMember( + com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupMemberRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetUserGroupMemberMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Returns a list of members in the specified user group.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersResponse> + listUserGroupMembers( + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListUserGroupMembersMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Adds a member to the specified GMP user group.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember> + createUserGroupMember( + com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupMemberRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateUserGroupMemberMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates a member in the specified GMP user group.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember> + updateUserGroupMember( + com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupMemberRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateUserGroupMemberMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a member in the specified GMP user group.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteUserGroupMember( + com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupMemberRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteUserGroupMemberMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Looks up a single admin access binding.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding> + getAdminAccessBinding( + com.google.ads.marketingplatform.admin.v1alpha.GetAdminAccessBindingRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetAdminAccessBindingMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Returns a list of admin access bindings in the specified GMP organization.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsResponse> + listAdminAccessBindings( + com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListAdminAccessBindingsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates an admin access binding in the specified GMP organization.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding> + createAdminAccessBinding( + com.google.ads.marketingplatform.admin.v1alpha.CreateAdminAccessBindingRequest + request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateAdminAccessBindingMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates an admin access binding in the specified GMP organization.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding> + updateAdminAccessBinding( + com.google.ads.marketingplatform.admin.v1alpha.UpdateAdminAccessBindingRequest + request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateAdminAccessBindingMethod(), getCallOptions()), request); + } } private static final int METHODID_GET_ORGANIZATION = 0; @@ -1358,6 +3148,20 @@ protected MarketingplatformAdminServiceFutureStub build( private static final int METHODID_DELETE_ANALYTICS_ACCOUNT_LINK = 5; private static final int METHODID_SET_PROPERTY_SERVICE_LEVEL = 6; private static final int METHODID_REPORT_PROPERTY_USAGE = 7; + private static final int METHODID_GET_USER_GROUP = 8; + private static final int METHODID_LIST_USER_GROUPS = 9; + private static final int METHODID_CREATE_USER_GROUP = 10; + private static final int METHODID_UPDATE_USER_GROUP = 11; + private static final int METHODID_DELETE_USER_GROUP = 12; + private static final int METHODID_GET_USER_GROUP_MEMBER = 13; + private static final int METHODID_LIST_USER_GROUP_MEMBERS = 14; + private static final int METHODID_CREATE_USER_GROUP_MEMBER = 15; + private static final int METHODID_UPDATE_USER_GROUP_MEMBER = 16; + private static final int METHODID_DELETE_USER_GROUP_MEMBER = 17; + private static final int METHODID_GET_ADMIN_ACCESS_BINDING = 18; + private static final int METHODID_LIST_ADMIN_ACCESS_BINDINGS = 19; + private static final int METHODID_CREATE_ADMIN_ACCESS_BINDING = 20; + private static final int METHODID_UPDATE_ADMIN_ACCESS_BINDING = 21; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -1438,6 +3242,104 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv com.google.ads.marketingplatform.admin.v1alpha.ReportPropertyUsageResponse>) responseObserver); break; + case METHODID_GET_USER_GROUP: + serviceImpl.getUserGroup( + (com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupRequest) request, + (io.grpc.stub.StreamObserver< + com.google.ads.marketingplatform.admin.v1alpha.UserGroup>) + responseObserver); + break; + case METHODID_LIST_USER_GROUPS: + serviceImpl.listUserGroups( + (com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsResponse>) + responseObserver); + break; + case METHODID_CREATE_USER_GROUP: + serviceImpl.createUserGroup( + (com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupRequest) request, + (io.grpc.stub.StreamObserver< + com.google.ads.marketingplatform.admin.v1alpha.UserGroup>) + responseObserver); + break; + case METHODID_UPDATE_USER_GROUP: + serviceImpl.updateUserGroup( + (com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupRequest) request, + (io.grpc.stub.StreamObserver< + com.google.ads.marketingplatform.admin.v1alpha.UserGroup>) + responseObserver); + break; + case METHODID_DELETE_USER_GROUP: + serviceImpl.deleteUserGroup( + (com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_USER_GROUP_MEMBER: + serviceImpl.getUserGroupMember( + (com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupMemberRequest) request, + (io.grpc.stub.StreamObserver< + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember>) + responseObserver); + break; + case METHODID_LIST_USER_GROUP_MEMBERS: + serviceImpl.listUserGroupMembers( + (com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersRequest) request, + (io.grpc.stub.StreamObserver< + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersResponse>) + responseObserver); + break; + case METHODID_CREATE_USER_GROUP_MEMBER: + serviceImpl.createUserGroupMember( + (com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupMemberRequest) request, + (io.grpc.stub.StreamObserver< + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember>) + responseObserver); + break; + case METHODID_UPDATE_USER_GROUP_MEMBER: + serviceImpl.updateUserGroupMember( + (com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupMemberRequest) request, + (io.grpc.stub.StreamObserver< + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember>) + responseObserver); + break; + case METHODID_DELETE_USER_GROUP_MEMBER: + serviceImpl.deleteUserGroupMember( + (com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupMemberRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_ADMIN_ACCESS_BINDING: + serviceImpl.getAdminAccessBinding( + (com.google.ads.marketingplatform.admin.v1alpha.GetAdminAccessBindingRequest) request, + (io.grpc.stub.StreamObserver< + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding>) + responseObserver); + break; + case METHODID_LIST_ADMIN_ACCESS_BINDINGS: + serviceImpl.listAdminAccessBindings( + (com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsRequest) + request, + (io.grpc.stub.StreamObserver< + com.google.ads.marketingplatform.admin.v1alpha + .ListAdminAccessBindingsResponse>) + responseObserver); + break; + case METHODID_CREATE_ADMIN_ACCESS_BINDING: + serviceImpl.createAdminAccessBinding( + (com.google.ads.marketingplatform.admin.v1alpha.CreateAdminAccessBindingRequest) + request, + (io.grpc.stub.StreamObserver< + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding>) + responseObserver); + break; + case METHODID_UPDATE_ADMIN_ACCESS_BINDING: + serviceImpl.updateAdminAccessBinding( + (com.google.ads.marketingplatform.admin.v1alpha.UpdateAdminAccessBindingRequest) + request, + (io.grpc.stub.StreamObserver< + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding>) + responseObserver); + break; default: throw new AssertionError(); } @@ -1516,6 +3418,102 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser com.google.ads.marketingplatform.admin.v1alpha.ReportPropertyUsageRequest, com.google.ads.marketingplatform.admin.v1alpha.ReportPropertyUsageResponse>( service, METHODID_REPORT_PROPERTY_USAGE))) + .addMethod( + getGetUserGroupMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupRequest, + com.google.ads.marketingplatform.admin.v1alpha.UserGroup>( + service, METHODID_GET_USER_GROUP))) + .addMethod( + getListUserGroupsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsRequest, + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsResponse>( + service, METHODID_LIST_USER_GROUPS))) + .addMethod( + getCreateUserGroupMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupRequest, + com.google.ads.marketingplatform.admin.v1alpha.UserGroup>( + service, METHODID_CREATE_USER_GROUP))) + .addMethod( + getUpdateUserGroupMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupRequest, + com.google.ads.marketingplatform.admin.v1alpha.UserGroup>( + service, METHODID_UPDATE_USER_GROUP))) + .addMethod( + getDeleteUserGroupMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupRequest, + com.google.protobuf.Empty>(service, METHODID_DELETE_USER_GROUP))) + .addMethod( + getGetUserGroupMemberMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupMemberRequest, + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember>( + service, METHODID_GET_USER_GROUP_MEMBER))) + .addMethod( + getListUserGroupMembersMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersRequest, + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersResponse>( + service, METHODID_LIST_USER_GROUP_MEMBERS))) + .addMethod( + getCreateUserGroupMemberMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupMemberRequest, + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember>( + service, METHODID_CREATE_USER_GROUP_MEMBER))) + .addMethod( + getUpdateUserGroupMemberMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupMemberRequest, + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember>( + service, METHODID_UPDATE_USER_GROUP_MEMBER))) + .addMethod( + getDeleteUserGroupMemberMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupMemberRequest, + com.google.protobuf.Empty>(service, METHODID_DELETE_USER_GROUP_MEMBER))) + .addMethod( + getGetAdminAccessBindingMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.ads.marketingplatform.admin.v1alpha.GetAdminAccessBindingRequest, + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding>( + service, METHODID_GET_ADMIN_ACCESS_BINDING))) + .addMethod( + getListAdminAccessBindingsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsRequest, + com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsResponse>( + service, METHODID_LIST_ADMIN_ACCESS_BINDINGS))) + .addMethod( + getCreateAdminAccessBindingMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.ads.marketingplatform.admin.v1alpha.CreateAdminAccessBindingRequest, + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding>( + service, METHODID_CREATE_ADMIN_ACCESS_BINDING))) + .addMethod( + getUpdateAdminAccessBindingMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.ads.marketingplatform.admin.v1alpha.UpdateAdminAccessBindingRequest, + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding>( + service, METHODID_UPDATE_ADMIN_ACCESS_BINDING))) .build(); } @@ -1577,6 +3575,20 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getDeleteAnalyticsAccountLinkMethod()) .addMethod(getSetPropertyServiceLevelMethod()) .addMethod(getReportPropertyUsageMethod()) + .addMethod(getGetUserGroupMethod()) + .addMethod(getListUserGroupsMethod()) + .addMethod(getCreateUserGroupMethod()) + .addMethod(getUpdateUserGroupMethod()) + .addMethod(getDeleteUserGroupMethod()) + .addMethod(getGetUserGroupMemberMethod()) + .addMethod(getListUserGroupMembersMethod()) + .addMethod(getCreateUserGroupMemberMethod()) + .addMethod(getUpdateUserGroupMemberMethod()) + .addMethod(getDeleteUserGroupMemberMethod()) + .addMethod(getGetAdminAccessBindingMethod()) + .addMethod(getListAdminAccessBindingsMethod()) + .addMethod(getCreateAdminAccessBindingMethod()) + .addMethod(getUpdateAdminAccessBindingMethod()) .build(); } } diff --git a/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/AdminAccessBinding.java b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/AdminAccessBinding.java new file mode 100644 index 000000000000..b24d936b920c --- /dev/null +++ b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/AdminAccessBinding.java @@ -0,0 +1,1729 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/marketingplatform/admin/v1alpha/resources.proto +// Protobuf Java Version: 4.33.6 + +package com.google.ads.marketingplatform.admin.v1alpha; + +/** + * + * + *
+ * A resource message representing a binding to a set of roles.
+ * 
+ * + * Protobuf type {@code google.marketingplatform.admin.v1alpha.AdminAccessBinding} + */ +@com.google.protobuf.Generated +public final class AdminAccessBinding extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.marketingplatform.admin.v1alpha.AdminAccessBinding) + AdminAccessBindingOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "AdminAccessBinding"); + } + + // Use AdminAccessBinding.newBuilder() to construct. + private AdminAccessBinding(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AdminAccessBinding() { + name_ = ""; + organizationRoles_ = emptyIntList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.ads.marketingplatform.admin.v1alpha.ResourcesProto + .internal_static_google_marketingplatform_admin_v1alpha_AdminAccessBinding_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.ads.marketingplatform.admin.v1alpha.ResourcesProto + .internal_static_google_marketingplatform_admin_v1alpha_AdminAccessBinding_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding.class, + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding.Builder.class); + } + + private int accessTargetCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object accessTarget_; + + public enum AccessTargetCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + USER_EMAIL(2), + USER_GROUP(3), + ACCESSTARGET_NOT_SET(0); + private final int value; + + private AccessTargetCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static AccessTargetCase valueOf(int value) { + return forNumber(value); + } + + public static AccessTargetCase forNumber(int value) { + switch (value) { + case 2: + return USER_EMAIL; + case 3: + return USER_GROUP; + case 0: + return ACCESSTARGET_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public AccessTargetCase getAccessTargetCase() { + return AccessTargetCase.forNumber(accessTargetCase_); + } + + public static final int USER_EMAIL_FIELD_NUMBER = 2; + + /** + * + * + *
+   * Email address of the user.
+   * 
+ * + * string user_email = 2; + * + * @return Whether the userEmail field is set. + */ + public boolean hasUserEmail() { + return accessTargetCase_ == 2; + } + + /** + * + * + *
+   * Email address of the user.
+   * 
+ * + * string user_email = 2; + * + * @return The userEmail. + */ + public java.lang.String getUserEmail() { + java.lang.Object ref = ""; + if (accessTargetCase_ == 2) { + ref = accessTarget_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (accessTargetCase_ == 2) { + accessTarget_ = s; + } + return s; + } + } + + /** + * + * + *
+   * Email address of the user.
+   * 
+ * + * string user_email = 2; + * + * @return The bytes for userEmail. + */ + public com.google.protobuf.ByteString getUserEmailBytes() { + java.lang.Object ref = ""; + if (accessTargetCase_ == 2) { + ref = accessTarget_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (accessTargetCase_ == 2) { + accessTarget_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_GROUP_FIELD_NUMBER = 3; + + /** + * + * + *
+   * Resource name of the user group.
+   * 
+ * + * string user_group = 3; + * + * @return Whether the userGroup field is set. + */ + public boolean hasUserGroup() { + return accessTargetCase_ == 3; + } + + /** + * + * + *
+   * Resource name of the user group.
+   * 
+ * + * string user_group = 3; + * + * @return The userGroup. + */ + public java.lang.String getUserGroup() { + java.lang.Object ref = ""; + if (accessTargetCase_ == 3) { + ref = accessTarget_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (accessTargetCase_ == 3) { + accessTarget_ = s; + } + return s; + } + } + + /** + * + * + *
+   * Resource name of the user group.
+   * 
+ * + * string user_group = 3; + * + * @return The bytes for userGroup. + */ + public com.google.protobuf.ByteString getUserGroupBytes() { + java.lang.Object ref = ""; + if (accessTargetCase_ == 3) { + ref = accessTarget_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (accessTargetCase_ == 3) { + accessTarget_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Identifier. The resource name of this AdminAccessBinding.
+   *
+   * Format:
+   * organizations/{org_id}/adminAccessBindings/{admin_access_binding_id}
+   * Example: "organizations/123abc/adminAccessBindings/456def"
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Identifier. The resource name of this AdminAccessBinding.
+   *
+   * Format:
+   * organizations/{org_id}/adminAccessBindings/{admin_access_binding_id}
+   * Example: "organizations/123abc/adminAccessBindings/456def"
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORGANIZATION_ROLES_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private com.google.protobuf.Internal.IntList organizationRoles_ = emptyIntList(); + + private static final com.google.protobuf.Internal.IntListAdapter.IntConverter< + com.google.ads.marketingplatform.admin.v1alpha.OrganizationRole> + organizationRoles_converter_ = + new com.google.protobuf.Internal.IntListAdapter.IntConverter< + com.google.ads.marketingplatform.admin.v1alpha.OrganizationRole>() { + public com.google.ads.marketingplatform.admin.v1alpha.OrganizationRole convert( + int from) { + com.google.ads.marketingplatform.admin.v1alpha.OrganizationRole result = + com.google.ads.marketingplatform.admin.v1alpha.OrganizationRole.forNumber(from); + return result == null + ? com.google.ads.marketingplatform.admin.v1alpha.OrganizationRole.UNRECOGNIZED + : result; + } + }; + + /** + * + * + *
+   * Optional. A list of roles granted to the parent organization.
+   *
+   * USER_ADMIN_ROLE and BILLING_ADMIN_ROLE will be automatically added if
+   * ORG_ADMIN_ROLE is assigned.
+   *
+   * No roles will be assigned if no roles are specified.
+   * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.OrganizationRole organization_roles = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the organizationRoles. + */ + @java.lang.Override + public java.util.List + getOrganizationRolesList() { + return new com.google.protobuf.Internal.IntListAdapter< + com.google.ads.marketingplatform.admin.v1alpha.OrganizationRole>( + organizationRoles_, organizationRoles_converter_); + } + + /** + * + * + *
+   * Optional. A list of roles granted to the parent organization.
+   *
+   * USER_ADMIN_ROLE and BILLING_ADMIN_ROLE will be automatically added if
+   * ORG_ADMIN_ROLE is assigned.
+   *
+   * No roles will be assigned if no roles are specified.
+   * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.OrganizationRole organization_roles = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of organizationRoles. + */ + @java.lang.Override + public int getOrganizationRolesCount() { + return organizationRoles_.size(); + } + + /** + * + * + *
+   * Optional. A list of roles granted to the parent organization.
+   *
+   * USER_ADMIN_ROLE and BILLING_ADMIN_ROLE will be automatically added if
+   * ORG_ADMIN_ROLE is assigned.
+   *
+   * No roles will be assigned if no roles are specified.
+   * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.OrganizationRole organization_roles = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The organizationRoles at the given index. + */ + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.OrganizationRole getOrganizationRoles( + int index) { + return organizationRoles_converter_.convert(organizationRoles_.getInt(index)); + } + + /** + * + * + *
+   * Optional. A list of roles granted to the parent organization.
+   *
+   * USER_ADMIN_ROLE and BILLING_ADMIN_ROLE will be automatically added if
+   * ORG_ADMIN_ROLE is assigned.
+   *
+   * No roles will be assigned if no roles are specified.
+   * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.OrganizationRole organization_roles = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the enum numeric values on the wire for organizationRoles. + */ + @java.lang.Override + public java.util.List getOrganizationRolesValueList() { + return organizationRoles_; + } + + /** + * + * + *
+   * Optional. A list of roles granted to the parent organization.
+   *
+   * USER_ADMIN_ROLE and BILLING_ADMIN_ROLE will be automatically added if
+   * ORG_ADMIN_ROLE is assigned.
+   *
+   * No roles will be assigned if no roles are specified.
+   * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.OrganizationRole organization_roles = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of organizationRoles at the given index. + */ + @java.lang.Override + public int getOrganizationRolesValue(int index) { + return organizationRoles_.getInt(index); + } + + private int organizationRolesMemoizedSerializedSize; + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getSerializedSize(); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (accessTargetCase_ == 2) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, accessTarget_); + } + if (accessTargetCase_ == 3) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, accessTarget_); + } + if (getOrganizationRolesList().size() > 0) { + output.writeUInt32NoTag(34); + output.writeUInt32NoTag(organizationRolesMemoizedSerializedSize); + } + for (int i = 0; i < organizationRoles_.size(); i++) { + output.writeEnumNoTag(organizationRoles_.getInt(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (accessTargetCase_ == 2) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, accessTarget_); + } + if (accessTargetCase_ == 3) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, accessTarget_); + } + { + int dataSize = 0; + for (int i = 0; i < organizationRoles_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag( + organizationRoles_.getInt(i)); + } + size += dataSize; + if (!getOrganizationRolesList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + organizationRolesMemoizedSerializedSize = dataSize; + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding)) { + return super.equals(obj); + } + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding other = + (com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding) obj; + + if (!getName().equals(other.getName())) return false; + if (!organizationRoles_.equals(other.organizationRoles_)) return false; + if (!getAccessTargetCase().equals(other.getAccessTargetCase())) return false; + switch (accessTargetCase_) { + case 2: + if (!getUserEmail().equals(other.getUserEmail())) return false; + break; + case 3: + if (!getUserGroup().equals(other.getUserGroup())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getOrganizationRolesCount() > 0) { + hash = (37 * hash) + ORGANIZATION_ROLES_FIELD_NUMBER; + hash = (53 * hash) + organizationRoles_.hashCode(); + } + switch (accessTargetCase_) { + case 2: + hash = (37 * hash) + USER_EMAIL_FIELD_NUMBER; + hash = (53 * hash) + getUserEmail().hashCode(); + break; + case 3: + hash = (37 * hash) + USER_GROUP_FIELD_NUMBER; + hash = (53 * hash) + getUserGroup().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A resource message representing a binding to a set of roles.
+   * 
+ * + * Protobuf type {@code google.marketingplatform.admin.v1alpha.AdminAccessBinding} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.marketingplatform.admin.v1alpha.AdminAccessBinding) + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBindingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.ads.marketingplatform.admin.v1alpha.ResourcesProto + .internal_static_google_marketingplatform_admin_v1alpha_AdminAccessBinding_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.ads.marketingplatform.admin.v1alpha.ResourcesProto + .internal_static_google_marketingplatform_admin_v1alpha_AdminAccessBinding_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding.class, + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding.Builder.class); + } + + // Construct using + // com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + organizationRoles_ = emptyIntList(); + accessTargetCase_ = 0; + accessTarget_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.ads.marketingplatform.admin.v1alpha.ResourcesProto + .internal_static_google_marketingplatform_admin_v1alpha_AdminAccessBinding_descriptor; + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding + getDefaultInstanceForType() { + return com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding.getDefaultInstance(); + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding build() { + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding buildPartial() { + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding result = + new com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + organizationRoles_.makeImmutable(); + result.organizationRoles_ = organizationRoles_; + } + } + + private void buildPartialOneofs( + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding result) { + result.accessTargetCase_ = accessTargetCase_; + result.accessTarget_ = this.accessTarget_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding) { + return mergeFrom((com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding other) { + if (other + == com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.organizationRoles_.isEmpty()) { + if (organizationRoles_.isEmpty()) { + organizationRoles_ = other.organizationRoles_; + organizationRoles_.makeImmutable(); + bitField0_ |= 0x00000008; + } else { + ensureOrganizationRolesIsMutable(); + organizationRoles_.addAll(other.organizationRoles_); + } + onChanged(); + } + switch (other.getAccessTargetCase()) { + case USER_EMAIL: + { + accessTargetCase_ = 2; + accessTarget_ = other.accessTarget_; + onChanged(); + break; + } + case USER_GROUP: + { + accessTargetCase_ = 3; + accessTarget_ = other.accessTarget_; + onChanged(); + break; + } + case ACCESSTARGET_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + accessTargetCase_ = 2; + accessTarget_ = s; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + accessTargetCase_ = 3; + accessTarget_ = s; + break; + } // case 26 + case 32: + { + int tmpRaw = input.readEnum(); + ensureOrganizationRolesIsMutable(); + organizationRoles_.addInt(tmpRaw); + break; + } // case 32 + case 34: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureOrganizationRolesIsMutable(); + while (input.getBytesUntilLimit() > 0) { + organizationRoles_.addInt(input.readEnum()); + } + input.popLimit(limit); + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int accessTargetCase_ = 0; + private java.lang.Object accessTarget_; + + public AccessTargetCase getAccessTargetCase() { + return AccessTargetCase.forNumber(accessTargetCase_); + } + + public Builder clearAccessTarget() { + accessTargetCase_ = 0; + accessTarget_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+     * Email address of the user.
+     * 
+ * + * string user_email = 2; + * + * @return Whether the userEmail field is set. + */ + @java.lang.Override + public boolean hasUserEmail() { + return accessTargetCase_ == 2; + } + + /** + * + * + *
+     * Email address of the user.
+     * 
+ * + * string user_email = 2; + * + * @return The userEmail. + */ + @java.lang.Override + public java.lang.String getUserEmail() { + java.lang.Object ref = ""; + if (accessTargetCase_ == 2) { + ref = accessTarget_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (accessTargetCase_ == 2) { + accessTarget_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Email address of the user.
+     * 
+ * + * string user_email = 2; + * + * @return The bytes for userEmail. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUserEmailBytes() { + java.lang.Object ref = ""; + if (accessTargetCase_ == 2) { + ref = accessTarget_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (accessTargetCase_ == 2) { + accessTarget_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Email address of the user.
+     * 
+ * + * string user_email = 2; + * + * @param value The userEmail to set. + * @return This builder for chaining. + */ + public Builder setUserEmail(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + accessTargetCase_ = 2; + accessTarget_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Email address of the user.
+     * 
+ * + * string user_email = 2; + * + * @return This builder for chaining. + */ + public Builder clearUserEmail() { + if (accessTargetCase_ == 2) { + accessTargetCase_ = 0; + accessTarget_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Email address of the user.
+     * 
+ * + * string user_email = 2; + * + * @param value The bytes for userEmail to set. + * @return This builder for chaining. + */ + public Builder setUserEmailBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + accessTargetCase_ = 2; + accessTarget_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Resource name of the user group.
+     * 
+ * + * string user_group = 3; + * + * @return Whether the userGroup field is set. + */ + @java.lang.Override + public boolean hasUserGroup() { + return accessTargetCase_ == 3; + } + + /** + * + * + *
+     * Resource name of the user group.
+     * 
+ * + * string user_group = 3; + * + * @return The userGroup. + */ + @java.lang.Override + public java.lang.String getUserGroup() { + java.lang.Object ref = ""; + if (accessTargetCase_ == 3) { + ref = accessTarget_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (accessTargetCase_ == 3) { + accessTarget_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Resource name of the user group.
+     * 
+ * + * string user_group = 3; + * + * @return The bytes for userGroup. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUserGroupBytes() { + java.lang.Object ref = ""; + if (accessTargetCase_ == 3) { + ref = accessTarget_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (accessTargetCase_ == 3) { + accessTarget_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Resource name of the user group.
+     * 
+ * + * string user_group = 3; + * + * @param value The userGroup to set. + * @return This builder for chaining. + */ + public Builder setUserGroup(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + accessTargetCase_ = 3; + accessTarget_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Resource name of the user group.
+     * 
+ * + * string user_group = 3; + * + * @return This builder for chaining. + */ + public Builder clearUserGroup() { + if (accessTargetCase_ == 3) { + accessTargetCase_ = 0; + accessTarget_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Resource name of the user group.
+     * 
+ * + * string user_group = 3; + * + * @param value The bytes for userGroup to set. + * @return This builder for chaining. + */ + public Builder setUserGroupBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + accessTargetCase_ = 3; + accessTarget_ = value; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Identifier. The resource name of this AdminAccessBinding.
+     *
+     * Format:
+     * organizations/{org_id}/adminAccessBindings/{admin_access_binding_id}
+     * Example: "organizations/123abc/adminAccessBindings/456def"
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Identifier. The resource name of this AdminAccessBinding.
+     *
+     * Format:
+     * organizations/{org_id}/adminAccessBindings/{admin_access_binding_id}
+     * Example: "organizations/123abc/adminAccessBindings/456def"
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Identifier. The resource name of this AdminAccessBinding.
+     *
+     * Format:
+     * organizations/{org_id}/adminAccessBindings/{admin_access_binding_id}
+     * Example: "organizations/123abc/adminAccessBindings/456def"
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. The resource name of this AdminAccessBinding.
+     *
+     * Format:
+     * organizations/{org_id}/adminAccessBindings/{admin_access_binding_id}
+     * Example: "organizations/123abc/adminAccessBindings/456def"
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. The resource name of this AdminAccessBinding.
+     *
+     * Format:
+     * organizations/{org_id}/adminAccessBindings/{admin_access_binding_id}
+     * Example: "organizations/123abc/adminAccessBindings/456def"
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.Internal.IntList organizationRoles_ = emptyIntList(); + + private void ensureOrganizationRolesIsMutable() { + if (!organizationRoles_.isModifiable()) { + organizationRoles_ = makeMutableCopy(organizationRoles_); + } + bitField0_ |= 0x00000008; + } + + /** + * + * + *
+     * Optional. A list of roles granted to the parent organization.
+     *
+     * USER_ADMIN_ROLE and BILLING_ADMIN_ROLE will be automatically added if
+     * ORG_ADMIN_ROLE is assigned.
+     *
+     * No roles will be assigned if no roles are specified.
+     * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.OrganizationRole organization_roles = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the organizationRoles. + */ + public java.util.List + getOrganizationRolesList() { + return new com.google.protobuf.Internal.IntListAdapter< + com.google.ads.marketingplatform.admin.v1alpha.OrganizationRole>( + organizationRoles_, organizationRoles_converter_); + } + + /** + * + * + *
+     * Optional. A list of roles granted to the parent organization.
+     *
+     * USER_ADMIN_ROLE and BILLING_ADMIN_ROLE will be automatically added if
+     * ORG_ADMIN_ROLE is assigned.
+     *
+     * No roles will be assigned if no roles are specified.
+     * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.OrganizationRole organization_roles = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of organizationRoles. + */ + public int getOrganizationRolesCount() { + return organizationRoles_.size(); + } + + /** + * + * + *
+     * Optional. A list of roles granted to the parent organization.
+     *
+     * USER_ADMIN_ROLE and BILLING_ADMIN_ROLE will be automatically added if
+     * ORG_ADMIN_ROLE is assigned.
+     *
+     * No roles will be assigned if no roles are specified.
+     * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.OrganizationRole organization_roles = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The organizationRoles at the given index. + */ + public com.google.ads.marketingplatform.admin.v1alpha.OrganizationRole getOrganizationRoles( + int index) { + return organizationRoles_converter_.convert(organizationRoles_.getInt(index)); + } + + /** + * + * + *
+     * Optional. A list of roles granted to the parent organization.
+     *
+     * USER_ADMIN_ROLE and BILLING_ADMIN_ROLE will be automatically added if
+     * ORG_ADMIN_ROLE is assigned.
+     *
+     * No roles will be assigned if no roles are specified.
+     * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.OrganizationRole organization_roles = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The organizationRoles to set. + * @return This builder for chaining. + */ + public Builder setOrganizationRoles( + int index, com.google.ads.marketingplatform.admin.v1alpha.OrganizationRole value) { + if (value == null) { + throw new NullPointerException(); + } + ensureOrganizationRolesIsMutable(); + organizationRoles_.setInt(index, value.getNumber()); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A list of roles granted to the parent organization.
+     *
+     * USER_ADMIN_ROLE and BILLING_ADMIN_ROLE will be automatically added if
+     * ORG_ADMIN_ROLE is assigned.
+     *
+     * No roles will be assigned if no roles are specified.
+     * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.OrganizationRole organization_roles = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The organizationRoles to add. + * @return This builder for chaining. + */ + public Builder addOrganizationRoles( + com.google.ads.marketingplatform.admin.v1alpha.OrganizationRole value) { + if (value == null) { + throw new NullPointerException(); + } + ensureOrganizationRolesIsMutable(); + organizationRoles_.addInt(value.getNumber()); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A list of roles granted to the parent organization.
+     *
+     * USER_ADMIN_ROLE and BILLING_ADMIN_ROLE will be automatically added if
+     * ORG_ADMIN_ROLE is assigned.
+     *
+     * No roles will be assigned if no roles are specified.
+     * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.OrganizationRole organization_roles = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The organizationRoles to add. + * @return This builder for chaining. + */ + public Builder addAllOrganizationRoles( + java.lang.Iterable< + ? extends com.google.ads.marketingplatform.admin.v1alpha.OrganizationRole> + values) { + ensureOrganizationRolesIsMutable(); + for (com.google.ads.marketingplatform.admin.v1alpha.OrganizationRole value : values) { + organizationRoles_.addInt(value.getNumber()); + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A list of roles granted to the parent organization.
+     *
+     * USER_ADMIN_ROLE and BILLING_ADMIN_ROLE will be automatically added if
+     * ORG_ADMIN_ROLE is assigned.
+     *
+     * No roles will be assigned if no roles are specified.
+     * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.OrganizationRole organization_roles = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearOrganizationRoles() { + organizationRoles_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A list of roles granted to the parent organization.
+     *
+     * USER_ADMIN_ROLE and BILLING_ADMIN_ROLE will be automatically added if
+     * ORG_ADMIN_ROLE is assigned.
+     *
+     * No roles will be assigned if no roles are specified.
+     * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.OrganizationRole organization_roles = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the enum numeric values on the wire for organizationRoles. + */ + public java.util.List getOrganizationRolesValueList() { + organizationRoles_.makeImmutable(); + return organizationRoles_; + } + + /** + * + * + *
+     * Optional. A list of roles granted to the parent organization.
+     *
+     * USER_ADMIN_ROLE and BILLING_ADMIN_ROLE will be automatically added if
+     * ORG_ADMIN_ROLE is assigned.
+     *
+     * No roles will be assigned if no roles are specified.
+     * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.OrganizationRole organization_roles = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of organizationRoles at the given index. + */ + public int getOrganizationRolesValue(int index) { + return organizationRoles_.getInt(index); + } + + /** + * + * + *
+     * Optional. A list of roles granted to the parent organization.
+     *
+     * USER_ADMIN_ROLE and BILLING_ADMIN_ROLE will be automatically added if
+     * ORG_ADMIN_ROLE is assigned.
+     *
+     * No roles will be assigned if no roles are specified.
+     * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.OrganizationRole organization_roles = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for organizationRoles to set. + * @return This builder for chaining. + */ + public Builder setOrganizationRolesValue(int index, int value) { + ensureOrganizationRolesIsMutable(); + organizationRoles_.setInt(index, value); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A list of roles granted to the parent organization.
+     *
+     * USER_ADMIN_ROLE and BILLING_ADMIN_ROLE will be automatically added if
+     * ORG_ADMIN_ROLE is assigned.
+     *
+     * No roles will be assigned if no roles are specified.
+     * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.OrganizationRole organization_roles = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for organizationRoles to add. + * @return This builder for chaining. + */ + public Builder addOrganizationRolesValue(int value) { + ensureOrganizationRolesIsMutable(); + organizationRoles_.addInt(value); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A list of roles granted to the parent organization.
+     *
+     * USER_ADMIN_ROLE and BILLING_ADMIN_ROLE will be automatically added if
+     * ORG_ADMIN_ROLE is assigned.
+     *
+     * No roles will be assigned if no roles are specified.
+     * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.OrganizationRole organization_roles = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The enum numeric values on the wire for organizationRoles to add. + * @return This builder for chaining. + */ + public Builder addAllOrganizationRolesValue(java.lang.Iterable values) { + ensureOrganizationRolesIsMutable(); + for (int value : values) { + organizationRoles_.addInt(value); + } + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.marketingplatform.admin.v1alpha.AdminAccessBinding) + } + + // @@protoc_insertion_point(class_scope:google.marketingplatform.admin.v1alpha.AdminAccessBinding) + private static final com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding(); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AdminAccessBinding parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/AdminAccessBindingName.java b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/AdminAccessBindingName.java new file mode 100644 index 000000000000..ea5ee87c0633 --- /dev/null +++ b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/AdminAccessBindingName.java @@ -0,0 +1,204 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.marketingplatform.admin.v1alpha; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; +import org.jspecify.annotations.NullMarked; +import org.jspecify.annotations.Nullable; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@NullMarked +@Generated("by gapic-generator-java") +public class AdminAccessBindingName implements ResourceName { + private static final PathTemplate ORGANIZATION_ADMIN_ACCESS_BINDING = + PathTemplate.createWithoutUrlEncoding( + "organizations/{organization}/adminAccessBindings/{admin_access_binding}"); + private volatile Map fieldValuesMap; + private final String organization; + private final String adminAccessBinding; + + @Deprecated + protected AdminAccessBindingName() { + organization = null; + adminAccessBinding = null; + } + + private AdminAccessBindingName(Builder builder) { + organization = Preconditions.checkNotNull(builder.getOrganization()); + adminAccessBinding = Preconditions.checkNotNull(builder.getAdminAccessBinding()); + } + + public String getOrganization() { + return organization; + } + + public String getAdminAccessBinding() { + return adminAccessBinding; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static AdminAccessBindingName of(String organization, String adminAccessBinding) { + return newBuilder() + .setOrganization(organization) + .setAdminAccessBinding(adminAccessBinding) + .build(); + } + + public static String format(String organization, String adminAccessBinding) { + return newBuilder() + .setOrganization(organization) + .setAdminAccessBinding(adminAccessBinding) + .build() + .toString(); + } + + public static @Nullable AdminAccessBindingName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + ORGANIZATION_ADMIN_ACCESS_BINDING.validatedMatch( + formattedString, "AdminAccessBindingName.parse: formattedString not in valid format"); + return of(matchMap.get("organization"), matchMap.get("admin_access_binding")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List<@Nullable AdminAccessBindingName> values) { + List list = new ArrayList<>(values.size()); + for (AdminAccessBindingName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return ORGANIZATION_ADMIN_ACCESS_BINDING.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (organization != null) { + fieldMapBuilder.put("organization", organization); + } + if (adminAccessBinding != null) { + fieldMapBuilder.put("admin_access_binding", adminAccessBinding); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return ORGANIZATION_ADMIN_ACCESS_BINDING.instantiate( + "organization", organization, "admin_access_binding", adminAccessBinding); + } + + @Override + public boolean equals(@Nullable Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + AdminAccessBindingName that = ((AdminAccessBindingName) o); + return Objects.equals(this.organization, that.organization) + && Objects.equals(this.adminAccessBinding, that.adminAccessBinding); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(organization); + h *= 1000003; + h ^= Objects.hashCode(adminAccessBinding); + return h; + } + + /** Builder for organizations/{organization}/adminAccessBindings/{admin_access_binding}. */ + public static class Builder { + private String organization; + private String adminAccessBinding; + + protected Builder() {} + + public String getOrganization() { + return organization; + } + + public String getAdminAccessBinding() { + return adminAccessBinding; + } + + public Builder setOrganization(String organization) { + this.organization = organization; + return this; + } + + public Builder setAdminAccessBinding(String adminAccessBinding) { + this.adminAccessBinding = adminAccessBinding; + return this; + } + + private Builder(AdminAccessBindingName adminAccessBindingName) { + this.organization = adminAccessBindingName.organization; + this.adminAccessBinding = adminAccessBindingName.adminAccessBinding; + } + + public AdminAccessBindingName build() { + return new AdminAccessBindingName(this); + } + } +} diff --git a/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/AdminAccessBindingOrBuilder.java b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/AdminAccessBindingOrBuilder.java new file mode 100644 index 000000000000..47858f3970b9 --- /dev/null +++ b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/AdminAccessBindingOrBuilder.java @@ -0,0 +1,246 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/marketingplatform/admin/v1alpha/resources.proto +// Protobuf Java Version: 4.33.6 + +package com.google.ads.marketingplatform.admin.v1alpha; + +@com.google.protobuf.Generated +public interface AdminAccessBindingOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.marketingplatform.admin.v1alpha.AdminAccessBinding) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Email address of the user.
+   * 
+ * + * string user_email = 2; + * + * @return Whether the userEmail field is set. + */ + boolean hasUserEmail(); + + /** + * + * + *
+   * Email address of the user.
+   * 
+ * + * string user_email = 2; + * + * @return The userEmail. + */ + java.lang.String getUserEmail(); + + /** + * + * + *
+   * Email address of the user.
+   * 
+ * + * string user_email = 2; + * + * @return The bytes for userEmail. + */ + com.google.protobuf.ByteString getUserEmailBytes(); + + /** + * + * + *
+   * Resource name of the user group.
+   * 
+ * + * string user_group = 3; + * + * @return Whether the userGroup field is set. + */ + boolean hasUserGroup(); + + /** + * + * + *
+   * Resource name of the user group.
+   * 
+ * + * string user_group = 3; + * + * @return The userGroup. + */ + java.lang.String getUserGroup(); + + /** + * + * + *
+   * Resource name of the user group.
+   * 
+ * + * string user_group = 3; + * + * @return The bytes for userGroup. + */ + com.google.protobuf.ByteString getUserGroupBytes(); + + /** + * + * + *
+   * Identifier. The resource name of this AdminAccessBinding.
+   *
+   * Format:
+   * organizations/{org_id}/adminAccessBindings/{admin_access_binding_id}
+   * Example: "organizations/123abc/adminAccessBindings/456def"
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Identifier. The resource name of this AdminAccessBinding.
+   *
+   * Format:
+   * organizations/{org_id}/adminAccessBindings/{admin_access_binding_id}
+   * Example: "organizations/123abc/adminAccessBindings/456def"
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. A list of roles granted to the parent organization.
+   *
+   * USER_ADMIN_ROLE and BILLING_ADMIN_ROLE will be automatically added if
+   * ORG_ADMIN_ROLE is assigned.
+   *
+   * No roles will be assigned if no roles are specified.
+   * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.OrganizationRole organization_roles = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the organizationRoles. + */ + java.util.List + getOrganizationRolesList(); + + /** + * + * + *
+   * Optional. A list of roles granted to the parent organization.
+   *
+   * USER_ADMIN_ROLE and BILLING_ADMIN_ROLE will be automatically added if
+   * ORG_ADMIN_ROLE is assigned.
+   *
+   * No roles will be assigned if no roles are specified.
+   * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.OrganizationRole organization_roles = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of organizationRoles. + */ + int getOrganizationRolesCount(); + + /** + * + * + *
+   * Optional. A list of roles granted to the parent organization.
+   *
+   * USER_ADMIN_ROLE and BILLING_ADMIN_ROLE will be automatically added if
+   * ORG_ADMIN_ROLE is assigned.
+   *
+   * No roles will be assigned if no roles are specified.
+   * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.OrganizationRole organization_roles = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The organizationRoles at the given index. + */ + com.google.ads.marketingplatform.admin.v1alpha.OrganizationRole getOrganizationRoles(int index); + + /** + * + * + *
+   * Optional. A list of roles granted to the parent organization.
+   *
+   * USER_ADMIN_ROLE and BILLING_ADMIN_ROLE will be automatically added if
+   * ORG_ADMIN_ROLE is assigned.
+   *
+   * No roles will be assigned if no roles are specified.
+   * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.OrganizationRole organization_roles = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the enum numeric values on the wire for organizationRoles. + */ + java.util.List getOrganizationRolesValueList(); + + /** + * + * + *
+   * Optional. A list of roles granted to the parent organization.
+   *
+   * USER_ADMIN_ROLE and BILLING_ADMIN_ROLE will be automatically added if
+   * ORG_ADMIN_ROLE is assigned.
+   *
+   * No roles will be assigned if no roles are specified.
+   * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.OrganizationRole organization_roles = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of organizationRoles at the given index. + */ + int getOrganizationRolesValue(int index); + + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding.AccessTargetCase + getAccessTargetCase(); +} diff --git a/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/CreateAdminAccessBindingRequest.java b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/CreateAdminAccessBindingRequest.java new file mode 100644 index 000000000000..e84a9f43cabe --- /dev/null +++ b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/CreateAdminAccessBindingRequest.java @@ -0,0 +1,996 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/marketingplatform/admin/v1alpha/marketingplatform_admin.proto +// Protobuf Java Version: 4.33.6 + +package com.google.ads.marketingplatform.admin.v1alpha; + +/** + * + * + *
+ * Request message for CreateAdminAccessBinding RPC.
+ * 
+ * + * Protobuf type {@code google.marketingplatform.admin.v1alpha.CreateAdminAccessBindingRequest} + */ +@com.google.protobuf.Generated +public final class CreateAdminAccessBindingRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.marketingplatform.admin.v1alpha.CreateAdminAccessBindingRequest) + CreateAdminAccessBindingRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "CreateAdminAccessBindingRequest"); + } + + // Use CreateAdminAccessBindingRequest.newBuilder() to construct. + private CreateAdminAccessBindingRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CreateAdminAccessBindingRequest() { + parent_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_CreateAdminAccessBindingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_CreateAdminAccessBindingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.ads.marketingplatform.admin.v1alpha.CreateAdminAccessBindingRequest.class, + com.google.ads.marketingplatform.admin.v1alpha.CreateAdminAccessBindingRequest.Builder + .class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The parent organization, which owns this Admin Access Binding.
+   * Format: organizations/{org_id}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The parent organization, which owns this Admin Access Binding.
+   * Format: organizations/{org_id}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ADMIN_ACCESS_BINDING_FIELD_NUMBER = 2; + private com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding adminAccessBinding_; + + /** + * + * + *
+   * Required. The Admin Access Binding to create.
+   *
+   * Only 'user_email' input is allowed.
+   * 
+ * + * + * .google.marketingplatform.admin.v1alpha.AdminAccessBinding admin_access_binding = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the adminAccessBinding field is set. + */ + @java.lang.Override + public boolean hasAdminAccessBinding() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The Admin Access Binding to create.
+   *
+   * Only 'user_email' input is allowed.
+   * 
+ * + * + * .google.marketingplatform.admin.v1alpha.AdminAccessBinding admin_access_binding = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The adminAccessBinding. + */ + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding getAdminAccessBinding() { + return adminAccessBinding_ == null + ? com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding.getDefaultInstance() + : adminAccessBinding_; + } + + /** + * + * + *
+   * Required. The Admin Access Binding to create.
+   *
+   * Only 'user_email' input is allowed.
+   * 
+ * + * + * .google.marketingplatform.admin.v1alpha.AdminAccessBinding admin_access_binding = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBindingOrBuilder + getAdminAccessBindingOrBuilder() { + return adminAccessBinding_ == null + ? com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding.getDefaultInstance() + : adminAccessBinding_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getAdminAccessBinding()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getAdminAccessBinding()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.ads.marketingplatform.admin.v1alpha.CreateAdminAccessBindingRequest)) { + return super.equals(obj); + } + com.google.ads.marketingplatform.admin.v1alpha.CreateAdminAccessBindingRequest other = + (com.google.ads.marketingplatform.admin.v1alpha.CreateAdminAccessBindingRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasAdminAccessBinding() != other.hasAdminAccessBinding()) return false; + if (hasAdminAccessBinding()) { + if (!getAdminAccessBinding().equals(other.getAdminAccessBinding())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasAdminAccessBinding()) { + hash = (37 * hash) + ADMIN_ACCESS_BINDING_FIELD_NUMBER; + hash = (53 * hash) + getAdminAccessBinding().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.ads.marketingplatform.admin.v1alpha.CreateAdminAccessBindingRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.CreateAdminAccessBindingRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.CreateAdminAccessBindingRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.CreateAdminAccessBindingRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.CreateAdminAccessBindingRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.CreateAdminAccessBindingRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.CreateAdminAccessBindingRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.CreateAdminAccessBindingRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.CreateAdminAccessBindingRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.CreateAdminAccessBindingRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.CreateAdminAccessBindingRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.CreateAdminAccessBindingRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.ads.marketingplatform.admin.v1alpha.CreateAdminAccessBindingRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for CreateAdminAccessBinding RPC.
+   * 
+ * + * Protobuf type {@code google.marketingplatform.admin.v1alpha.CreateAdminAccessBindingRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.marketingplatform.admin.v1alpha.CreateAdminAccessBindingRequest) + com.google.ads.marketingplatform.admin.v1alpha.CreateAdminAccessBindingRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_CreateAdminAccessBindingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_CreateAdminAccessBindingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.ads.marketingplatform.admin.v1alpha.CreateAdminAccessBindingRequest.class, + com.google.ads.marketingplatform.admin.v1alpha.CreateAdminAccessBindingRequest.Builder + .class); + } + + // Construct using + // com.google.ads.marketingplatform.admin.v1alpha.CreateAdminAccessBindingRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetAdminAccessBindingFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + adminAccessBinding_ = null; + if (adminAccessBindingBuilder_ != null) { + adminAccessBindingBuilder_.dispose(); + adminAccessBindingBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_CreateAdminAccessBindingRequest_descriptor; + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.CreateAdminAccessBindingRequest + getDefaultInstanceForType() { + return com.google.ads.marketingplatform.admin.v1alpha.CreateAdminAccessBindingRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.CreateAdminAccessBindingRequest build() { + com.google.ads.marketingplatform.admin.v1alpha.CreateAdminAccessBindingRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.CreateAdminAccessBindingRequest + buildPartial() { + com.google.ads.marketingplatform.admin.v1alpha.CreateAdminAccessBindingRequest result = + new com.google.ads.marketingplatform.admin.v1alpha.CreateAdminAccessBindingRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.ads.marketingplatform.admin.v1alpha.CreateAdminAccessBindingRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.adminAccessBinding_ = + adminAccessBindingBuilder_ == null + ? adminAccessBinding_ + : adminAccessBindingBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.ads.marketingplatform.admin.v1alpha.CreateAdminAccessBindingRequest) { + return mergeFrom( + (com.google.ads.marketingplatform.admin.v1alpha.CreateAdminAccessBindingRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.ads.marketingplatform.admin.v1alpha.CreateAdminAccessBindingRequest other) { + if (other + == com.google.ads.marketingplatform.admin.v1alpha.CreateAdminAccessBindingRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasAdminAccessBinding()) { + mergeAdminAccessBinding(other.getAdminAccessBinding()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetAdminAccessBindingFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. The parent organization, which owns this Admin Access Binding.
+     * Format: organizations/{org_id}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The parent organization, which owns this Admin Access Binding.
+     * Format: organizations/{org_id}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The parent organization, which owns this Admin Access Binding.
+     * Format: organizations/{org_id}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The parent organization, which owns this Admin Access Binding.
+     * Format: organizations/{org_id}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The parent organization, which owns this Admin Access Binding.
+     * Format: organizations/{org_id}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding adminAccessBinding_; + private com.google.protobuf.SingleFieldBuilder< + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding, + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding.Builder, + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBindingOrBuilder> + adminAccessBindingBuilder_; + + /** + * + * + *
+     * Required. The Admin Access Binding to create.
+     *
+     * Only 'user_email' input is allowed.
+     * 
+ * + * + * .google.marketingplatform.admin.v1alpha.AdminAccessBinding admin_access_binding = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the adminAccessBinding field is set. + */ + public boolean hasAdminAccessBinding() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Required. The Admin Access Binding to create.
+     *
+     * Only 'user_email' input is allowed.
+     * 
+ * + * + * .google.marketingplatform.admin.v1alpha.AdminAccessBinding admin_access_binding = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The adminAccessBinding. + */ + public com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding + getAdminAccessBinding() { + if (adminAccessBindingBuilder_ == null) { + return adminAccessBinding_ == null + ? com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding.getDefaultInstance() + : adminAccessBinding_; + } else { + return adminAccessBindingBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The Admin Access Binding to create.
+     *
+     * Only 'user_email' input is allowed.
+     * 
+ * + * + * .google.marketingplatform.admin.v1alpha.AdminAccessBinding admin_access_binding = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAdminAccessBinding( + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding value) { + if (adminAccessBindingBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + adminAccessBinding_ = value; + } else { + adminAccessBindingBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The Admin Access Binding to create.
+     *
+     * Only 'user_email' input is allowed.
+     * 
+ * + * + * .google.marketingplatform.admin.v1alpha.AdminAccessBinding admin_access_binding = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAdminAccessBinding( + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding.Builder builderForValue) { + if (adminAccessBindingBuilder_ == null) { + adminAccessBinding_ = builderForValue.build(); + } else { + adminAccessBindingBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The Admin Access Binding to create.
+     *
+     * Only 'user_email' input is allowed.
+     * 
+ * + * + * .google.marketingplatform.admin.v1alpha.AdminAccessBinding admin_access_binding = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeAdminAccessBinding( + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding value) { + if (adminAccessBindingBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && adminAccessBinding_ != null + && adminAccessBinding_ + != com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding + .getDefaultInstance()) { + getAdminAccessBindingBuilder().mergeFrom(value); + } else { + adminAccessBinding_ = value; + } + } else { + adminAccessBindingBuilder_.mergeFrom(value); + } + if (adminAccessBinding_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The Admin Access Binding to create.
+     *
+     * Only 'user_email' input is allowed.
+     * 
+ * + * + * .google.marketingplatform.admin.v1alpha.AdminAccessBinding admin_access_binding = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearAdminAccessBinding() { + bitField0_ = (bitField0_ & ~0x00000002); + adminAccessBinding_ = null; + if (adminAccessBindingBuilder_ != null) { + adminAccessBindingBuilder_.dispose(); + adminAccessBindingBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The Admin Access Binding to create.
+     *
+     * Only 'user_email' input is allowed.
+     * 
+ * + * + * .google.marketingplatform.admin.v1alpha.AdminAccessBinding admin_access_binding = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding.Builder + getAdminAccessBindingBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetAdminAccessBindingFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The Admin Access Binding to create.
+     *
+     * Only 'user_email' input is allowed.
+     * 
+ * + * + * .google.marketingplatform.admin.v1alpha.AdminAccessBinding admin_access_binding = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBindingOrBuilder + getAdminAccessBindingOrBuilder() { + if (adminAccessBindingBuilder_ != null) { + return adminAccessBindingBuilder_.getMessageOrBuilder(); + } else { + return adminAccessBinding_ == null + ? com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding.getDefaultInstance() + : adminAccessBinding_; + } + } + + /** + * + * + *
+     * Required. The Admin Access Binding to create.
+     *
+     * Only 'user_email' input is allowed.
+     * 
+ * + * + * .google.marketingplatform.admin.v1alpha.AdminAccessBinding admin_access_binding = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding, + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding.Builder, + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBindingOrBuilder> + internalGetAdminAccessBindingFieldBuilder() { + if (adminAccessBindingBuilder_ == null) { + adminAccessBindingBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding, + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding.Builder, + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBindingOrBuilder>( + getAdminAccessBinding(), getParentForChildren(), isClean()); + adminAccessBinding_ = null; + } + return adminAccessBindingBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.marketingplatform.admin.v1alpha.CreateAdminAccessBindingRequest) + } + + // @@protoc_insertion_point(class_scope:google.marketingplatform.admin.v1alpha.CreateAdminAccessBindingRequest) + private static final com.google.ads.marketingplatform.admin.v1alpha + .CreateAdminAccessBindingRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.ads.marketingplatform.admin.v1alpha.CreateAdminAccessBindingRequest(); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.CreateAdminAccessBindingRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateAdminAccessBindingRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.CreateAdminAccessBindingRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/CreateAdminAccessBindingRequestOrBuilder.java b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/CreateAdminAccessBindingRequestOrBuilder.java new file mode 100644 index 000000000000..64b293425808 --- /dev/null +++ b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/CreateAdminAccessBindingRequestOrBuilder.java @@ -0,0 +1,110 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/marketingplatform/admin/v1alpha/marketingplatform_admin.proto +// Protobuf Java Version: 4.33.6 + +package com.google.ads.marketingplatform.admin.v1alpha; + +@com.google.protobuf.Generated +public interface CreateAdminAccessBindingRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.marketingplatform.admin.v1alpha.CreateAdminAccessBindingRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent organization, which owns this Admin Access Binding.
+   * Format: organizations/{org_id}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The parent organization, which owns this Admin Access Binding.
+   * Format: organizations/{org_id}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The Admin Access Binding to create.
+   *
+   * Only 'user_email' input is allowed.
+   * 
+ * + * + * .google.marketingplatform.admin.v1alpha.AdminAccessBinding admin_access_binding = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the adminAccessBinding field is set. + */ + boolean hasAdminAccessBinding(); + + /** + * + * + *
+   * Required. The Admin Access Binding to create.
+   *
+   * Only 'user_email' input is allowed.
+   * 
+ * + * + * .google.marketingplatform.admin.v1alpha.AdminAccessBinding admin_access_binding = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The adminAccessBinding. + */ + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding getAdminAccessBinding(); + + /** + * + * + *
+   * Required. The Admin Access Binding to create.
+   *
+   * Only 'user_email' input is allowed.
+   * 
+ * + * + * .google.marketingplatform.admin.v1alpha.AdminAccessBinding admin_access_binding = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBindingOrBuilder + getAdminAccessBindingOrBuilder(); +} diff --git a/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/CreateUserGroupMemberRequest.java b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/CreateUserGroupMemberRequest.java new file mode 100644 index 000000000000..100dc02c8b9d --- /dev/null +++ b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/CreateUserGroupMemberRequest.java @@ -0,0 +1,966 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/marketingplatform/admin/v1alpha/marketingplatform_admin.proto +// Protobuf Java Version: 4.33.6 + +package com.google.ads.marketingplatform.admin.v1alpha; + +/** + * + * + *
+ * Request message for CreateUserGroupMember RPC.
+ * 
+ * + * Protobuf type {@code google.marketingplatform.admin.v1alpha.CreateUserGroupMemberRequest} + */ +@com.google.protobuf.Generated +public final class CreateUserGroupMemberRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.marketingplatform.admin.v1alpha.CreateUserGroupMemberRequest) + CreateUserGroupMemberRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "CreateUserGroupMemberRequest"); + } + + // Use CreateUserGroupMemberRequest.newBuilder() to construct. + private CreateUserGroupMemberRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CreateUserGroupMemberRequest() { + parent_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_CreateUserGroupMemberRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_CreateUserGroupMemberRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupMemberRequest.class, + com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupMemberRequest.Builder + .class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The parent resource where this UserGroupMember will be created.
+   * Format: organizations/{org_id}/userGroups/{user_group_id}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The parent resource where this UserGroupMember will be created.
+   * Format: organizations/{org_id}/userGroups/{user_group_id}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_GROUP_MEMBER_FIELD_NUMBER = 2; + private com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember userGroupMember_; + + /** + * + * + *
+   * Required. The user group member to create.
+   * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroupMember user_group_member = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the userGroupMember field is set. + */ + @java.lang.Override + public boolean hasUserGroupMember() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The user group member to create.
+   * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroupMember user_group_member = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The userGroupMember. + */ + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember getUserGroupMember() { + return userGroupMember_ == null + ? com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember.getDefaultInstance() + : userGroupMember_; + } + + /** + * + * + *
+   * Required. The user group member to create.
+   * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroupMember user_group_member = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.UserGroupMemberOrBuilder + getUserGroupMemberOrBuilder() { + return userGroupMember_ == null + ? com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember.getDefaultInstance() + : userGroupMember_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getUserGroupMember()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUserGroupMember()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupMemberRequest)) { + return super.equals(obj); + } + com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupMemberRequest other = + (com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupMemberRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasUserGroupMember() != other.hasUserGroupMember()) return false; + if (hasUserGroupMember()) { + if (!getUserGroupMember().equals(other.getUserGroupMember())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasUserGroupMember()) { + hash = (37 * hash) + USER_GROUP_MEMBER_FIELD_NUMBER; + hash = (53 * hash) + getUserGroupMember().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupMemberRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupMemberRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupMemberRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupMemberRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupMemberRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupMemberRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupMemberRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupMemberRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupMemberRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupMemberRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupMemberRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupMemberRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupMemberRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for CreateUserGroupMember RPC.
+   * 
+ * + * Protobuf type {@code google.marketingplatform.admin.v1alpha.CreateUserGroupMemberRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.marketingplatform.admin.v1alpha.CreateUserGroupMemberRequest) + com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupMemberRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_CreateUserGroupMemberRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_CreateUserGroupMemberRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupMemberRequest.class, + com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupMemberRequest.Builder + .class); + } + + // Construct using + // com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupMemberRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetUserGroupMemberFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + userGroupMember_ = null; + if (userGroupMemberBuilder_ != null) { + userGroupMemberBuilder_.dispose(); + userGroupMemberBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_CreateUserGroupMemberRequest_descriptor; + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupMemberRequest + getDefaultInstanceForType() { + return com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupMemberRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupMemberRequest build() { + com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupMemberRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupMemberRequest + buildPartial() { + com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupMemberRequest result = + new com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupMemberRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupMemberRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.userGroupMember_ = + userGroupMemberBuilder_ == null ? userGroupMember_ : userGroupMemberBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupMemberRequest) { + return mergeFrom( + (com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupMemberRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupMemberRequest other) { + if (other + == com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupMemberRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasUserGroupMember()) { + mergeUserGroupMember(other.getUserGroupMember()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetUserGroupMemberFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. The parent resource where this UserGroupMember will be created.
+     * Format: organizations/{org_id}/userGroups/{user_group_id}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The parent resource where this UserGroupMember will be created.
+     * Format: organizations/{org_id}/userGroups/{user_group_id}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The parent resource where this UserGroupMember will be created.
+     * Format: organizations/{org_id}/userGroups/{user_group_id}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The parent resource where this UserGroupMember will be created.
+     * Format: organizations/{org_id}/userGroups/{user_group_id}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The parent resource where this UserGroupMember will be created.
+     * Format: organizations/{org_id}/userGroups/{user_group_id}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember userGroupMember_; + private com.google.protobuf.SingleFieldBuilder< + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember, + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember.Builder, + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMemberOrBuilder> + userGroupMemberBuilder_; + + /** + * + * + *
+     * Required. The user group member to create.
+     * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroupMember user_group_member = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the userGroupMember field is set. + */ + public boolean hasUserGroupMember() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Required. The user group member to create.
+     * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroupMember user_group_member = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The userGroupMember. + */ + public com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember getUserGroupMember() { + if (userGroupMemberBuilder_ == null) { + return userGroupMember_ == null + ? com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember.getDefaultInstance() + : userGroupMember_; + } else { + return userGroupMemberBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The user group member to create.
+     * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroupMember user_group_member = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUserGroupMember( + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember value) { + if (userGroupMemberBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + userGroupMember_ = value; + } else { + userGroupMemberBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The user group member to create.
+     * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroupMember user_group_member = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUserGroupMember( + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember.Builder builderForValue) { + if (userGroupMemberBuilder_ == null) { + userGroupMember_ = builderForValue.build(); + } else { + userGroupMemberBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The user group member to create.
+     * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroupMember user_group_member = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUserGroupMember( + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember value) { + if (userGroupMemberBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && userGroupMember_ != null + && userGroupMember_ + != com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember + .getDefaultInstance()) { + getUserGroupMemberBuilder().mergeFrom(value); + } else { + userGroupMember_ = value; + } + } else { + userGroupMemberBuilder_.mergeFrom(value); + } + if (userGroupMember_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The user group member to create.
+     * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroupMember user_group_member = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUserGroupMember() { + bitField0_ = (bitField0_ & ~0x00000002); + userGroupMember_ = null; + if (userGroupMemberBuilder_ != null) { + userGroupMemberBuilder_.dispose(); + userGroupMemberBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The user group member to create.
+     * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroupMember user_group_member = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember.Builder + getUserGroupMemberBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetUserGroupMemberFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The user group member to create.
+     * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroupMember user_group_member = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.ads.marketingplatform.admin.v1alpha.UserGroupMemberOrBuilder + getUserGroupMemberOrBuilder() { + if (userGroupMemberBuilder_ != null) { + return userGroupMemberBuilder_.getMessageOrBuilder(); + } else { + return userGroupMember_ == null + ? com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember.getDefaultInstance() + : userGroupMember_; + } + } + + /** + * + * + *
+     * Required. The user group member to create.
+     * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroupMember user_group_member = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember, + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember.Builder, + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMemberOrBuilder> + internalGetUserGroupMemberFieldBuilder() { + if (userGroupMemberBuilder_ == null) { + userGroupMemberBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember, + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember.Builder, + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMemberOrBuilder>( + getUserGroupMember(), getParentForChildren(), isClean()); + userGroupMember_ = null; + } + return userGroupMemberBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.marketingplatform.admin.v1alpha.CreateUserGroupMemberRequest) + } + + // @@protoc_insertion_point(class_scope:google.marketingplatform.admin.v1alpha.CreateUserGroupMemberRequest) + private static final com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupMemberRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupMemberRequest(); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupMemberRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateUserGroupMemberRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupMemberRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/CreateUserGroupMemberRequestOrBuilder.java b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/CreateUserGroupMemberRequestOrBuilder.java new file mode 100644 index 000000000000..32aa448a8bb2 --- /dev/null +++ b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/CreateUserGroupMemberRequestOrBuilder.java @@ -0,0 +1,104 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/marketingplatform/admin/v1alpha/marketingplatform_admin.proto +// Protobuf Java Version: 4.33.6 + +package com.google.ads.marketingplatform.admin.v1alpha; + +@com.google.protobuf.Generated +public interface CreateUserGroupMemberRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.marketingplatform.admin.v1alpha.CreateUserGroupMemberRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource where this UserGroupMember will be created.
+   * Format: organizations/{org_id}/userGroups/{user_group_id}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The parent resource where this UserGroupMember will be created.
+   * Format: organizations/{org_id}/userGroups/{user_group_id}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The user group member to create.
+   * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroupMember user_group_member = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the userGroupMember field is set. + */ + boolean hasUserGroupMember(); + + /** + * + * + *
+   * Required. The user group member to create.
+   * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroupMember user_group_member = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The userGroupMember. + */ + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember getUserGroupMember(); + + /** + * + * + *
+   * Required. The user group member to create.
+   * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroupMember user_group_member = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMemberOrBuilder + getUserGroupMemberOrBuilder(); +} diff --git a/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/CreateUserGroupRequest.java b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/CreateUserGroupRequest.java new file mode 100644 index 000000000000..0eb1e28e0c9a --- /dev/null +++ b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/CreateUserGroupRequest.java @@ -0,0 +1,948 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/marketingplatform/admin/v1alpha/marketingplatform_admin.proto +// Protobuf Java Version: 4.33.6 + +package com.google.ads.marketingplatform.admin.v1alpha; + +/** + * + * + *
+ * Request message for CreateUserGroup RPC.
+ * 
+ * + * Protobuf type {@code google.marketingplatform.admin.v1alpha.CreateUserGroupRequest} + */ +@com.google.protobuf.Generated +public final class CreateUserGroupRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.marketingplatform.admin.v1alpha.CreateUserGroupRequest) + CreateUserGroupRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "CreateUserGroupRequest"); + } + + // Use CreateUserGroupRequest.newBuilder() to construct. + private CreateUserGroupRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CreateUserGroupRequest() { + parent_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_CreateUserGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_CreateUserGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupRequest.class, + com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The parent resource where this UserGroup will be created.
+   * Format: organizations/{org_id}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The parent resource where this UserGroup will be created.
+   * Format: organizations/{org_id}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_GROUP_FIELD_NUMBER = 2; + private com.google.ads.marketingplatform.admin.v1alpha.UserGroup userGroup_; + + /** + * + * + *
+   * Required. The user group to create.
+   * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroup user_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the userGroup field is set. + */ + @java.lang.Override + public boolean hasUserGroup() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The user group to create.
+   * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroup user_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The userGroup. + */ + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.UserGroup getUserGroup() { + return userGroup_ == null + ? com.google.ads.marketingplatform.admin.v1alpha.UserGroup.getDefaultInstance() + : userGroup_; + } + + /** + * + * + *
+   * Required. The user group to create.
+   * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroup user_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.UserGroupOrBuilder getUserGroupOrBuilder() { + return userGroup_ == null + ? com.google.ads.marketingplatform.admin.v1alpha.UserGroup.getDefaultInstance() + : userGroup_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getUserGroup()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUserGroup()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupRequest)) { + return super.equals(obj); + } + com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupRequest other = + (com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasUserGroup() != other.hasUserGroup()) return false; + if (hasUserGroup()) { + if (!getUserGroup().equals(other.getUserGroup())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasUserGroup()) { + hash = (37 * hash) + USER_GROUP_FIELD_NUMBER; + hash = (53 * hash) + getUserGroup().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for CreateUserGroup RPC.
+   * 
+ * + * Protobuf type {@code google.marketingplatform.admin.v1alpha.CreateUserGroupRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.marketingplatform.admin.v1alpha.CreateUserGroupRequest) + com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_CreateUserGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_CreateUserGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupRequest.class, + com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupRequest.Builder.class); + } + + // Construct using + // com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetUserGroupFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + userGroup_ = null; + if (userGroupBuilder_ != null) { + userGroupBuilder_.dispose(); + userGroupBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_CreateUserGroupRequest_descriptor; + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupRequest + getDefaultInstanceForType() { + return com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupRequest build() { + com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupRequest buildPartial() { + com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupRequest result = + new com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.userGroup_ = userGroupBuilder_ == null ? userGroup_ : userGroupBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupRequest) { + return mergeFrom( + (com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupRequest other) { + if (other + == com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasUserGroup()) { + mergeUserGroup(other.getUserGroup()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetUserGroupFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. The parent resource where this UserGroup will be created.
+     * Format: organizations/{org_id}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The parent resource where this UserGroup will be created.
+     * Format: organizations/{org_id}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The parent resource where this UserGroup will be created.
+     * Format: organizations/{org_id}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The parent resource where this UserGroup will be created.
+     * Format: organizations/{org_id}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The parent resource where this UserGroup will be created.
+     * Format: organizations/{org_id}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.ads.marketingplatform.admin.v1alpha.UserGroup userGroup_; + private com.google.protobuf.SingleFieldBuilder< + com.google.ads.marketingplatform.admin.v1alpha.UserGroup, + com.google.ads.marketingplatform.admin.v1alpha.UserGroup.Builder, + com.google.ads.marketingplatform.admin.v1alpha.UserGroupOrBuilder> + userGroupBuilder_; + + /** + * + * + *
+     * Required. The user group to create.
+     * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroup user_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the userGroup field is set. + */ + public boolean hasUserGroup() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Required. The user group to create.
+     * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroup user_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The userGroup. + */ + public com.google.ads.marketingplatform.admin.v1alpha.UserGroup getUserGroup() { + if (userGroupBuilder_ == null) { + return userGroup_ == null + ? com.google.ads.marketingplatform.admin.v1alpha.UserGroup.getDefaultInstance() + : userGroup_; + } else { + return userGroupBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The user group to create.
+     * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroup user_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUserGroup(com.google.ads.marketingplatform.admin.v1alpha.UserGroup value) { + if (userGroupBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + userGroup_ = value; + } else { + userGroupBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The user group to create.
+     * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroup user_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUserGroup( + com.google.ads.marketingplatform.admin.v1alpha.UserGroup.Builder builderForValue) { + if (userGroupBuilder_ == null) { + userGroup_ = builderForValue.build(); + } else { + userGroupBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The user group to create.
+     * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroup user_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUserGroup(com.google.ads.marketingplatform.admin.v1alpha.UserGroup value) { + if (userGroupBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && userGroup_ != null + && userGroup_ + != com.google.ads.marketingplatform.admin.v1alpha.UserGroup.getDefaultInstance()) { + getUserGroupBuilder().mergeFrom(value); + } else { + userGroup_ = value; + } + } else { + userGroupBuilder_.mergeFrom(value); + } + if (userGroup_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The user group to create.
+     * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroup user_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUserGroup() { + bitField0_ = (bitField0_ & ~0x00000002); + userGroup_ = null; + if (userGroupBuilder_ != null) { + userGroupBuilder_.dispose(); + userGroupBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The user group to create.
+     * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroup user_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.ads.marketingplatform.admin.v1alpha.UserGroup.Builder getUserGroupBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetUserGroupFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The user group to create.
+     * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroup user_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.ads.marketingplatform.admin.v1alpha.UserGroupOrBuilder + getUserGroupOrBuilder() { + if (userGroupBuilder_ != null) { + return userGroupBuilder_.getMessageOrBuilder(); + } else { + return userGroup_ == null + ? com.google.ads.marketingplatform.admin.v1alpha.UserGroup.getDefaultInstance() + : userGroup_; + } + } + + /** + * + * + *
+     * Required. The user group to create.
+     * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroup user_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.ads.marketingplatform.admin.v1alpha.UserGroup, + com.google.ads.marketingplatform.admin.v1alpha.UserGroup.Builder, + com.google.ads.marketingplatform.admin.v1alpha.UserGroupOrBuilder> + internalGetUserGroupFieldBuilder() { + if (userGroupBuilder_ == null) { + userGroupBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.ads.marketingplatform.admin.v1alpha.UserGroup, + com.google.ads.marketingplatform.admin.v1alpha.UserGroup.Builder, + com.google.ads.marketingplatform.admin.v1alpha.UserGroupOrBuilder>( + getUserGroup(), getParentForChildren(), isClean()); + userGroup_ = null; + } + return userGroupBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.marketingplatform.admin.v1alpha.CreateUserGroupRequest) + } + + // @@protoc_insertion_point(class_scope:google.marketingplatform.admin.v1alpha.CreateUserGroupRequest) + private static final com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupRequest(); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateUserGroupRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/CreateUserGroupRequestOrBuilder.java b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/CreateUserGroupRequestOrBuilder.java new file mode 100644 index 000000000000..1d03ff2834e9 --- /dev/null +++ b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/CreateUserGroupRequestOrBuilder.java @@ -0,0 +1,103 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/marketingplatform/admin/v1alpha/marketingplatform_admin.proto +// Protobuf Java Version: 4.33.6 + +package com.google.ads.marketingplatform.admin.v1alpha; + +@com.google.protobuf.Generated +public interface CreateUserGroupRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.marketingplatform.admin.v1alpha.CreateUserGroupRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource where this UserGroup will be created.
+   * Format: organizations/{org_id}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The parent resource where this UserGroup will be created.
+   * Format: organizations/{org_id}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The user group to create.
+   * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroup user_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the userGroup field is set. + */ + boolean hasUserGroup(); + + /** + * + * + *
+   * Required. The user group to create.
+   * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroup user_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The userGroup. + */ + com.google.ads.marketingplatform.admin.v1alpha.UserGroup getUserGroup(); + + /** + * + * + *
+   * Required. The user group to create.
+   * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroup user_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.ads.marketingplatform.admin.v1alpha.UserGroupOrBuilder getUserGroupOrBuilder(); +} diff --git a/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/DeleteUserGroupMemberRequest.java b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/DeleteUserGroupMemberRequest.java new file mode 100644 index 000000000000..54c96ed394e0 --- /dev/null +++ b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/DeleteUserGroupMemberRequest.java @@ -0,0 +1,648 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/marketingplatform/admin/v1alpha/marketingplatform_admin.proto +// Protobuf Java Version: 4.33.6 + +package com.google.ads.marketingplatform.admin.v1alpha; + +/** + * + * + *
+ * Request message for DeleteUserGroupMember RPC.
+ * 
+ * + * Protobuf type {@code google.marketingplatform.admin.v1alpha.DeleteUserGroupMemberRequest} + */ +@com.google.protobuf.Generated +public final class DeleteUserGroupMemberRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.marketingplatform.admin.v1alpha.DeleteUserGroupMemberRequest) + DeleteUserGroupMemberRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "DeleteUserGroupMemberRequest"); + } + + // Use DeleteUserGroupMemberRequest.newBuilder() to construct. + private DeleteUserGroupMemberRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DeleteUserGroupMemberRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_DeleteUserGroupMemberRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_DeleteUserGroupMemberRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupMemberRequest.class, + com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupMemberRequest.Builder + .class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the user group member to delete.
+   * Format:
+   * organizations/{org_id}/userGroups/{user_group_id}/members/{member_id}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The name of the user group member to delete.
+   * Format:
+   * organizations/{org_id}/userGroups/{user_group_id}/members/{member_id}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupMemberRequest)) { + return super.equals(obj); + } + com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupMemberRequest other = + (com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupMemberRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupMemberRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupMemberRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupMemberRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupMemberRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupMemberRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupMemberRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupMemberRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupMemberRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupMemberRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupMemberRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupMemberRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupMemberRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupMemberRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for DeleteUserGroupMember RPC.
+   * 
+ * + * Protobuf type {@code google.marketingplatform.admin.v1alpha.DeleteUserGroupMemberRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.marketingplatform.admin.v1alpha.DeleteUserGroupMemberRequest) + com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupMemberRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_DeleteUserGroupMemberRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_DeleteUserGroupMemberRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupMemberRequest.class, + com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupMemberRequest.Builder + .class); + } + + // Construct using + // com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupMemberRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_DeleteUserGroupMemberRequest_descriptor; + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupMemberRequest + getDefaultInstanceForType() { + return com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupMemberRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupMemberRequest build() { + com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupMemberRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupMemberRequest + buildPartial() { + com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupMemberRequest result = + new com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupMemberRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupMemberRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupMemberRequest) { + return mergeFrom( + (com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupMemberRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupMemberRequest other) { + if (other + == com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupMemberRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The name of the user group member to delete.
+     * Format:
+     * organizations/{org_id}/userGroups/{user_group_id}/members/{member_id}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The name of the user group member to delete.
+     * Format:
+     * organizations/{org_id}/userGroups/{user_group_id}/members/{member_id}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The name of the user group member to delete.
+     * Format:
+     * organizations/{org_id}/userGroups/{user_group_id}/members/{member_id}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the user group member to delete.
+     * Format:
+     * organizations/{org_id}/userGroups/{user_group_id}/members/{member_id}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the user group member to delete.
+     * Format:
+     * organizations/{org_id}/userGroups/{user_group_id}/members/{member_id}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.marketingplatform.admin.v1alpha.DeleteUserGroupMemberRequest) + } + + // @@protoc_insertion_point(class_scope:google.marketingplatform.admin.v1alpha.DeleteUserGroupMemberRequest) + private static final com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupMemberRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupMemberRequest(); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupMemberRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteUserGroupMemberRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupMemberRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/DeleteUserGroupMemberRequestOrBuilder.java b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/DeleteUserGroupMemberRequestOrBuilder.java new file mode 100644 index 000000000000..2cb8764e6bb1 --- /dev/null +++ b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/DeleteUserGroupMemberRequestOrBuilder.java @@ -0,0 +1,62 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/marketingplatform/admin/v1alpha/marketingplatform_admin.proto +// Protobuf Java Version: 4.33.6 + +package com.google.ads.marketingplatform.admin.v1alpha; + +@com.google.protobuf.Generated +public interface DeleteUserGroupMemberRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.marketingplatform.admin.v1alpha.DeleteUserGroupMemberRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the user group member to delete.
+   * Format:
+   * organizations/{org_id}/userGroups/{user_group_id}/members/{member_id}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the user group member to delete.
+   * Format:
+   * organizations/{org_id}/userGroups/{user_group_id}/members/{member_id}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/DeleteUserGroupRequest.java b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/DeleteUserGroupRequest.java new file mode 100644 index 000000000000..976123f4ad17 --- /dev/null +++ b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/DeleteUserGroupRequest.java @@ -0,0 +1,629 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/marketingplatform/admin/v1alpha/marketingplatform_admin.proto +// Protobuf Java Version: 4.33.6 + +package com.google.ads.marketingplatform.admin.v1alpha; + +/** + * + * + *
+ * Request message for DeleteUserGroup RPC.
+ * 
+ * + * Protobuf type {@code google.marketingplatform.admin.v1alpha.DeleteUserGroupRequest} + */ +@com.google.protobuf.Generated +public final class DeleteUserGroupRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.marketingplatform.admin.v1alpha.DeleteUserGroupRequest) + DeleteUserGroupRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "DeleteUserGroupRequest"); + } + + // Use DeleteUserGroupRequest.newBuilder() to construct. + private DeleteUserGroupRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DeleteUserGroupRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_DeleteUserGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_DeleteUserGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupRequest.class, + com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the user group to delete.
+   * Format: organizations/{org_id}/userGroups/{user_group_id}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The name of the user group to delete.
+   * Format: organizations/{org_id}/userGroups/{user_group_id}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupRequest)) { + return super.equals(obj); + } + com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupRequest other = + (com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for DeleteUserGroup RPC.
+   * 
+ * + * Protobuf type {@code google.marketingplatform.admin.v1alpha.DeleteUserGroupRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.marketingplatform.admin.v1alpha.DeleteUserGroupRequest) + com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_DeleteUserGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_DeleteUserGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupRequest.class, + com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupRequest.Builder.class); + } + + // Construct using + // com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_DeleteUserGroupRequest_descriptor; + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupRequest + getDefaultInstanceForType() { + return com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupRequest build() { + com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupRequest buildPartial() { + com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupRequest result = + new com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupRequest) { + return mergeFrom( + (com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupRequest other) { + if (other + == com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The name of the user group to delete.
+     * Format: organizations/{org_id}/userGroups/{user_group_id}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The name of the user group to delete.
+     * Format: organizations/{org_id}/userGroups/{user_group_id}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The name of the user group to delete.
+     * Format: organizations/{org_id}/userGroups/{user_group_id}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the user group to delete.
+     * Format: organizations/{org_id}/userGroups/{user_group_id}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the user group to delete.
+     * Format: organizations/{org_id}/userGroups/{user_group_id}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.marketingplatform.admin.v1alpha.DeleteUserGroupRequest) + } + + // @@protoc_insertion_point(class_scope:google.marketingplatform.admin.v1alpha.DeleteUserGroupRequest) + private static final com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupRequest(); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteUserGroupRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/DeleteUserGroupRequestOrBuilder.java b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/DeleteUserGroupRequestOrBuilder.java new file mode 100644 index 000000000000..847afb3f6690 --- /dev/null +++ b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/DeleteUserGroupRequestOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/marketingplatform/admin/v1alpha/marketingplatform_admin.proto +// Protobuf Java Version: 4.33.6 + +package com.google.ads.marketingplatform.admin.v1alpha; + +@com.google.protobuf.Generated +public interface DeleteUserGroupRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.marketingplatform.admin.v1alpha.DeleteUserGroupRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the user group to delete.
+   * Format: organizations/{org_id}/userGroups/{user_group_id}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the user group to delete.
+   * Format: organizations/{org_id}/userGroups/{user_group_id}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/GetAdminAccessBindingRequest.java b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/GetAdminAccessBindingRequest.java new file mode 100644 index 000000000000..46b5d7aa3261 --- /dev/null +++ b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/GetAdminAccessBindingRequest.java @@ -0,0 +1,648 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/marketingplatform/admin/v1alpha/marketingplatform_admin.proto +// Protobuf Java Version: 4.33.6 + +package com.google.ads.marketingplatform.admin.v1alpha; + +/** + * + * + *
+ * Response message for GetAdminAccessBinding RPC.
+ * 
+ * + * Protobuf type {@code google.marketingplatform.admin.v1alpha.GetAdminAccessBindingRequest} + */ +@com.google.protobuf.Generated +public final class GetAdminAccessBindingRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.marketingplatform.admin.v1alpha.GetAdminAccessBindingRequest) + GetAdminAccessBindingRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "GetAdminAccessBindingRequest"); + } + + // Use GetAdminAccessBindingRequest.newBuilder() to construct. + private GetAdminAccessBindingRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetAdminAccessBindingRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_GetAdminAccessBindingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_GetAdminAccessBindingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.ads.marketingplatform.admin.v1alpha.GetAdminAccessBindingRequest.class, + com.google.ads.marketingplatform.admin.v1alpha.GetAdminAccessBindingRequest.Builder + .class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the AdminAccessBinding to retrieve.
+   * Format:
+   * organizations/{org_id}/adminAccessBindings/{admin_access_binding_id}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The name of the AdminAccessBinding to retrieve.
+   * Format:
+   * organizations/{org_id}/adminAccessBindings/{admin_access_binding_id}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.ads.marketingplatform.admin.v1alpha.GetAdminAccessBindingRequest)) { + return super.equals(obj); + } + com.google.ads.marketingplatform.admin.v1alpha.GetAdminAccessBindingRequest other = + (com.google.ads.marketingplatform.admin.v1alpha.GetAdminAccessBindingRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.ads.marketingplatform.admin.v1alpha.GetAdminAccessBindingRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.GetAdminAccessBindingRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.GetAdminAccessBindingRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.GetAdminAccessBindingRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.GetAdminAccessBindingRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.GetAdminAccessBindingRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.GetAdminAccessBindingRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.GetAdminAccessBindingRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.GetAdminAccessBindingRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.GetAdminAccessBindingRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.GetAdminAccessBindingRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.GetAdminAccessBindingRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.ads.marketingplatform.admin.v1alpha.GetAdminAccessBindingRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response message for GetAdminAccessBinding RPC.
+   * 
+ * + * Protobuf type {@code google.marketingplatform.admin.v1alpha.GetAdminAccessBindingRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.marketingplatform.admin.v1alpha.GetAdminAccessBindingRequest) + com.google.ads.marketingplatform.admin.v1alpha.GetAdminAccessBindingRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_GetAdminAccessBindingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_GetAdminAccessBindingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.ads.marketingplatform.admin.v1alpha.GetAdminAccessBindingRequest.class, + com.google.ads.marketingplatform.admin.v1alpha.GetAdminAccessBindingRequest.Builder + .class); + } + + // Construct using + // com.google.ads.marketingplatform.admin.v1alpha.GetAdminAccessBindingRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_GetAdminAccessBindingRequest_descriptor; + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.GetAdminAccessBindingRequest + getDefaultInstanceForType() { + return com.google.ads.marketingplatform.admin.v1alpha.GetAdminAccessBindingRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.GetAdminAccessBindingRequest build() { + com.google.ads.marketingplatform.admin.v1alpha.GetAdminAccessBindingRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.GetAdminAccessBindingRequest + buildPartial() { + com.google.ads.marketingplatform.admin.v1alpha.GetAdminAccessBindingRequest result = + new com.google.ads.marketingplatform.admin.v1alpha.GetAdminAccessBindingRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.ads.marketingplatform.admin.v1alpha.GetAdminAccessBindingRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.ads.marketingplatform.admin.v1alpha.GetAdminAccessBindingRequest) { + return mergeFrom( + (com.google.ads.marketingplatform.admin.v1alpha.GetAdminAccessBindingRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.ads.marketingplatform.admin.v1alpha.GetAdminAccessBindingRequest other) { + if (other + == com.google.ads.marketingplatform.admin.v1alpha.GetAdminAccessBindingRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The name of the AdminAccessBinding to retrieve.
+     * Format:
+     * organizations/{org_id}/adminAccessBindings/{admin_access_binding_id}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The name of the AdminAccessBinding to retrieve.
+     * Format:
+     * organizations/{org_id}/adminAccessBindings/{admin_access_binding_id}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The name of the AdminAccessBinding to retrieve.
+     * Format:
+     * organizations/{org_id}/adminAccessBindings/{admin_access_binding_id}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the AdminAccessBinding to retrieve.
+     * Format:
+     * organizations/{org_id}/adminAccessBindings/{admin_access_binding_id}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the AdminAccessBinding to retrieve.
+     * Format:
+     * organizations/{org_id}/adminAccessBindings/{admin_access_binding_id}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.marketingplatform.admin.v1alpha.GetAdminAccessBindingRequest) + } + + // @@protoc_insertion_point(class_scope:google.marketingplatform.admin.v1alpha.GetAdminAccessBindingRequest) + private static final com.google.ads.marketingplatform.admin.v1alpha.GetAdminAccessBindingRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.ads.marketingplatform.admin.v1alpha.GetAdminAccessBindingRequest(); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.GetAdminAccessBindingRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetAdminAccessBindingRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.GetAdminAccessBindingRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/GetAdminAccessBindingRequestOrBuilder.java b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/GetAdminAccessBindingRequestOrBuilder.java new file mode 100644 index 000000000000..3b183a881bf2 --- /dev/null +++ b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/GetAdminAccessBindingRequestOrBuilder.java @@ -0,0 +1,62 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/marketingplatform/admin/v1alpha/marketingplatform_admin.proto +// Protobuf Java Version: 4.33.6 + +package com.google.ads.marketingplatform.admin.v1alpha; + +@com.google.protobuf.Generated +public interface GetAdminAccessBindingRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.marketingplatform.admin.v1alpha.GetAdminAccessBindingRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the AdminAccessBinding to retrieve.
+   * Format:
+   * organizations/{org_id}/adminAccessBindings/{admin_access_binding_id}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the AdminAccessBinding to retrieve.
+   * Format:
+   * organizations/{org_id}/adminAccessBindings/{admin_access_binding_id}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/GetUserGroupMemberRequest.java b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/GetUserGroupMemberRequest.java new file mode 100644 index 000000000000..3a50e14a7d90 --- /dev/null +++ b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/GetUserGroupMemberRequest.java @@ -0,0 +1,641 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/marketingplatform/admin/v1alpha/marketingplatform_admin.proto +// Protobuf Java Version: 4.33.6 + +package com.google.ads.marketingplatform.admin.v1alpha; + +/** + * + * + *
+ * Request message for GetUserGroupMember RPC.
+ * 
+ * + * Protobuf type {@code google.marketingplatform.admin.v1alpha.GetUserGroupMemberRequest} + */ +@com.google.protobuf.Generated +public final class GetUserGroupMemberRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.marketingplatform.admin.v1alpha.GetUserGroupMemberRequest) + GetUserGroupMemberRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "GetUserGroupMemberRequest"); + } + + // Use GetUserGroupMemberRequest.newBuilder() to construct. + private GetUserGroupMemberRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetUserGroupMemberRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_GetUserGroupMemberRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_GetUserGroupMemberRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupMemberRequest.class, + com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupMemberRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the user group member to retrieve.
+   * Format:
+   * organizations/{org_id}/userGroups/{user_group_id}/members/{member_id}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The name of the user group member to retrieve.
+   * Format:
+   * organizations/{org_id}/userGroups/{user_group_id}/members/{member_id}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupMemberRequest)) { + return super.equals(obj); + } + com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupMemberRequest other = + (com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupMemberRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupMemberRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupMemberRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupMemberRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupMemberRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupMemberRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupMemberRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupMemberRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupMemberRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupMemberRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupMemberRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupMemberRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupMemberRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupMemberRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for GetUserGroupMember RPC.
+   * 
+ * + * Protobuf type {@code google.marketingplatform.admin.v1alpha.GetUserGroupMemberRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.marketingplatform.admin.v1alpha.GetUserGroupMemberRequest) + com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupMemberRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_GetUserGroupMemberRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_GetUserGroupMemberRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupMemberRequest.class, + com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupMemberRequest.Builder + .class); + } + + // Construct using + // com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupMemberRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_GetUserGroupMemberRequest_descriptor; + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupMemberRequest + getDefaultInstanceForType() { + return com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupMemberRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupMemberRequest build() { + com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupMemberRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupMemberRequest buildPartial() { + com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupMemberRequest result = + new com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupMemberRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupMemberRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupMemberRequest) { + return mergeFrom( + (com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupMemberRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupMemberRequest other) { + if (other + == com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupMemberRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The name of the user group member to retrieve.
+     * Format:
+     * organizations/{org_id}/userGroups/{user_group_id}/members/{member_id}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The name of the user group member to retrieve.
+     * Format:
+     * organizations/{org_id}/userGroups/{user_group_id}/members/{member_id}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The name of the user group member to retrieve.
+     * Format:
+     * organizations/{org_id}/userGroups/{user_group_id}/members/{member_id}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the user group member to retrieve.
+     * Format:
+     * organizations/{org_id}/userGroups/{user_group_id}/members/{member_id}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the user group member to retrieve.
+     * Format:
+     * organizations/{org_id}/userGroups/{user_group_id}/members/{member_id}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.marketingplatform.admin.v1alpha.GetUserGroupMemberRequest) + } + + // @@protoc_insertion_point(class_scope:google.marketingplatform.admin.v1alpha.GetUserGroupMemberRequest) + private static final com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupMemberRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupMemberRequest(); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupMemberRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetUserGroupMemberRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupMemberRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/GetUserGroupMemberRequestOrBuilder.java b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/GetUserGroupMemberRequestOrBuilder.java new file mode 100644 index 000000000000..b8a04ae35e4b --- /dev/null +++ b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/GetUserGroupMemberRequestOrBuilder.java @@ -0,0 +1,62 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/marketingplatform/admin/v1alpha/marketingplatform_admin.proto +// Protobuf Java Version: 4.33.6 + +package com.google.ads.marketingplatform.admin.v1alpha; + +@com.google.protobuf.Generated +public interface GetUserGroupMemberRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.marketingplatform.admin.v1alpha.GetUserGroupMemberRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the user group member to retrieve.
+   * Format:
+   * organizations/{org_id}/userGroups/{user_group_id}/members/{member_id}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the user group member to retrieve.
+   * Format:
+   * organizations/{org_id}/userGroups/{user_group_id}/members/{member_id}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/GetUserGroupRequest.java b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/GetUserGroupRequest.java new file mode 100644 index 000000000000..c53ff0d898f1 --- /dev/null +++ b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/GetUserGroupRequest.java @@ -0,0 +1,629 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/marketingplatform/admin/v1alpha/marketingplatform_admin.proto +// Protobuf Java Version: 4.33.6 + +package com.google.ads.marketingplatform.admin.v1alpha; + +/** + * + * + *
+ * Request message for GetUserGroup RPC.
+ * 
+ * + * Protobuf type {@code google.marketingplatform.admin.v1alpha.GetUserGroupRequest} + */ +@com.google.protobuf.Generated +public final class GetUserGroupRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.marketingplatform.admin.v1alpha.GetUserGroupRequest) + GetUserGroupRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "GetUserGroupRequest"); + } + + // Use GetUserGroupRequest.newBuilder() to construct. + private GetUserGroupRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetUserGroupRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_GetUserGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_GetUserGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupRequest.class, + com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the UserGroup to retrieve.
+   * Format: organizations/{org_id}/userGroups/{user_group_id}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The name of the UserGroup to retrieve.
+   * Format: organizations/{org_id}/userGroups/{user_group_id}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupRequest)) { + return super.equals(obj); + } + com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupRequest other = + (com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for GetUserGroup RPC.
+   * 
+ * + * Protobuf type {@code google.marketingplatform.admin.v1alpha.GetUserGroupRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.marketingplatform.admin.v1alpha.GetUserGroupRequest) + com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_GetUserGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_GetUserGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupRequest.class, + com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupRequest.Builder.class); + } + + // Construct using + // com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_GetUserGroupRequest_descriptor; + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupRequest + getDefaultInstanceForType() { + return com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupRequest build() { + com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupRequest buildPartial() { + com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupRequest result = + new com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupRequest) { + return mergeFrom( + (com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupRequest other) { + if (other + == com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The name of the UserGroup to retrieve.
+     * Format: organizations/{org_id}/userGroups/{user_group_id}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The name of the UserGroup to retrieve.
+     * Format: organizations/{org_id}/userGroups/{user_group_id}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The name of the UserGroup to retrieve.
+     * Format: organizations/{org_id}/userGroups/{user_group_id}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the UserGroup to retrieve.
+     * Format: organizations/{org_id}/userGroups/{user_group_id}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the UserGroup to retrieve.
+     * Format: organizations/{org_id}/userGroups/{user_group_id}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.marketingplatform.admin.v1alpha.GetUserGroupRequest) + } + + // @@protoc_insertion_point(class_scope:google.marketingplatform.admin.v1alpha.GetUserGroupRequest) + private static final com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupRequest(); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetUserGroupRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/GetUserGroupRequestOrBuilder.java b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/GetUserGroupRequestOrBuilder.java new file mode 100644 index 000000000000..6563a2790599 --- /dev/null +++ b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/GetUserGroupRequestOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/marketingplatform/admin/v1alpha/marketingplatform_admin.proto +// Protobuf Java Version: 4.33.6 + +package com.google.ads.marketingplatform.admin.v1alpha; + +@com.google.protobuf.Generated +public interface GetUserGroupRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.marketingplatform.admin.v1alpha.GetUserGroupRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the UserGroup to retrieve.
+   * Format: organizations/{org_id}/userGroups/{user_group_id}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the UserGroup to retrieve.
+   * Format: organizations/{org_id}/userGroups/{user_group_id}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/ListAdminAccessBindingsRequest.java b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/ListAdminAccessBindingsRequest.java new file mode 100644 index 000000000000..c5cdf3eea85f --- /dev/null +++ b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/ListAdminAccessBindingsRequest.java @@ -0,0 +1,979 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/marketingplatform/admin/v1alpha/marketingplatform_admin.proto +// Protobuf Java Version: 4.33.6 + +package com.google.ads.marketingplatform.admin.v1alpha; + +/** + * + * + *
+ * Request message for ListAdminAccessBindings RPC.
+ * 
+ * + * Protobuf type {@code google.marketingplatform.admin.v1alpha.ListAdminAccessBindingsRequest} + */ +@com.google.protobuf.Generated +public final class ListAdminAccessBindingsRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.marketingplatform.admin.v1alpha.ListAdminAccessBindingsRequest) + ListAdminAccessBindingsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ListAdminAccessBindingsRequest"); + } + + // Use ListAdminAccessBindingsRequest.newBuilder() to construct. + private ListAdminAccessBindingsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListAdminAccessBindingsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_ListAdminAccessBindingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_ListAdminAccessBindingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsRequest.class, + com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsRequest.Builder + .class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The parent organization, which owns this collection of Admin
+   * Access Bindings. Format: organizations/{org_id}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The parent organization, which owns this collection of Admin
+   * Access Bindings. Format: organizations/{org_id}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + + /** + * + * + *
+   * Optional. The maximum number of Admin Access Bindings to return in one
+   * call. The service may return fewer than this value.
+   *
+   * If unspecified, at most 50 Admin Access Bindings will be returned. The
+   * maximum value is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * Optional. A page token, received from a previous ListAdminAccessBindings
+   * call. Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `ListAdminAccessBindings` must match the call that provided the page
+   * token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A page token, received from a previous ListAdminAccessBindings
+   * call. Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `ListAdminAccessBindings` must match the call that provided the page
+   * token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsRequest)) { + return super.equals(obj); + } + com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsRequest other = + (com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for ListAdminAccessBindings RPC.
+   * 
+ * + * Protobuf type {@code google.marketingplatform.admin.v1alpha.ListAdminAccessBindingsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.marketingplatform.admin.v1alpha.ListAdminAccessBindingsRequest) + com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_ListAdminAccessBindingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_ListAdminAccessBindingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsRequest.class, + com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsRequest.Builder + .class); + } + + // Construct using + // com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_ListAdminAccessBindingsRequest_descriptor; + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsRequest + getDefaultInstanceForType() { + return com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsRequest build() { + com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsRequest + buildPartial() { + com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsRequest result = + new com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsRequest) { + return mergeFrom( + (com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsRequest other) { + if (other + == com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. The parent organization, which owns this collection of Admin
+     * Access Bindings. Format: organizations/{org_id}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The parent organization, which owns this collection of Admin
+     * Access Bindings. Format: organizations/{org_id}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The parent organization, which owns this collection of Admin
+     * Access Bindings. Format: organizations/{org_id}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The parent organization, which owns this collection of Admin
+     * Access Bindings. Format: organizations/{org_id}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The parent organization, which owns this collection of Admin
+     * Access Bindings. Format: organizations/{org_id}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + + /** + * + * + *
+     * Optional. The maximum number of Admin Access Bindings to return in one
+     * call. The service may return fewer than this value.
+     *
+     * If unspecified, at most 50 Admin Access Bindings will be returned. The
+     * maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. The maximum number of Admin Access Bindings to return in one
+     * call. The service may return fewer than this value.
+     *
+     * If unspecified, at most 50 Admin Access Bindings will be returned. The
+     * maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The maximum number of Admin Access Bindings to return in one
+     * call. The service may return fewer than this value.
+     *
+     * If unspecified, at most 50 Admin Access Bindings will be returned. The
+     * maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. A page token, received from a previous ListAdminAccessBindings
+     * call. Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListAdminAccessBindings` must match the call that provided the page
+     * token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous ListAdminAccessBindings
+     * call. Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListAdminAccessBindings` must match the call that provided the page
+     * token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous ListAdminAccessBindings
+     * call. Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListAdminAccessBindings` must match the call that provided the page
+     * token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous ListAdminAccessBindings
+     * call. Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListAdminAccessBindings` must match the call that provided the page
+     * token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous ListAdminAccessBindings
+     * call. Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListAdminAccessBindings` must match the call that provided the page
+     * token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.marketingplatform.admin.v1alpha.ListAdminAccessBindingsRequest) + } + + // @@protoc_insertion_point(class_scope:google.marketingplatform.admin.v1alpha.ListAdminAccessBindingsRequest) + private static final com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsRequest(); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAdminAccessBindingsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/ListAdminAccessBindingsRequestOrBuilder.java b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/ListAdminAccessBindingsRequestOrBuilder.java new file mode 100644 index 000000000000..37d1fc6d6cea --- /dev/null +++ b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/ListAdminAccessBindingsRequestOrBuilder.java @@ -0,0 +1,113 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/marketingplatform/admin/v1alpha/marketingplatform_admin.proto +// Protobuf Java Version: 4.33.6 + +package com.google.ads.marketingplatform.admin.v1alpha; + +@com.google.protobuf.Generated +public interface ListAdminAccessBindingsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.marketingplatform.admin.v1alpha.ListAdminAccessBindingsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent organization, which owns this collection of Admin
+   * Access Bindings. Format: organizations/{org_id}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The parent organization, which owns this collection of Admin
+   * Access Bindings. Format: organizations/{org_id}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. The maximum number of Admin Access Bindings to return in one
+   * call. The service may return fewer than this value.
+   *
+   * If unspecified, at most 50 Admin Access Bindings will be returned. The
+   * maximum value is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A page token, received from a previous ListAdminAccessBindings
+   * call. Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `ListAdminAccessBindings` must match the call that provided the page
+   * token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A page token, received from a previous ListAdminAccessBindings
+   * call. Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `ListAdminAccessBindings` must match the call that provided the page
+   * token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/ListAdminAccessBindingsResponse.java b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/ListAdminAccessBindingsResponse.java new file mode 100644 index 000000000000..ff42ddbf5b32 --- /dev/null +++ b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/ListAdminAccessBindingsResponse.java @@ -0,0 +1,1224 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/marketingplatform/admin/v1alpha/marketingplatform_admin.proto +// Protobuf Java Version: 4.33.6 + +package com.google.ads.marketingplatform.admin.v1alpha; + +/** + * + * + *
+ * Response message for ListAdminAccessBindings RPC.
+ * 
+ * + * Protobuf type {@code google.marketingplatform.admin.v1alpha.ListAdminAccessBindingsResponse} + */ +@com.google.protobuf.Generated +public final class ListAdminAccessBindingsResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.marketingplatform.admin.v1alpha.ListAdminAccessBindingsResponse) + ListAdminAccessBindingsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ListAdminAccessBindingsResponse"); + } + + // Use ListAdminAccessBindingsResponse.newBuilder() to construct. + private ListAdminAccessBindingsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListAdminAccessBindingsResponse() { + adminAccessBindings_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_ListAdminAccessBindingsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_ListAdminAccessBindingsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsResponse.class, + com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsResponse.Builder + .class); + } + + public static final int ADMIN_ACCESS_BINDINGS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List + adminAccessBindings_; + + /** + * + * + *
+   * Admin Access Bindings in the organization.
+   * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.AdminAccessBinding admin_access_bindings = 1; + * + */ + @java.lang.Override + public java.util.List + getAdminAccessBindingsList() { + return adminAccessBindings_; + } + + /** + * + * + *
+   * Admin Access Bindings in the organization.
+   * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.AdminAccessBinding admin_access_bindings = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBindingOrBuilder> + getAdminAccessBindingsOrBuilderList() { + return adminAccessBindings_; + } + + /** + * + * + *
+   * Admin Access Bindings in the organization.
+   * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.AdminAccessBinding admin_access_bindings = 1; + * + */ + @java.lang.Override + public int getAdminAccessBindingsCount() { + return adminAccessBindings_.size(); + } + + /** + * + * + *
+   * Admin Access Bindings in the organization.
+   * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.AdminAccessBinding admin_access_bindings = 1; + * + */ + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding getAdminAccessBindings( + int index) { + return adminAccessBindings_.get(index); + } + + /** + * + * + *
+   * Admin Access Bindings in the organization.
+   * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.AdminAccessBinding admin_access_bindings = 1; + * + */ + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBindingOrBuilder + getAdminAccessBindingsOrBuilder(int index) { + return adminAccessBindings_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < adminAccessBindings_.size(); i++) { + output.writeMessage(1, adminAccessBindings_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < adminAccessBindings_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, adminAccessBindings_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsResponse)) { + return super.equals(obj); + } + com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsResponse other = + (com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsResponse) obj; + + if (!getAdminAccessBindingsList().equals(other.getAdminAccessBindingsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getAdminAccessBindingsCount() > 0) { + hash = (37 * hash) + ADMIN_ACCESS_BINDINGS_FIELD_NUMBER; + hash = (53 * hash) + getAdminAccessBindingsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsResponse + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsResponse + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsResponse + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsResponse + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsResponse + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsResponse + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsResponse + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsResponse + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsResponse + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsResponse + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response message for ListAdminAccessBindings RPC.
+   * 
+ * + * Protobuf type {@code google.marketingplatform.admin.v1alpha.ListAdminAccessBindingsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.marketingplatform.admin.v1alpha.ListAdminAccessBindingsResponse) + com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_ListAdminAccessBindingsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_ListAdminAccessBindingsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsResponse.class, + com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsResponse.Builder + .class); + } + + // Construct using + // com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (adminAccessBindingsBuilder_ == null) { + adminAccessBindings_ = java.util.Collections.emptyList(); + } else { + adminAccessBindings_ = null; + adminAccessBindingsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_ListAdminAccessBindingsResponse_descriptor; + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsResponse + getDefaultInstanceForType() { + return com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsResponse build() { + com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsResponse + buildPartial() { + com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsResponse result = + new com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsResponse result) { + if (adminAccessBindingsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + adminAccessBindings_ = java.util.Collections.unmodifiableList(adminAccessBindings_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.adminAccessBindings_ = adminAccessBindings_; + } else { + result.adminAccessBindings_ = adminAccessBindingsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsResponse) { + return mergeFrom( + (com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsResponse other) { + if (other + == com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsResponse + .getDefaultInstance()) return this; + if (adminAccessBindingsBuilder_ == null) { + if (!other.adminAccessBindings_.isEmpty()) { + if (adminAccessBindings_.isEmpty()) { + adminAccessBindings_ = other.adminAccessBindings_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAdminAccessBindingsIsMutable(); + adminAccessBindings_.addAll(other.adminAccessBindings_); + } + onChanged(); + } + } else { + if (!other.adminAccessBindings_.isEmpty()) { + if (adminAccessBindingsBuilder_.isEmpty()) { + adminAccessBindingsBuilder_.dispose(); + adminAccessBindingsBuilder_ = null; + adminAccessBindings_ = other.adminAccessBindings_; + bitField0_ = (bitField0_ & ~0x00000001); + adminAccessBindingsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetAdminAccessBindingsFieldBuilder() + : null; + } else { + adminAccessBindingsBuilder_.addAllMessages(other.adminAccessBindings_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding m = + input.readMessage( + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding.parser(), + extensionRegistry); + if (adminAccessBindingsBuilder_ == null) { + ensureAdminAccessBindingsIsMutable(); + adminAccessBindings_.add(m); + } else { + adminAccessBindingsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List + adminAccessBindings_ = java.util.Collections.emptyList(); + + private void ensureAdminAccessBindingsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + adminAccessBindings_ = + new java.util.ArrayList< + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding>( + adminAccessBindings_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding, + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding.Builder, + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBindingOrBuilder> + adminAccessBindingsBuilder_; + + /** + * + * + *
+     * Admin Access Bindings in the organization.
+     * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.AdminAccessBinding admin_access_bindings = 1; + * + */ + public java.util.List + getAdminAccessBindingsList() { + if (adminAccessBindingsBuilder_ == null) { + return java.util.Collections.unmodifiableList(adminAccessBindings_); + } else { + return adminAccessBindingsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Admin Access Bindings in the organization.
+     * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.AdminAccessBinding admin_access_bindings = 1; + * + */ + public int getAdminAccessBindingsCount() { + if (adminAccessBindingsBuilder_ == null) { + return adminAccessBindings_.size(); + } else { + return adminAccessBindingsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Admin Access Bindings in the organization.
+     * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.AdminAccessBinding admin_access_bindings = 1; + * + */ + public com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding getAdminAccessBindings( + int index) { + if (adminAccessBindingsBuilder_ == null) { + return adminAccessBindings_.get(index); + } else { + return adminAccessBindingsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Admin Access Bindings in the organization.
+     * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.AdminAccessBinding admin_access_bindings = 1; + * + */ + public Builder setAdminAccessBindings( + int index, com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding value) { + if (adminAccessBindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAdminAccessBindingsIsMutable(); + adminAccessBindings_.set(index, value); + onChanged(); + } else { + adminAccessBindingsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Admin Access Bindings in the organization.
+     * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.AdminAccessBinding admin_access_bindings = 1; + * + */ + public Builder setAdminAccessBindings( + int index, + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding.Builder builderForValue) { + if (adminAccessBindingsBuilder_ == null) { + ensureAdminAccessBindingsIsMutable(); + adminAccessBindings_.set(index, builderForValue.build()); + onChanged(); + } else { + adminAccessBindingsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Admin Access Bindings in the organization.
+     * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.AdminAccessBinding admin_access_bindings = 1; + * + */ + public Builder addAdminAccessBindings( + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding value) { + if (adminAccessBindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAdminAccessBindingsIsMutable(); + adminAccessBindings_.add(value); + onChanged(); + } else { + adminAccessBindingsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Admin Access Bindings in the organization.
+     * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.AdminAccessBinding admin_access_bindings = 1; + * + */ + public Builder addAdminAccessBindings( + int index, com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding value) { + if (adminAccessBindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAdminAccessBindingsIsMutable(); + adminAccessBindings_.add(index, value); + onChanged(); + } else { + adminAccessBindingsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Admin Access Bindings in the organization.
+     * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.AdminAccessBinding admin_access_bindings = 1; + * + */ + public Builder addAdminAccessBindings( + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding.Builder builderForValue) { + if (adminAccessBindingsBuilder_ == null) { + ensureAdminAccessBindingsIsMutable(); + adminAccessBindings_.add(builderForValue.build()); + onChanged(); + } else { + adminAccessBindingsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Admin Access Bindings in the organization.
+     * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.AdminAccessBinding admin_access_bindings = 1; + * + */ + public Builder addAdminAccessBindings( + int index, + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding.Builder builderForValue) { + if (adminAccessBindingsBuilder_ == null) { + ensureAdminAccessBindingsIsMutable(); + adminAccessBindings_.add(index, builderForValue.build()); + onChanged(); + } else { + adminAccessBindingsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Admin Access Bindings in the organization.
+     * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.AdminAccessBinding admin_access_bindings = 1; + * + */ + public Builder addAllAdminAccessBindings( + java.lang.Iterable< + ? extends com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding> + values) { + if (adminAccessBindingsBuilder_ == null) { + ensureAdminAccessBindingsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, adminAccessBindings_); + onChanged(); + } else { + adminAccessBindingsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Admin Access Bindings in the organization.
+     * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.AdminAccessBinding admin_access_bindings = 1; + * + */ + public Builder clearAdminAccessBindings() { + if (adminAccessBindingsBuilder_ == null) { + adminAccessBindings_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + adminAccessBindingsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Admin Access Bindings in the organization.
+     * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.AdminAccessBinding admin_access_bindings = 1; + * + */ + public Builder removeAdminAccessBindings(int index) { + if (adminAccessBindingsBuilder_ == null) { + ensureAdminAccessBindingsIsMutable(); + adminAccessBindings_.remove(index); + onChanged(); + } else { + adminAccessBindingsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Admin Access Bindings in the organization.
+     * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.AdminAccessBinding admin_access_bindings = 1; + * + */ + public com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding.Builder + getAdminAccessBindingsBuilder(int index) { + return internalGetAdminAccessBindingsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Admin Access Bindings in the organization.
+     * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.AdminAccessBinding admin_access_bindings = 1; + * + */ + public com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBindingOrBuilder + getAdminAccessBindingsOrBuilder(int index) { + if (adminAccessBindingsBuilder_ == null) { + return adminAccessBindings_.get(index); + } else { + return adminAccessBindingsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Admin Access Bindings in the organization.
+     * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.AdminAccessBinding admin_access_bindings = 1; + * + */ + public java.util.List< + ? extends com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBindingOrBuilder> + getAdminAccessBindingsOrBuilderList() { + if (adminAccessBindingsBuilder_ != null) { + return adminAccessBindingsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(adminAccessBindings_); + } + } + + /** + * + * + *
+     * Admin Access Bindings in the organization.
+     * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.AdminAccessBinding admin_access_bindings = 1; + * + */ + public com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding.Builder + addAdminAccessBindingsBuilder() { + return internalGetAdminAccessBindingsFieldBuilder() + .addBuilder( + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding + .getDefaultInstance()); + } + + /** + * + * + *
+     * Admin Access Bindings in the organization.
+     * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.AdminAccessBinding admin_access_bindings = 1; + * + */ + public com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding.Builder + addAdminAccessBindingsBuilder(int index) { + return internalGetAdminAccessBindingsFieldBuilder() + .addBuilder( + index, + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding + .getDefaultInstance()); + } + + /** + * + * + *
+     * Admin Access Bindings in the organization.
+     * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.AdminAccessBinding admin_access_bindings = 1; + * + */ + public java.util.List + getAdminAccessBindingsBuilderList() { + return internalGetAdminAccessBindingsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding, + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding.Builder, + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBindingOrBuilder> + internalGetAdminAccessBindingsFieldBuilder() { + if (adminAccessBindingsBuilder_ == null) { + adminAccessBindingsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding, + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding.Builder, + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBindingOrBuilder>( + adminAccessBindings_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + adminAccessBindings_ = null; + } + return adminAccessBindingsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.marketingplatform.admin.v1alpha.ListAdminAccessBindingsResponse) + } + + // @@protoc_insertion_point(class_scope:google.marketingplatform.admin.v1alpha.ListAdminAccessBindingsResponse) + private static final com.google.ads.marketingplatform.admin.v1alpha + .ListAdminAccessBindingsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsResponse(); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAdminAccessBindingsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/ListAdminAccessBindingsResponseOrBuilder.java b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/ListAdminAccessBindingsResponseOrBuilder.java new file mode 100644 index 000000000000..5ec4c39d850c --- /dev/null +++ b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/ListAdminAccessBindingsResponseOrBuilder.java @@ -0,0 +1,126 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/marketingplatform/admin/v1alpha/marketingplatform_admin.proto +// Protobuf Java Version: 4.33.6 + +package com.google.ads.marketingplatform.admin.v1alpha; + +@com.google.protobuf.Generated +public interface ListAdminAccessBindingsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.marketingplatform.admin.v1alpha.ListAdminAccessBindingsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Admin Access Bindings in the organization.
+   * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.AdminAccessBinding admin_access_bindings = 1; + * + */ + java.util.List + getAdminAccessBindingsList(); + + /** + * + * + *
+   * Admin Access Bindings in the organization.
+   * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.AdminAccessBinding admin_access_bindings = 1; + * + */ + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding getAdminAccessBindings( + int index); + + /** + * + * + *
+   * Admin Access Bindings in the organization.
+   * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.AdminAccessBinding admin_access_bindings = 1; + * + */ + int getAdminAccessBindingsCount(); + + /** + * + * + *
+   * Admin Access Bindings in the organization.
+   * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.AdminAccessBinding admin_access_bindings = 1; + * + */ + java.util.List< + ? extends com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBindingOrBuilder> + getAdminAccessBindingsOrBuilderList(); + + /** + * + * + *
+   * Admin Access Bindings in the organization.
+   * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.AdminAccessBinding admin_access_bindings = 1; + * + */ + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBindingOrBuilder + getAdminAccessBindingsOrBuilder(int index); + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/ListUserGroupMembersRequest.java b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/ListUserGroupMembersRequest.java new file mode 100644 index 000000000000..d3e567eae9b4 --- /dev/null +++ b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/ListUserGroupMembersRequest.java @@ -0,0 +1,971 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/marketingplatform/admin/v1alpha/marketingplatform_admin.proto +// Protobuf Java Version: 4.33.6 + +package com.google.ads.marketingplatform.admin.v1alpha; + +/** + * + * + *
+ * Request message for ListUserGroupMembers RPC.
+ * 
+ * + * Protobuf type {@code google.marketingplatform.admin.v1alpha.ListUserGroupMembersRequest} + */ +@com.google.protobuf.Generated +public final class ListUserGroupMembersRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.marketingplatform.admin.v1alpha.ListUserGroupMembersRequest) + ListUserGroupMembersRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ListUserGroupMembersRequest"); + } + + // Use ListUserGroupMembersRequest.newBuilder() to construct. + private ListUserGroupMembersRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListUserGroupMembersRequest() { + parent_ = ""; + pageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_ListUserGroupMembersRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_ListUserGroupMembersRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersRequest.class, + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersRequest.Builder + .class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The parent user group where this UserGroupMember will be listed.
+   * Format: organizations/{org_id}/userGroups/{user_group_id}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The parent user group where this UserGroupMember will be listed.
+   * Format: organizations/{org_id}/userGroups/{user_group_id}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + + /** + * + * + *
+   * Optional. The maximum number of user group members to return in one call.
+   * The service may return fewer than this value.
+   *
+   * If unspecified, at most 50 user group members will be returned. The
+   * maximum value is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * Optional. A page token, received from a previous ListUserGroupMembers call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `ListUserGroupMembers` must match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A page token, received from a previous ListUserGroupMembers call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `ListUserGroupMembers` must match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersRequest)) { + return super.equals(obj); + } + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersRequest other = + (com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for ListUserGroupMembers RPC.
+   * 
+ * + * Protobuf type {@code google.marketingplatform.admin.v1alpha.ListUserGroupMembersRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.marketingplatform.admin.v1alpha.ListUserGroupMembersRequest) + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_ListUserGroupMembersRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_ListUserGroupMembersRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersRequest.class, + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersRequest.Builder + .class); + } + + // Construct using + // com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_ListUserGroupMembersRequest_descriptor; + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersRequest + getDefaultInstanceForType() { + return com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersRequest build() { + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersRequest + buildPartial() { + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersRequest result = + new com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersRequest) { + return mergeFrom( + (com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersRequest other) { + if (other + == com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. The parent user group where this UserGroupMember will be listed.
+     * Format: organizations/{org_id}/userGroups/{user_group_id}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The parent user group where this UserGroupMember will be listed.
+     * Format: organizations/{org_id}/userGroups/{user_group_id}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The parent user group where this UserGroupMember will be listed.
+     * Format: organizations/{org_id}/userGroups/{user_group_id}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The parent user group where this UserGroupMember will be listed.
+     * Format: organizations/{org_id}/userGroups/{user_group_id}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The parent user group where this UserGroupMember will be listed.
+     * Format: organizations/{org_id}/userGroups/{user_group_id}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + + /** + * + * + *
+     * Optional. The maximum number of user group members to return in one call.
+     * The service may return fewer than this value.
+     *
+     * If unspecified, at most 50 user group members will be returned. The
+     * maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. The maximum number of user group members to return in one call.
+     * The service may return fewer than this value.
+     *
+     * If unspecified, at most 50 user group members will be returned. The
+     * maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The maximum number of user group members to return in one call.
+     * The service may return fewer than this value.
+     *
+     * If unspecified, at most 50 user group members will be returned. The
+     * maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. A page token, received from a previous ListUserGroupMembers call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListUserGroupMembers` must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous ListUserGroupMembers call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListUserGroupMembers` must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous ListUserGroupMembers call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListUserGroupMembers` must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous ListUserGroupMembers call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListUserGroupMembers` must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous ListUserGroupMembers call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListUserGroupMembers` must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.marketingplatform.admin.v1alpha.ListUserGroupMembersRequest) + } + + // @@protoc_insertion_point(class_scope:google.marketingplatform.admin.v1alpha.ListUserGroupMembersRequest) + private static final com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersRequest(); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListUserGroupMembersRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/ListUserGroupMembersRequestOrBuilder.java b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/ListUserGroupMembersRequestOrBuilder.java new file mode 100644 index 000000000000..393fdd4351ae --- /dev/null +++ b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/ListUserGroupMembersRequestOrBuilder.java @@ -0,0 +1,111 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/marketingplatform/admin/v1alpha/marketingplatform_admin.proto +// Protobuf Java Version: 4.33.6 + +package com.google.ads.marketingplatform.admin.v1alpha; + +@com.google.protobuf.Generated +public interface ListUserGroupMembersRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.marketingplatform.admin.v1alpha.ListUserGroupMembersRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent user group where this UserGroupMember will be listed.
+   * Format: organizations/{org_id}/userGroups/{user_group_id}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The parent user group where this UserGroupMember will be listed.
+   * Format: organizations/{org_id}/userGroups/{user_group_id}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. The maximum number of user group members to return in one call.
+   * The service may return fewer than this value.
+   *
+   * If unspecified, at most 50 user group members will be returned. The
+   * maximum value is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A page token, received from a previous ListUserGroupMembers call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `ListUserGroupMembers` must match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A page token, received from a previous ListUserGroupMembers call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `ListUserGroupMembers` must match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/ListUserGroupMembersResponse.java b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/ListUserGroupMembersResponse.java new file mode 100644 index 000000000000..047527acde91 --- /dev/null +++ b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/ListUserGroupMembersResponse.java @@ -0,0 +1,1211 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/marketingplatform/admin/v1alpha/marketingplatform_admin.proto +// Protobuf Java Version: 4.33.6 + +package com.google.ads.marketingplatform.admin.v1alpha; + +/** + * + * + *
+ * Response message for ListUserGroupMembers RPC.
+ * 
+ * + * Protobuf type {@code google.marketingplatform.admin.v1alpha.ListUserGroupMembersResponse} + */ +@com.google.protobuf.Generated +public final class ListUserGroupMembersResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.marketingplatform.admin.v1alpha.ListUserGroupMembersResponse) + ListUserGroupMembersResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ListUserGroupMembersResponse"); + } + + // Use ListUserGroupMembersResponse.newBuilder() to construct. + private ListUserGroupMembersResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListUserGroupMembersResponse() { + userGroupMembers_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_ListUserGroupMembersResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_ListUserGroupMembersResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersResponse.class, + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersResponse.Builder + .class); + } + + public static final int USER_GROUP_MEMBERS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List + userGroupMembers_; + + /** + * + * + *
+   * User group members in the user group.
+   * 
+ * + * repeated .google.marketingplatform.admin.v1alpha.UserGroupMember user_group_members = 1; + * + */ + @java.lang.Override + public java.util.List + getUserGroupMembersList() { + return userGroupMembers_; + } + + /** + * + * + *
+   * User group members in the user group.
+   * 
+ * + * repeated .google.marketingplatform.admin.v1alpha.UserGroupMember user_group_members = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.ads.marketingplatform.admin.v1alpha.UserGroupMemberOrBuilder> + getUserGroupMembersOrBuilderList() { + return userGroupMembers_; + } + + /** + * + * + *
+   * User group members in the user group.
+   * 
+ * + * repeated .google.marketingplatform.admin.v1alpha.UserGroupMember user_group_members = 1; + * + */ + @java.lang.Override + public int getUserGroupMembersCount() { + return userGroupMembers_.size(); + } + + /** + * + * + *
+   * User group members in the user group.
+   * 
+ * + * repeated .google.marketingplatform.admin.v1alpha.UserGroupMember user_group_members = 1; + * + */ + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember getUserGroupMembers( + int index) { + return userGroupMembers_.get(index); + } + + /** + * + * + *
+   * User group members in the user group.
+   * 
+ * + * repeated .google.marketingplatform.admin.v1alpha.UserGroupMember user_group_members = 1; + * + */ + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.UserGroupMemberOrBuilder + getUserGroupMembersOrBuilder(int index) { + return userGroupMembers_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < userGroupMembers_.size(); i++) { + output.writeMessage(1, userGroupMembers_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < userGroupMembers_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, userGroupMembers_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersResponse)) { + return super.equals(obj); + } + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersResponse other = + (com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersResponse) obj; + + if (!getUserGroupMembersList().equals(other.getUserGroupMembersList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getUserGroupMembersCount() > 0) { + hash = (37 * hash) + USER_GROUP_MEMBERS_FIELD_NUMBER; + hash = (53 * hash) + getUserGroupMembersList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersResponse + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersResponse + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersResponse + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersResponse + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersResponse + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersResponse + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersResponse + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersResponse + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersResponse + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersResponse + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response message for ListUserGroupMembers RPC.
+   * 
+ * + * Protobuf type {@code google.marketingplatform.admin.v1alpha.ListUserGroupMembersResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.marketingplatform.admin.v1alpha.ListUserGroupMembersResponse) + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_ListUserGroupMembersResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_ListUserGroupMembersResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersResponse.class, + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersResponse.Builder + .class); + } + + // Construct using + // com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (userGroupMembersBuilder_ == null) { + userGroupMembers_ = java.util.Collections.emptyList(); + } else { + userGroupMembers_ = null; + userGroupMembersBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_ListUserGroupMembersResponse_descriptor; + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersResponse + getDefaultInstanceForType() { + return com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersResponse build() { + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersResponse + buildPartial() { + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersResponse result = + new com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersResponse result) { + if (userGroupMembersBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + userGroupMembers_ = java.util.Collections.unmodifiableList(userGroupMembers_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.userGroupMembers_ = userGroupMembers_; + } else { + result.userGroupMembers_ = userGroupMembersBuilder_.build(); + } + } + + private void buildPartial0( + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersResponse) { + return mergeFrom( + (com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersResponse other) { + if (other + == com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersResponse + .getDefaultInstance()) return this; + if (userGroupMembersBuilder_ == null) { + if (!other.userGroupMembers_.isEmpty()) { + if (userGroupMembers_.isEmpty()) { + userGroupMembers_ = other.userGroupMembers_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureUserGroupMembersIsMutable(); + userGroupMembers_.addAll(other.userGroupMembers_); + } + onChanged(); + } + } else { + if (!other.userGroupMembers_.isEmpty()) { + if (userGroupMembersBuilder_.isEmpty()) { + userGroupMembersBuilder_.dispose(); + userGroupMembersBuilder_ = null; + userGroupMembers_ = other.userGroupMembers_; + bitField0_ = (bitField0_ & ~0x00000001); + userGroupMembersBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetUserGroupMembersFieldBuilder() + : null; + } else { + userGroupMembersBuilder_.addAllMessages(other.userGroupMembers_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember m = + input.readMessage( + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember.parser(), + extensionRegistry); + if (userGroupMembersBuilder_ == null) { + ensureUserGroupMembersIsMutable(); + userGroupMembers_.add(m); + } else { + userGroupMembersBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List + userGroupMembers_ = java.util.Collections.emptyList(); + + private void ensureUserGroupMembersIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + userGroupMembers_ = + new java.util.ArrayList( + userGroupMembers_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember, + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember.Builder, + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMemberOrBuilder> + userGroupMembersBuilder_; + + /** + * + * + *
+     * User group members in the user group.
+     * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.UserGroupMember user_group_members = 1; + * + */ + public java.util.List + getUserGroupMembersList() { + if (userGroupMembersBuilder_ == null) { + return java.util.Collections.unmodifiableList(userGroupMembers_); + } else { + return userGroupMembersBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * User group members in the user group.
+     * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.UserGroupMember user_group_members = 1; + * + */ + public int getUserGroupMembersCount() { + if (userGroupMembersBuilder_ == null) { + return userGroupMembers_.size(); + } else { + return userGroupMembersBuilder_.getCount(); + } + } + + /** + * + * + *
+     * User group members in the user group.
+     * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.UserGroupMember user_group_members = 1; + * + */ + public com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember getUserGroupMembers( + int index) { + if (userGroupMembersBuilder_ == null) { + return userGroupMembers_.get(index); + } else { + return userGroupMembersBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * User group members in the user group.
+     * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.UserGroupMember user_group_members = 1; + * + */ + public Builder setUserGroupMembers( + int index, com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember value) { + if (userGroupMembersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUserGroupMembersIsMutable(); + userGroupMembers_.set(index, value); + onChanged(); + } else { + userGroupMembersBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * User group members in the user group.
+     * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.UserGroupMember user_group_members = 1; + * + */ + public Builder setUserGroupMembers( + int index, + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember.Builder builderForValue) { + if (userGroupMembersBuilder_ == null) { + ensureUserGroupMembersIsMutable(); + userGroupMembers_.set(index, builderForValue.build()); + onChanged(); + } else { + userGroupMembersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * User group members in the user group.
+     * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.UserGroupMember user_group_members = 1; + * + */ + public Builder addUserGroupMembers( + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember value) { + if (userGroupMembersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUserGroupMembersIsMutable(); + userGroupMembers_.add(value); + onChanged(); + } else { + userGroupMembersBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * User group members in the user group.
+     * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.UserGroupMember user_group_members = 1; + * + */ + public Builder addUserGroupMembers( + int index, com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember value) { + if (userGroupMembersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUserGroupMembersIsMutable(); + userGroupMembers_.add(index, value); + onChanged(); + } else { + userGroupMembersBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * User group members in the user group.
+     * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.UserGroupMember user_group_members = 1; + * + */ + public Builder addUserGroupMembers( + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember.Builder builderForValue) { + if (userGroupMembersBuilder_ == null) { + ensureUserGroupMembersIsMutable(); + userGroupMembers_.add(builderForValue.build()); + onChanged(); + } else { + userGroupMembersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * User group members in the user group.
+     * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.UserGroupMember user_group_members = 1; + * + */ + public Builder addUserGroupMembers( + int index, + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember.Builder builderForValue) { + if (userGroupMembersBuilder_ == null) { + ensureUserGroupMembersIsMutable(); + userGroupMembers_.add(index, builderForValue.build()); + onChanged(); + } else { + userGroupMembersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * User group members in the user group.
+     * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.UserGroupMember user_group_members = 1; + * + */ + public Builder addAllUserGroupMembers( + java.lang.Iterable + values) { + if (userGroupMembersBuilder_ == null) { + ensureUserGroupMembersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, userGroupMembers_); + onChanged(); + } else { + userGroupMembersBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * User group members in the user group.
+     * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.UserGroupMember user_group_members = 1; + * + */ + public Builder clearUserGroupMembers() { + if (userGroupMembersBuilder_ == null) { + userGroupMembers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + userGroupMembersBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * User group members in the user group.
+     * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.UserGroupMember user_group_members = 1; + * + */ + public Builder removeUserGroupMembers(int index) { + if (userGroupMembersBuilder_ == null) { + ensureUserGroupMembersIsMutable(); + userGroupMembers_.remove(index); + onChanged(); + } else { + userGroupMembersBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * User group members in the user group.
+     * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.UserGroupMember user_group_members = 1; + * + */ + public com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember.Builder + getUserGroupMembersBuilder(int index) { + return internalGetUserGroupMembersFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * User group members in the user group.
+     * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.UserGroupMember user_group_members = 1; + * + */ + public com.google.ads.marketingplatform.admin.v1alpha.UserGroupMemberOrBuilder + getUserGroupMembersOrBuilder(int index) { + if (userGroupMembersBuilder_ == null) { + return userGroupMembers_.get(index); + } else { + return userGroupMembersBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * User group members in the user group.
+     * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.UserGroupMember user_group_members = 1; + * + */ + public java.util.List< + ? extends com.google.ads.marketingplatform.admin.v1alpha.UserGroupMemberOrBuilder> + getUserGroupMembersOrBuilderList() { + if (userGroupMembersBuilder_ != null) { + return userGroupMembersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(userGroupMembers_); + } + } + + /** + * + * + *
+     * User group members in the user group.
+     * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.UserGroupMember user_group_members = 1; + * + */ + public com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember.Builder + addUserGroupMembersBuilder() { + return internalGetUserGroupMembersFieldBuilder() + .addBuilder( + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember.getDefaultInstance()); + } + + /** + * + * + *
+     * User group members in the user group.
+     * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.UserGroupMember user_group_members = 1; + * + */ + public com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember.Builder + addUserGroupMembersBuilder(int index) { + return internalGetUserGroupMembersFieldBuilder() + .addBuilder( + index, + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember.getDefaultInstance()); + } + + /** + * + * + *
+     * User group members in the user group.
+     * 
+ * + * + * repeated .google.marketingplatform.admin.v1alpha.UserGroupMember user_group_members = 1; + * + */ + public java.util.List + getUserGroupMembersBuilderList() { + return internalGetUserGroupMembersFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember, + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember.Builder, + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMemberOrBuilder> + internalGetUserGroupMembersFieldBuilder() { + if (userGroupMembersBuilder_ == null) { + userGroupMembersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember, + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember.Builder, + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMemberOrBuilder>( + userGroupMembers_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + userGroupMembers_ = null; + } + return userGroupMembersBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.marketingplatform.admin.v1alpha.ListUserGroupMembersResponse) + } + + // @@protoc_insertion_point(class_scope:google.marketingplatform.admin.v1alpha.ListUserGroupMembersResponse) + private static final com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersResponse(); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListUserGroupMembersResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/ListUserGroupMembersResponseOrBuilder.java b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/ListUserGroupMembersResponseOrBuilder.java new file mode 100644 index 000000000000..c62013124eef --- /dev/null +++ b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/ListUserGroupMembersResponseOrBuilder.java @@ -0,0 +1,119 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/marketingplatform/admin/v1alpha/marketingplatform_admin.proto +// Protobuf Java Version: 4.33.6 + +package com.google.ads.marketingplatform.admin.v1alpha; + +@com.google.protobuf.Generated +public interface ListUserGroupMembersResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.marketingplatform.admin.v1alpha.ListUserGroupMembersResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * User group members in the user group.
+   * 
+ * + * repeated .google.marketingplatform.admin.v1alpha.UserGroupMember user_group_members = 1; + * + */ + java.util.List + getUserGroupMembersList(); + + /** + * + * + *
+   * User group members in the user group.
+   * 
+ * + * repeated .google.marketingplatform.admin.v1alpha.UserGroupMember user_group_members = 1; + * + */ + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember getUserGroupMembers(int index); + + /** + * + * + *
+   * User group members in the user group.
+   * 
+ * + * repeated .google.marketingplatform.admin.v1alpha.UserGroupMember user_group_members = 1; + * + */ + int getUserGroupMembersCount(); + + /** + * + * + *
+   * User group members in the user group.
+   * 
+ * + * repeated .google.marketingplatform.admin.v1alpha.UserGroupMember user_group_members = 1; + * + */ + java.util.List + getUserGroupMembersOrBuilderList(); + + /** + * + * + *
+   * User group members in the user group.
+   * 
+ * + * repeated .google.marketingplatform.admin.v1alpha.UserGroupMember user_group_members = 1; + * + */ + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMemberOrBuilder + getUserGroupMembersOrBuilder(int index); + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/ListUserGroupsRequest.java b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/ListUserGroupsRequest.java new file mode 100644 index 000000000000..93d856adf990 --- /dev/null +++ b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/ListUserGroupsRequest.java @@ -0,0 +1,959 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/marketingplatform/admin/v1alpha/marketingplatform_admin.proto +// Protobuf Java Version: 4.33.6 + +package com.google.ads.marketingplatform.admin.v1alpha; + +/** + * + * + *
+ * Request message for ListUserGroups RPC.
+ * 
+ * + * Protobuf type {@code google.marketingplatform.admin.v1alpha.ListUserGroupsRequest} + */ +@com.google.protobuf.Generated +public final class ListUserGroupsRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.marketingplatform.admin.v1alpha.ListUserGroupsRequest) + ListUserGroupsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ListUserGroupsRequest"); + } + + // Use ListUserGroupsRequest.newBuilder() to construct. + private ListUserGroupsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListUserGroupsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_ListUserGroupsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_ListUserGroupsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsRequest.class, + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The parent org where this UserGroup will be listed.
+   * Format: organizations/{org_id}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The parent org where this UserGroup will be listed.
+   * Format: organizations/{org_id}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + + /** + * + * + *
+   * Optional. The maximum number of user groups to return in one call. The
+   * service may return fewer than this value.
+   *
+   * If unspecified, at most 50 user groups will be returned. The maximum value
+   * is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * Optional. A page token, received from a previous ListUserGroups call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListUserGroups` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A page token, received from a previous ListUserGroups call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListUserGroups` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsRequest)) { + return super.equals(obj); + } + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsRequest other = + (com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for ListUserGroups RPC.
+   * 
+ * + * Protobuf type {@code google.marketingplatform.admin.v1alpha.ListUserGroupsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.marketingplatform.admin.v1alpha.ListUserGroupsRequest) + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_ListUserGroupsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_ListUserGroupsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsRequest.class, + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsRequest.Builder.class); + } + + // Construct using + // com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_ListUserGroupsRequest_descriptor; + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsRequest + getDefaultInstanceForType() { + return com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsRequest build() { + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsRequest buildPartial() { + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsRequest result = + new com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsRequest) { + return mergeFrom( + (com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsRequest other) { + if (other + == com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. The parent org where this UserGroup will be listed.
+     * Format: organizations/{org_id}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The parent org where this UserGroup will be listed.
+     * Format: organizations/{org_id}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The parent org where this UserGroup will be listed.
+     * Format: organizations/{org_id}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The parent org where this UserGroup will be listed.
+     * Format: organizations/{org_id}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The parent org where this UserGroup will be listed.
+     * Format: organizations/{org_id}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + + /** + * + * + *
+     * Optional. The maximum number of user groups to return in one call. The
+     * service may return fewer than this value.
+     *
+     * If unspecified, at most 50 user groups will be returned. The maximum value
+     * is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. The maximum number of user groups to return in one call. The
+     * service may return fewer than this value.
+     *
+     * If unspecified, at most 50 user groups will be returned. The maximum value
+     * is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The maximum number of user groups to return in one call. The
+     * service may return fewer than this value.
+     *
+     * If unspecified, at most 50 user groups will be returned. The maximum value
+     * is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. A page token, received from a previous ListUserGroups call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListUserGroups` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous ListUserGroups call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListUserGroups` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous ListUserGroups call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListUserGroups` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous ListUserGroups call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListUserGroups` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous ListUserGroups call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListUserGroups` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.marketingplatform.admin.v1alpha.ListUserGroupsRequest) + } + + // @@protoc_insertion_point(class_scope:google.marketingplatform.admin.v1alpha.ListUserGroupsRequest) + private static final com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsRequest(); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListUserGroupsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/ListUserGroupsRequestOrBuilder.java b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/ListUserGroupsRequestOrBuilder.java new file mode 100644 index 000000000000..20c84c2e0d19 --- /dev/null +++ b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/ListUserGroupsRequestOrBuilder.java @@ -0,0 +1,111 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/marketingplatform/admin/v1alpha/marketingplatform_admin.proto +// Protobuf Java Version: 4.33.6 + +package com.google.ads.marketingplatform.admin.v1alpha; + +@com.google.protobuf.Generated +public interface ListUserGroupsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.marketingplatform.admin.v1alpha.ListUserGroupsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent org where this UserGroup will be listed.
+   * Format: organizations/{org_id}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The parent org where this UserGroup will be listed.
+   * Format: organizations/{org_id}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. The maximum number of user groups to return in one call. The
+   * service may return fewer than this value.
+   *
+   * If unspecified, at most 50 user groups will be returned. The maximum value
+   * is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A page token, received from a previous ListUserGroups call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListUserGroups` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A page token, received from a previous ListUserGroups call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListUserGroups` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/ListUserGroupsResponse.java b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/ListUserGroupsResponse.java new file mode 100644 index 000000000000..44c536c408eb --- /dev/null +++ b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/ListUserGroupsResponse.java @@ -0,0 +1,1148 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/marketingplatform/admin/v1alpha/marketingplatform_admin.proto +// Protobuf Java Version: 4.33.6 + +package com.google.ads.marketingplatform.admin.v1alpha; + +/** + * + * + *
+ * Response message for ListUserGroups RPC.
+ * 
+ * + * Protobuf type {@code google.marketingplatform.admin.v1alpha.ListUserGroupsResponse} + */ +@com.google.protobuf.Generated +public final class ListUserGroupsResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.marketingplatform.admin.v1alpha.ListUserGroupsResponse) + ListUserGroupsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ListUserGroupsResponse"); + } + + // Use ListUserGroupsResponse.newBuilder() to construct. + private ListUserGroupsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListUserGroupsResponse() { + userGroups_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_ListUserGroupsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_ListUserGroupsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsResponse.class, + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsResponse.Builder.class); + } + + public static final int USER_GROUPS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List userGroups_; + + /** + * + * + *
+   * User groups in the organization.
+   * 
+ * + * repeated .google.marketingplatform.admin.v1alpha.UserGroup user_groups = 1; + */ + @java.lang.Override + public java.util.List + getUserGroupsList() { + return userGroups_; + } + + /** + * + * + *
+   * User groups in the organization.
+   * 
+ * + * repeated .google.marketingplatform.admin.v1alpha.UserGroup user_groups = 1; + */ + @java.lang.Override + public java.util.List + getUserGroupsOrBuilderList() { + return userGroups_; + } + + /** + * + * + *
+   * User groups in the organization.
+   * 
+ * + * repeated .google.marketingplatform.admin.v1alpha.UserGroup user_groups = 1; + */ + @java.lang.Override + public int getUserGroupsCount() { + return userGroups_.size(); + } + + /** + * + * + *
+   * User groups in the organization.
+   * 
+ * + * repeated .google.marketingplatform.admin.v1alpha.UserGroup user_groups = 1; + */ + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.UserGroup getUserGroups(int index) { + return userGroups_.get(index); + } + + /** + * + * + *
+   * User groups in the organization.
+   * 
+ * + * repeated .google.marketingplatform.admin.v1alpha.UserGroup user_groups = 1; + */ + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.UserGroupOrBuilder getUserGroupsOrBuilder( + int index) { + return userGroups_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < userGroups_.size(); i++) { + output.writeMessage(1, userGroups_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < userGroups_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, userGroups_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsResponse)) { + return super.equals(obj); + } + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsResponse other = + (com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsResponse) obj; + + if (!getUserGroupsList().equals(other.getUserGroupsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getUserGroupsCount() > 0) { + hash = (37 * hash) + USER_GROUPS_FIELD_NUMBER; + hash = (53 * hash) + getUserGroupsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response message for ListUserGroups RPC.
+   * 
+ * + * Protobuf type {@code google.marketingplatform.admin.v1alpha.ListUserGroupsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.marketingplatform.admin.v1alpha.ListUserGroupsResponse) + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_ListUserGroupsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_ListUserGroupsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsResponse.class, + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsResponse.Builder.class); + } + + // Construct using + // com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (userGroupsBuilder_ == null) { + userGroups_ = java.util.Collections.emptyList(); + } else { + userGroups_ = null; + userGroupsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_ListUserGroupsResponse_descriptor; + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsResponse + getDefaultInstanceForType() { + return com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsResponse build() { + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsResponse buildPartial() { + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsResponse result = + new com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsResponse result) { + if (userGroupsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + userGroups_ = java.util.Collections.unmodifiableList(userGroups_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.userGroups_ = userGroups_; + } else { + result.userGroups_ = userGroupsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsResponse) { + return mergeFrom( + (com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsResponse other) { + if (other + == com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsResponse + .getDefaultInstance()) return this; + if (userGroupsBuilder_ == null) { + if (!other.userGroups_.isEmpty()) { + if (userGroups_.isEmpty()) { + userGroups_ = other.userGroups_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureUserGroupsIsMutable(); + userGroups_.addAll(other.userGroups_); + } + onChanged(); + } + } else { + if (!other.userGroups_.isEmpty()) { + if (userGroupsBuilder_.isEmpty()) { + userGroupsBuilder_.dispose(); + userGroupsBuilder_ = null; + userGroups_ = other.userGroups_; + bitField0_ = (bitField0_ & ~0x00000001); + userGroupsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetUserGroupsFieldBuilder() + : null; + } else { + userGroupsBuilder_.addAllMessages(other.userGroups_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.ads.marketingplatform.admin.v1alpha.UserGroup m = + input.readMessage( + com.google.ads.marketingplatform.admin.v1alpha.UserGroup.parser(), + extensionRegistry); + if (userGroupsBuilder_ == null) { + ensureUserGroupsIsMutable(); + userGroups_.add(m); + } else { + userGroupsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List userGroups_ = + java.util.Collections.emptyList(); + + private void ensureUserGroupsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + userGroups_ = + new java.util.ArrayList( + userGroups_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.ads.marketingplatform.admin.v1alpha.UserGroup, + com.google.ads.marketingplatform.admin.v1alpha.UserGroup.Builder, + com.google.ads.marketingplatform.admin.v1alpha.UserGroupOrBuilder> + userGroupsBuilder_; + + /** + * + * + *
+     * User groups in the organization.
+     * 
+ * + * repeated .google.marketingplatform.admin.v1alpha.UserGroup user_groups = 1; + */ + public java.util.List + getUserGroupsList() { + if (userGroupsBuilder_ == null) { + return java.util.Collections.unmodifiableList(userGroups_); + } else { + return userGroupsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * User groups in the organization.
+     * 
+ * + * repeated .google.marketingplatform.admin.v1alpha.UserGroup user_groups = 1; + */ + public int getUserGroupsCount() { + if (userGroupsBuilder_ == null) { + return userGroups_.size(); + } else { + return userGroupsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * User groups in the organization.
+     * 
+ * + * repeated .google.marketingplatform.admin.v1alpha.UserGroup user_groups = 1; + */ + public com.google.ads.marketingplatform.admin.v1alpha.UserGroup getUserGroups(int index) { + if (userGroupsBuilder_ == null) { + return userGroups_.get(index); + } else { + return userGroupsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * User groups in the organization.
+     * 
+ * + * repeated .google.marketingplatform.admin.v1alpha.UserGroup user_groups = 1; + */ + public Builder setUserGroups( + int index, com.google.ads.marketingplatform.admin.v1alpha.UserGroup value) { + if (userGroupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUserGroupsIsMutable(); + userGroups_.set(index, value); + onChanged(); + } else { + userGroupsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * User groups in the organization.
+     * 
+ * + * repeated .google.marketingplatform.admin.v1alpha.UserGroup user_groups = 1; + */ + public Builder setUserGroups( + int index, + com.google.ads.marketingplatform.admin.v1alpha.UserGroup.Builder builderForValue) { + if (userGroupsBuilder_ == null) { + ensureUserGroupsIsMutable(); + userGroups_.set(index, builderForValue.build()); + onChanged(); + } else { + userGroupsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * User groups in the organization.
+     * 
+ * + * repeated .google.marketingplatform.admin.v1alpha.UserGroup user_groups = 1; + */ + public Builder addUserGroups(com.google.ads.marketingplatform.admin.v1alpha.UserGroup value) { + if (userGroupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUserGroupsIsMutable(); + userGroups_.add(value); + onChanged(); + } else { + userGroupsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * User groups in the organization.
+     * 
+ * + * repeated .google.marketingplatform.admin.v1alpha.UserGroup user_groups = 1; + */ + public Builder addUserGroups( + int index, com.google.ads.marketingplatform.admin.v1alpha.UserGroup value) { + if (userGroupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUserGroupsIsMutable(); + userGroups_.add(index, value); + onChanged(); + } else { + userGroupsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * User groups in the organization.
+     * 
+ * + * repeated .google.marketingplatform.admin.v1alpha.UserGroup user_groups = 1; + */ + public Builder addUserGroups( + com.google.ads.marketingplatform.admin.v1alpha.UserGroup.Builder builderForValue) { + if (userGroupsBuilder_ == null) { + ensureUserGroupsIsMutable(); + userGroups_.add(builderForValue.build()); + onChanged(); + } else { + userGroupsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * User groups in the organization.
+     * 
+ * + * repeated .google.marketingplatform.admin.v1alpha.UserGroup user_groups = 1; + */ + public Builder addUserGroups( + int index, + com.google.ads.marketingplatform.admin.v1alpha.UserGroup.Builder builderForValue) { + if (userGroupsBuilder_ == null) { + ensureUserGroupsIsMutable(); + userGroups_.add(index, builderForValue.build()); + onChanged(); + } else { + userGroupsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * User groups in the organization.
+     * 
+ * + * repeated .google.marketingplatform.admin.v1alpha.UserGroup user_groups = 1; + */ + public Builder addAllUserGroups( + java.lang.Iterable + values) { + if (userGroupsBuilder_ == null) { + ensureUserGroupsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, userGroups_); + onChanged(); + } else { + userGroupsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * User groups in the organization.
+     * 
+ * + * repeated .google.marketingplatform.admin.v1alpha.UserGroup user_groups = 1; + */ + public Builder clearUserGroups() { + if (userGroupsBuilder_ == null) { + userGroups_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + userGroupsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * User groups in the organization.
+     * 
+ * + * repeated .google.marketingplatform.admin.v1alpha.UserGroup user_groups = 1; + */ + public Builder removeUserGroups(int index) { + if (userGroupsBuilder_ == null) { + ensureUserGroupsIsMutable(); + userGroups_.remove(index); + onChanged(); + } else { + userGroupsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * User groups in the organization.
+     * 
+ * + * repeated .google.marketingplatform.admin.v1alpha.UserGroup user_groups = 1; + */ + public com.google.ads.marketingplatform.admin.v1alpha.UserGroup.Builder getUserGroupsBuilder( + int index) { + return internalGetUserGroupsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * User groups in the organization.
+     * 
+ * + * repeated .google.marketingplatform.admin.v1alpha.UserGroup user_groups = 1; + */ + public com.google.ads.marketingplatform.admin.v1alpha.UserGroupOrBuilder getUserGroupsOrBuilder( + int index) { + if (userGroupsBuilder_ == null) { + return userGroups_.get(index); + } else { + return userGroupsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * User groups in the organization.
+     * 
+ * + * repeated .google.marketingplatform.admin.v1alpha.UserGroup user_groups = 1; + */ + public java.util.List< + ? extends com.google.ads.marketingplatform.admin.v1alpha.UserGroupOrBuilder> + getUserGroupsOrBuilderList() { + if (userGroupsBuilder_ != null) { + return userGroupsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(userGroups_); + } + } + + /** + * + * + *
+     * User groups in the organization.
+     * 
+ * + * repeated .google.marketingplatform.admin.v1alpha.UserGroup user_groups = 1; + */ + public com.google.ads.marketingplatform.admin.v1alpha.UserGroup.Builder addUserGroupsBuilder() { + return internalGetUserGroupsFieldBuilder() + .addBuilder( + com.google.ads.marketingplatform.admin.v1alpha.UserGroup.getDefaultInstance()); + } + + /** + * + * + *
+     * User groups in the organization.
+     * 
+ * + * repeated .google.marketingplatform.admin.v1alpha.UserGroup user_groups = 1; + */ + public com.google.ads.marketingplatform.admin.v1alpha.UserGroup.Builder addUserGroupsBuilder( + int index) { + return internalGetUserGroupsFieldBuilder() + .addBuilder( + index, com.google.ads.marketingplatform.admin.v1alpha.UserGroup.getDefaultInstance()); + } + + /** + * + * + *
+     * User groups in the organization.
+     * 
+ * + * repeated .google.marketingplatform.admin.v1alpha.UserGroup user_groups = 1; + */ + public java.util.List + getUserGroupsBuilderList() { + return internalGetUserGroupsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.ads.marketingplatform.admin.v1alpha.UserGroup, + com.google.ads.marketingplatform.admin.v1alpha.UserGroup.Builder, + com.google.ads.marketingplatform.admin.v1alpha.UserGroupOrBuilder> + internalGetUserGroupsFieldBuilder() { + if (userGroupsBuilder_ == null) { + userGroupsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.ads.marketingplatform.admin.v1alpha.UserGroup, + com.google.ads.marketingplatform.admin.v1alpha.UserGroup.Builder, + com.google.ads.marketingplatform.admin.v1alpha.UserGroupOrBuilder>( + userGroups_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + userGroups_ = null; + } + return userGroupsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.marketingplatform.admin.v1alpha.ListUserGroupsResponse) + } + + // @@protoc_insertion_point(class_scope:google.marketingplatform.admin.v1alpha.ListUserGroupsResponse) + private static final com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsResponse(); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListUserGroupsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/ListUserGroupsResponseOrBuilder.java b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/ListUserGroupsResponseOrBuilder.java new file mode 100644 index 000000000000..8afb313f1bf8 --- /dev/null +++ b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/ListUserGroupsResponseOrBuilder.java @@ -0,0 +1,113 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/marketingplatform/admin/v1alpha/marketingplatform_admin.proto +// Protobuf Java Version: 4.33.6 + +package com.google.ads.marketingplatform.admin.v1alpha; + +@com.google.protobuf.Generated +public interface ListUserGroupsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.marketingplatform.admin.v1alpha.ListUserGroupsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * User groups in the organization.
+   * 
+ * + * repeated .google.marketingplatform.admin.v1alpha.UserGroup user_groups = 1; + */ + java.util.List getUserGroupsList(); + + /** + * + * + *
+   * User groups in the organization.
+   * 
+ * + * repeated .google.marketingplatform.admin.v1alpha.UserGroup user_groups = 1; + */ + com.google.ads.marketingplatform.admin.v1alpha.UserGroup getUserGroups(int index); + + /** + * + * + *
+   * User groups in the organization.
+   * 
+ * + * repeated .google.marketingplatform.admin.v1alpha.UserGroup user_groups = 1; + */ + int getUserGroupsCount(); + + /** + * + * + *
+   * User groups in the organization.
+   * 
+ * + * repeated .google.marketingplatform.admin.v1alpha.UserGroup user_groups = 1; + */ + java.util.List + getUserGroupsOrBuilderList(); + + /** + * + * + *
+   * User groups in the organization.
+   * 
+ * + * repeated .google.marketingplatform.admin.v1alpha.UserGroup user_groups = 1; + */ + com.google.ads.marketingplatform.admin.v1alpha.UserGroupOrBuilder getUserGroupsOrBuilder( + int index); + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/MarketingplatformAdminProto.java b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/MarketingplatformAdminProto.java index 67600f8701c2..9e7e0aa514e3 100644 --- a/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/MarketingplatformAdminProto.java +++ b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/MarketingplatformAdminProto.java @@ -104,6 +104,74 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_marketingplatform_admin_v1alpha_ReportPropertyUsageResponse_BillInfo_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_marketingplatform_admin_v1alpha_ReportPropertyUsageResponse_BillInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_marketingplatform_admin_v1alpha_GetUserGroupRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_marketingplatform_admin_v1alpha_GetUserGroupRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_marketingplatform_admin_v1alpha_ListUserGroupsRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_marketingplatform_admin_v1alpha_ListUserGroupsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_marketingplatform_admin_v1alpha_ListUserGroupsResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_marketingplatform_admin_v1alpha_ListUserGroupsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_marketingplatform_admin_v1alpha_CreateUserGroupRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_marketingplatform_admin_v1alpha_CreateUserGroupRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_marketingplatform_admin_v1alpha_UpdateUserGroupRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_marketingplatform_admin_v1alpha_UpdateUserGroupRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_marketingplatform_admin_v1alpha_DeleteUserGroupRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_marketingplatform_admin_v1alpha_DeleteUserGroupRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_marketingplatform_admin_v1alpha_GetUserGroupMemberRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_marketingplatform_admin_v1alpha_GetUserGroupMemberRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_marketingplatform_admin_v1alpha_ListUserGroupMembersRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_marketingplatform_admin_v1alpha_ListUserGroupMembersRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_marketingplatform_admin_v1alpha_ListUserGroupMembersResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_marketingplatform_admin_v1alpha_ListUserGroupMembersResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_marketingplatform_admin_v1alpha_CreateUserGroupMemberRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_marketingplatform_admin_v1alpha_CreateUserGroupMemberRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_marketingplatform_admin_v1alpha_UpdateUserGroupMemberRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_marketingplatform_admin_v1alpha_UpdateUserGroupMemberRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_marketingplatform_admin_v1alpha_DeleteUserGroupMemberRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_marketingplatform_admin_v1alpha_DeleteUserGroupMemberRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_marketingplatform_admin_v1alpha_GetAdminAccessBindingRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_marketingplatform_admin_v1alpha_GetAdminAccessBindingRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_marketingplatform_admin_v1alpha_ListAdminAccessBindingsRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_marketingplatform_admin_v1alpha_ListAdminAccessBindingsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_marketingplatform_admin_v1alpha_ListAdminAccessBindingsResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_marketingplatform_admin_v1alpha_ListAdminAccessBindingsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_marketingplatform_admin_v1alpha_CreateAdminAccessBindingRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_marketingplatform_admin_v1alpha_CreateAdminAccessBindingRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_marketingplatform_admin_v1alpha_UpdateAdminAccessBindingRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_marketingplatform_admin_v1alpha_UpdateAdminAccessBindingRequest_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -118,9 +186,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "arketingplatform.admin.v1alpha\032\034google/a" + "pi/annotations.proto\032\027google/api/client." + "proto\032\037google/api/field_behavior.proto\032\031" - + "google/api/resource.proto\0326google/marketingplatform/admin/v1alpha/resources.prot" - + "o\032\033google/protobuf/empty.proto\032\026google/t" - + "ype/date.proto\032\027google/type/money.proto\"b\n" + + "google/api/resource.proto\0326google/market" + + "ingplatform/admin/v1alpha/resources.proto\032\033google/protobuf/empty.proto\032" + + " google/p" + + "rotobuf/field_mask.proto\032\026google/type/date.proto\032\027google/type/money.proto\"b\n" + "\026GetOrganizationRequest\022H\n" + "\004name\030\001 \001(\tB:\340A\002\372A4\n" + "2marketingplatformadmin.googleapis.com/Organization\"K\n" @@ -128,35 +197,36 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\tpage_size\030\001 \001(\005B\003\340A\001\022\027\n\n" + "page_token\030\002 \001(\tB\003\340A\001\"\201\001\n" + "\031ListOrganizationsResponse\022K\n\r" - + "organizations\030\001 \003(\01324.google.m" - + "arketingplatform.admin.v1alpha.Organization\022\027\n" + + "organizations\030\001" + + " \003(\01324.google.marketingplatform.admin.v1alpha.Organization\022\027\n" + "\017next_page_token\030\002 \001(\t\"\221\001\n" + "%FindSalesPartnerManagedClientsRequest\022P\n" + "\014organization\030\001 \001(\tB:\340A\002\372A4\n" + "2marketingplatformadmin.googleapis.com/Organization\022\026\n" + "\tis_active\030\002 \001(\010B\003\340A\001\"\277\002\n" + "&FindSalesPartnerManagedClientsResponse\022n\n" - + "\013client_data\030\001 \003(\0132Y.google.marketingplatform.admin.v1alph" - + "a.FindSalesPartnerManagedClientsResponse.ClientData\032\244\001\n\n" + + "\013client_data\030\001 \003(\0132Y.google.marketingplatform.admin.v1alpha.Find" + + "SalesPartnerManagedClientsResponse.ClientData\032\244\001\n\n" + "ClientData\022J\n" - + "\014organization\030\001" - + " \001(\01324.google.marketingplatform.admin.v1alpha.Organization\022%\n\n" + + "\014organization\030\001 \001" + + "(\01324.google.marketingplatform.admin.v1alpha.Organization\022%\n\n" + "start_date\030\002 \001(\0132\021.google.type.Date\022#\n" + "\010end_date\030\003 \001(\0132\021.google.type.Date\"\247\001\n" + " ListAnalyticsAccountLinksRequest\022R\n" - + "\006parent\030\001 \001(\tBB\340A\002\372A<\022" - + ":marketingplatformadmin.googleapis.com/AnalyticsAccountLink\022\026\n" - + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "\006parent\030\001 \001(\tBB\340A\002\372A<\022:marke" + + "tingplatformadmin.googleapis.com/AnalyticsAccountLink\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n" + + "\n" + "page_token\030\003 \001(\tB\003\340A\001\"\233\001\n" + "!ListAnalyticsAccountLinksResponse\022]\n" - + "\027analytics_account_links\030\001 \003(\0132<.google.marketingpl" - + "atform.admin.v1alpha.AnalyticsAccountLink\022\027\n" + + "\027analytics_account_links\030\001" + + " \003(\0132<.google.marketingplatform.admin.v1alpha.AnalyticsAccountLink\022\027\n" + "\017next_page_token\030\002 \001(\t\"\332\001\n" + "!CreateAnalyticsAccountLinkRequest\022R\n" - + "\006parent\030\001 \001(\t" - + "BB\340A\002\372A<\022:marketingplatformadmin.googleapis.com/AnalyticsAccountLink\022a\n" - + "\026analytics_account_link\030\002 \001(\0132<.google.marketingp" - + "latform.admin.v1alpha.AnalyticsAccountLinkB\003\340A\002\"u\n" + + "\006parent\030\001 \001(\tBB\340A\002\372" + + "A<\022:marketingplatformadmin.googleapis.com/AnalyticsAccountLink\022a\n" + + "\026analytics_account_link\030\002 \001(\0132<.google.marketingplatfor" + + "m.admin.v1alpha.AnalyticsAccountLinkB\003\340A\002\"u\n" + "!DeleteAnalyticsAccountLinkRequest\022P\n" + "\004name\030\001 \001(\tBB\340A\002\372A<\n" + ":marketingplatformadmin.googleapis.com/AnalyticsAccountLink\"\354\001\n" @@ -164,76 +234,208 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\026analytics_account_link\030\001 \001(\tB\003\340A\002\022J\n" + "\022analytics_property\030\002 \001(\tB.\340A\002\372A(\n" + "&analyticsadmin.googleapis.com/Property\022Y\n\r" - + "service_level\030\003 \001(\0162=.google.marketingplat" - + "form.admin.v1alpha.AnalyticsServiceLevelB\003\340A\002\"!\n" + + "service_level\030\003 \001(\0162=.google.marketingplatform.a" + + "dmin.v1alpha.AnalyticsServiceLevelB\003\340A\002\"!\n" + "\037SetPropertyServiceLevelResponse\"K\n" + "\032ReportPropertyUsageRequest\022\031\n" + "\014organization\030\001 \001(\tB\003\340A\002\022\022\n" + "\005month\030\002 \001(\tB\003\340A\002\"\317\005\n" + "\033ReportPropertyUsageResponse\022j\n" - + "\017property_usages\030\001 \003(\0132Q.google.marketingplatfor" - + "m.admin.v1alpha.ReportPropertyUsageResponse.PropertyUsage\022_\n" - + "\tbill_info\030\002 \001(\0132L.g" - + "oogle.marketingplatform.admin.v1alpha.ReportPropertyUsageResponse.BillInfo\032\260\002\n\r" + + "\017property_usages\030\001 \003(\0132Q.google.marketingplatform.admi" + + "n.v1alpha.ReportPropertyUsageResponse.PropertyUsage\022_\n" + + "\tbill_info\030\002 \001(\0132L.google." + + "marketingplatform.admin.v1alpha.ReportPropertyUsageResponse.BillInfo\032\260\002\n\r" + "PropertyUsage\022\020\n" + "\010property\030\001 \001(\t\022\024\n" + "\014display_name\030\002 \001(\t\022\022\n\n" + "account_id\030\003 \001(\003\022T\n\r" - + "service_level\030\004 \001(\0162=.google.marketingplatfo" - + "rm.admin.v1alpha.AnalyticsServiceLevel\022T\n\r" - + "property_type\030\005 \001(\0162=.google.marketing" - + "platform.admin.v1alpha.AnalyticsPropertyType\022\031\n" + + "service_level\030\004" + + " \001(\0162=.google.marketingplatform.admin.v1alpha.AnalyticsServiceLevel\022T\n\r" + + "property_type\030\005 \001(\0162=.google.marketingplatfo" + + "rm.admin.v1alpha.AnalyticsPropertyType\022\031\n" + "\021total_event_count\030\006 \001(\003\022\034\n" + "\024billable_event_count\030\007 \001(\003\032\257\001\n" + "\010BillInfo\022$\n" + "\010base_fee\030\001 \001(\0132\022.google.type.Money\022%\n" + "\tevent_fee\030\002 \001(\0132\022.google.type.Money\0223\n" + "\027price_protection_credit\030\003 \001(\0132\022.google.type.Money\022!\n" - + "\005total\030\004 \001(\0132\022.google.type.Money2\372\020\n" + + "\005total\030\004 \001(\0132\022.google.type.Money\"\\\n" + + "\023GetUserGroupRequest\022E\n" + + "\004name\030\001 \001(\tB7\340A\002\372A1\n" + + "/marketingplatformadmin.googleapis.com/UserGroup\"\221\001\n" + + "\025ListUserGroupsRequest\022G\n" + + "\006parent\030\001 \001(" + + "\tB7\340A\002\372A1\022/marketingplatformadmin.googleapis.com/UserGroup\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\"y\n" + + "\026ListUserGroupsResponse\022F\n" + + "\013user_groups\030\001 \003" + + "(\01321.google.marketingplatform.admin.v1alpha.UserGroup\022\027\n" + + "\017next_page_token\030\002 \001(\t\"\255\001\n" + + "\026CreateUserGroupRequest\022G\n" + + "\006parent\030\001 \001(" + + "\tB7\340A\002\372A1\022/marketingplatformadmin.googleapis.com/UserGroup\022J\n\n" + + "user_group\030\002 \001(\01321" + + ".google.marketingplatform.admin.v1alpha.UserGroupB\003\340A\002\"\232\001\n" + + "\026UpdateUserGroupRequest\022J\n\n" + + "user_group\030\001" + + " \001(\01321.google.marketingplatform.admin.v1alpha.UserGroupB\003\340A\002\0224\n" + + "\013update_mask\030\002 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\002\"_\n" + + "\026DeleteUserGroupRequest\022E\n" + + "\004name\030\001 \001(\tB7\340A\002\372A1\n" + + "/marketingplatformadmin.googleapis.com/UserGroup\"h\n" + + "\031GetUserGroupMemberRequest\022K\n" + + "\004name\030\001 \001(\tB=\340A\002\372A7\n" + + "5marketingplatformadmin.googleapis.com/UserGroupMember\"\235\001\n" + + "\033ListUserGroupMembersRequest\022M\n" + + "\006parent\030\001 \001(\tB=\340A\002\372A7\0225marketin" + + "gplatformadmin.googleapis.com/UserGroupMember\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\"\214\001\n" + + "\034ListUserGroupMembersResponse\022S\n" + + "\022user_group_members\030\001 \003(\01327.go" + + "ogle.marketingplatform.admin.v1alpha.UserGroupMember\022\027\n" + + "\017next_page_token\030\002 \001(\t\"\306\001\n" + + "\034CreateUserGroupMemberRequest\022M\n" + + "\006parent\030\001 \001(" + + "\tB=\340A\002\372A7\0225marketingplatformadmin.googleapis.com/UserGroupMember\022W\n" + + "\021user_group_member\030\002 \001(\01327.google.marketingplatf" + + "orm.admin.v1alpha.UserGroupMemberB\003\340A\002\"\255\001\n" + + "\034UpdateUserGroupMemberRequest\022W\n" + + "\021user_group_member\030\001 \001(\01327.google.marketingpla" + + "tform.admin.v1alpha.UserGroupMemberB\003\340A\002\0224\n" + + "\013update_mask\030\002 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\002\"k\n" + + "\034DeleteUserGroupMemberRequest\022K\n" + + "\004name\030\001 \001(\tB=\340A\002\372A7\n" + + "5marketingplatformadmin.googleapis.com/UserGroupMember\"n\n" + + "\034GetAdminAccessBindingRequest\022N\n" + + "\004name\030\001 \001(\tB@\340A\002\372A:\n" + + "8marketingplatformadmin.googleapis.com/AdminAccessBinding\"\243\001\n" + + "\036ListAdminAccessBindingsRequest\022P\n" + + "\006parent\030\001 \001(" + + "\tB@\340A\002\372A:\0228marketingplatformadmin.googleapis.com/AdminAccessBinding\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\"\225\001\n" + + "\037ListAdminAccessBindingsResponse\022Y\n" + + "\025admin_access_bindings\030\001 \003(\0132:.google.ma" + + "rketingplatform.admin.v1alpha.AdminAccessBinding\022\027\n" + + "\017next_page_token\030\002 \001(\t\"\322\001\n" + + "\037CreateAdminAccessBindingRequest\022P\n" + + "\006parent\030\001 \001(" + + "\tB@\340A\002\372A:\0228marketingplatformadmin.googleapis.com/AdminAccessBinding\022]\n" + + "\024admin_access_binding\030\002 \001(\0132:.google.marketing" + + "platform.admin.v1alpha.AdminAccessBindingB\003\340A\002\"\266\001\n" + + "\037UpdateAdminAccessBindingRequest\022]\n" + + "\024admin_access_binding\030\001 \001(\0132:.googl" + + "e.marketingplatform.admin.v1alpha.AdminAccessBindingB\003\340A\002\0224\n" + + "\013update_mask\030\002 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\0022\304*\n" + "\035MarketingplatformAdminService\022\267\001\n" - + "\017GetOrganization\022>.google.marketingplatform" - + ".admin.v1alpha.GetOrganizationRequest\0324.google.marketingplatform.admin.v1alpha.O" - + "rganization\".\332A\004name\202\323\344\223\002!\022\037/v1alpha/{name=organizations/*}\022\270\001\n" - + "\021ListOrganizations\022@.google.marketingplatform.admin.v1alp" - + "ha.ListOrganizationsRequest\032A.google.marketingplatform.admin.v1alpha.ListOrganiz" - + "ationsResponse\"\036\202\323\344\223\002\030\022\026/v1alpha/organizations\022\222\002\n" - + "\036FindSalesPartnerManagedClients\022M.google.marketingplatform.admin.v1alp" - + "ha.FindSalesPartnerManagedClientsRequest\032N.google.marketingplatform.admin.v1alph" - + "a.FindSalesPartnerManagedClientsResponse" - + "\"Q\202\323\344\223\002K\"F/v1alpha/{organization=organiz" - + "ations/*}:findSalesPartnerManagedClients:\001*\022\372\001\n" - + "\031ListAnalyticsAccountLinks\022H.google.marketingplatform.admin.v1alpha.ListA" - + "nalyticsAccountLinksRequest\032I.google.marketingplatform.admin.v1alpha.ListAnalyti" - + "csAccountLinksResponse\"H\332A\006parent\202\323\344\223\0029\022" - + "7/v1alpha/{parent=organizations/*}/analyticsAccountLinks\022\236\002\n" - + "\032CreateAnalyticsAccountLink\022I.google.marketingplatform.admin" - + ".v1alpha.CreateAnalyticsAccountLinkRequest\032<.google.marketingplatform.admin.v1al" - + "pha.AnalyticsAccountLink\"w\332A\035parent,anal" - + "ytics_account_link\202\323\344\223\002Q\"7/v1alpha/{pare" - + "nt=organizations/*}/analyticsAccountLinks:\026analytics_account_link\022\307\001\n" - + "\032DeleteAnalyticsAccountLink\022I.google.marketingplatf" - + "orm.admin.v1alpha.DeleteAnalyticsAccount" - + "LinkRequest\032\026.google.protobuf.Empty\"F\332A\004" - + "name\202\323\344\223\0029*7/v1alpha/{name=organizations/*/analyticsAccountLinks/*}\022\262\002\n" - + "\027SetPropertyServiceLevel\022F.google.marketingplatfo" - + "rm.admin.v1alpha.SetPropertyServiceLevelRequest\032G.google.marketingplatform.admin" - + ".v1alpha.SetPropertyServiceLevelResponse" - + "\"\205\001\332A\026analytics_account_link\202\323\344\223\002f\"a/v1a" - + "lpha/{analytics_account_link=organizatio" - + "ns/*/analyticsAccountLinks/*}:setPropertyServiceLevel:\001*\022\365\001\n" - + "\023ReportPropertyUsage\022B.google.marketingplatform.admin.v1alph" - + "a.ReportPropertyUsageRequest\032C.google.marketingplatform.admin.v1alpha.ReportProp" - + "ertyUsageResponse\"U\332A\014organization\202\323\344\223\002@" - + "\";/v1alpha/{organization=organizations/*" - + "}:reportPropertyUsage:\001*\032\271\001\312A%marketingp" - + "latformadmin.googleapis.com\322A\215\001https://w" - + "ww.googleapis.com/auth/marketingplatformadmin.analytics.read,https://www.googlea" - + "pis.com/auth/marketingplatformadmin.analytics.updateB\351\002\n" - + ".com.google.ads.marketingplatform.admin.v1alphaB\033Marketingplatfo" - + "rmAdminProtoP\001ZKgoogle.golang.org/genproto/googleapis/marketingplatform/admin/v1" - + "alpha;admin\252\002*Google.Ads.MarketingPlatfo" - + "rm.Admin.V1Alpha\312\002*Google\\Ads\\MarketingP" - + "latform\\Admin\\V1alpha\352\002.Google::Ads::MarketingPlatform::Admin::V1alpha\352A?\n" + + "\017GetOrganization\022>.google.marketingplatform.admin.v" + + "1alpha.GetOrganizationRequest\0324.google.marketingplatform.admin.v1alpha.Organizat" + + "ion\".\332A\004name\202\323\344\223\002!\022\037/v1alpha/{name=organizations/*}\022\270\001\n" + + "\021ListOrganizations\022@.google.marketingplatform.admin.v1alpha.ListO" + + "rganizationsRequest\032A.google.marketingplatform.admin.v1alpha.ListOrganizationsRe" + + "sponse\"\036\202\323\344\223\002\030\022\026/v1alpha/organizations\022\222\002\n" + + "\036FindSalesPartnerManagedClients\022M.google.marketingplatform.admin.v1alpha.FindS" + + "alesPartnerManagedClientsRequest\032N.google.marketingplatform.admin.v1alpha.FindSa" + + "lesPartnerManagedClientsResponse\"Q\202\323\344\223\002K" + + "\"F/v1alpha/{organization=organizations/*}:findSalesPartnerManagedClients:\001*\022\372\001\n" + + "\031ListAnalyticsAccountLinks\022H.google.marke" + + "tingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest\032I.google.marketingpl" + + "atform.admin.v1alpha.ListAnalyticsAccoun" + + "tLinksResponse\"H\332A\006parent\202\323\344\223\0029\0227/v1alph" + + "a/{parent=organizations/*}/analyticsAccountLinks\022\236\002\n" + + "\032CreateAnalyticsAccountLink\022I.google.marketingplatform.admin.v1alpha" + + ".CreateAnalyticsAccountLinkRequest\032<.google.marketingplatform.admin.v1alpha.Anal" + + "yticsAccountLink\"w\332A\035parent,analytics_ac" + + "count_link\202\323\344\223\002Q\"7/v1alpha/{parent=organ" + + "izations/*}/analyticsAccountLinks:\026analytics_account_link\022\307\001\n" + + "\032DeleteAnalyticsAccountLink\022I.google.marketingplatform.admi" + + "n.v1alpha.DeleteAnalyticsAccountLinkRequ" + + "est\032\026.google.protobuf.Empty\"F\332A\004name\202\323\344\223" + + "\0029*7/v1alpha/{name=organizations/*/analyticsAccountLinks/*}\022\262\002\n" + + "\027SetPropertyServiceLevel\022F.google.marketingplatform.admin" + + ".v1alpha.SetPropertyServiceLevelRequest\032G.google.marketingplatform.admin.v1alpha" + + ".SetPropertyServiceLevelResponse\"\205\001\332A\026an" + + "alytics_account_link\202\323\344\223\002f\"a/v1alpha/{an" + + "alytics_account_link=organizations/*/ana" + + "lyticsAccountLinks/*}:setPropertyServiceLevel:\001*\022\365\001\n" + + "\023ReportPropertyUsage\022B.google.marketingplatform.admin.v1alpha.Report" + + "PropertyUsageRequest\032C.google.marketingplatform.admin.v1alpha.ReportPropertyUsag" + + "eResponse\"U\332A\014organization\202\323\344\223\002@\";/v1alp" + + "ha/{organization=organizations/*}:reportPropertyUsage:\001*\022\273\001\n" + + "\014GetUserGroup\022;.google.marketingplatform.admin.v1alpha.GetUs" + + "erGroupRequest\0321.google.marketingplatfor" + + "m.admin.v1alpha.UserGroup\";\332A\004name\202\323\344\223\002." + + "\022,/v1alpha/{name=organizations/*/userGroups/*}\022\316\001\n" + + "\016ListUserGroups\022=.google.marketingplatform.admin.v1alpha.ListUserGroup" + + "sRequest\032>.google.marketingplatform.admi" + + "n.v1alpha.ListUserGroupsResponse\"=\332A\006par" + + "ent\202\323\344\223\002.\022,/v1alpha/{parent=organizations/*}/userGroups\022\332\001\n" + + "\017CreateUserGroup\022>.google.marketingplatform.admin.v1alpha.Cre" + + "ateUserGroupRequest\0321.google.marketingpl" + + "atform.admin.v1alpha.UserGroup\"T\332A\021paren" + + "t,user_group\202\323\344\223\002:\",/v1alpha/{parent=organizations/*}/userGroups:\n" + + "user_group\022\352\001\n" + + "\017UpdateUserGroup\022>.google.marketingplatform.admin.v1alpha.UpdateUserGroupRequest" + + "\0321.google.marketingplatform.admin.v1alph" + + "a.UserGroup\"d\332A\026user_group,update_mask\202\323" + + "\344\223\002E27/v1alpha/{user_group.name=organizations/*/userGroups/*}:\n" + + "user_group\022\246\001\n" + + "\017DeleteUserGroup\022>.google.marketingplatform" + + ".admin.v1alpha.DeleteUserGroupRequest\032\026." + + "google.protobuf.Empty\";\332A\004name\202\323\344\223\002.*,/v" + + "1alpha/{name=organizations/*/userGroups/*}\022\327\001\n" + + "\022GetUserGroupMember\022A.google.marketingplatform.admin.v1alpha.GetUserGroupM" + + "emberRequest\0327.google.marketingplatform." + + "admin.v1alpha.UserGroupMember\"E\332A\004name\202\323" + + "\344\223\0028\0226/v1alpha/{name=organizations/*/userGroups/*/members/*}\022\352\001\n" + + "\024ListUserGroupMembers\022C.google.marketingplatform.admin.v" + + "1alpha.ListUserGroupMembersRequest\032D.google.marketingplatform.admin.v1alpha.List" + + "UserGroupMembersResponse\"G\332A\006parent\202\323\344\223\002" + + "8\0226/v1alpha/{parent=organizations/*/userGroups/*}/members\022\204\002\n" + + "\025CreateUserGroupMember\022D.google.marketingplatform.admin.v1a" + + "lpha.CreateUserGroupMemberRequest\0327.google.marketingplatform.admin.v1alpha.UserG" + + "roupMember\"l\332A\030parent,user_group_member\202" + + "\323\344\223\002K\"6/v1alpha/{parent=organizations/*/" + + "userGroups/*}/members:\021user_group_member\022\234\002\n" + + "\025UpdateUserGroupMember\022D.google.marketingplatform.admin.v1alpha.UpdateUserGr" + + "oupMemberRequest\0327.google.marketingplatf" + + "orm.admin.v1alpha.UserGroupMember\"\203\001\332A\035u" + + "ser_group_member,update_mask\202\323\344\223\002]2H/v1a" + + "lpha/{user_group_member.name=organizatio" + + "ns/*/userGroups/*/members/*}:\021user_group_member\022\274\001\n" + + "\025DeleteUserGroupMember\022D.google.marketingplatform.admin.v1alpha.Delet" + + "eUserGroupMemberRequest\032\026.google.protobu" + + "f.Empty\"E\332A\004name\202\323\344\223\0028*6/v1alpha/{name=o" + + "rganizations/*/userGroups/*/members/*}\022\337\001\n" + + "\025GetAdminAccessBinding\022D.google.marketingplatform.admin.v1alpha.GetAdminAccess" + + "BindingRequest\032:.google.marketingplatfor" + + "m.admin.v1alpha.AdminAccessBinding\"D\332A\004n" + + "ame\202\323\344\223\0027\0225/v1alpha/{name=organizations/*/adminAccessBindings/*}\022\362\001\n" + + "\027ListAdminAccessBindings\022F.google.marketingplatform." + + "admin.v1alpha.ListAdminAccessBindingsRequest\032G.google.marketingplatform.admin.v1" + + "alpha.ListAdminAccessBindingsResponse\"F\332" + + "A\006parent\202\323\344\223\0027\0225/v1alpha/{parent=organizations/*}/adminAccessBindings\022\222\002\n" + + "\030CreateAdminAccessBinding\022G.google.marketingpla" + + "tform.admin.v1alpha.CreateAdminAccessBindingRequest\032:.google.marketingplatform.a" + + "dmin.v1alpha.AdminAccessBinding\"q\332A\033pare" + + "nt,admin_access_binding\202\323\344\223\002M\"5/v1alpha/" + + "{parent=organizations/*}/adminAccessBindings:\024admin_access_binding\022\255\002\n" + + "\030UpdateAdminAccessBinding\022G.google.marketingplatfo" + + "rm.admin.v1alpha.UpdateAdminAccessBindin" + + "gRequest\032:.google.marketingplatform.admin.v1alpha.AdminAccessBinding\"\213\001\332A" + + " admin_access_binding,update_mask\202\323\344\223\002b2J/v1alp" + + "ha/{admin_access_binding.name=organizations/*/adminAccessBindings/*}:\024admin_acce" + + "ss_binding\032\271\001\312A%marketingplatformadmin.g" + + "oogleapis.com\322A\215\001https://www.googleapis." + + "com/auth/marketingplatformadmin.analytics.read,https://www.googleapis.com/auth/m" + + "arketingplatformadmin.analytics.updateB\351\002\n" + + ".com.google.ads.marketingplatform.admin.v1alphaB\033MarketingplatformAdminProtoP\001" + + "ZKgoogle.golang.org/genproto/googleapis/marketingplatform/admin/v1alpha;admin\252\002*" + + "Google.Ads.MarketingPlatform.Admin.V1Alp" + + "ha\312\002*Google\\Ads\\MarketingPlatform\\Admin\\" + + "V1alpha\352\002.Google::Ads::MarketingPlatform::Admin::V1alpha\352A?\n" + "&analyticsadmin.googleapis.com/Property\022\025properties/{property}b\006proto3" }; descriptor = @@ -246,6 +448,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ResourceProto.getDescriptor(), com.google.ads.marketingplatform.admin.v1alpha.ResourcesProto.getDescriptor(), com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), com.google.type.DateProto.getDescriptor(), com.google.type.MoneyProto.getDescriptor(), }); @@ -384,6 +587,142 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "BaseFee", "EventFee", "PriceProtectionCredit", "Total", }); + internal_static_google_marketingplatform_admin_v1alpha_GetUserGroupRequest_descriptor = + getDescriptor().getMessageType(13); + internal_static_google_marketingplatform_admin_v1alpha_GetUserGroupRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_marketingplatform_admin_v1alpha_GetUserGroupRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_marketingplatform_admin_v1alpha_ListUserGroupsRequest_descriptor = + getDescriptor().getMessageType(14); + internal_static_google_marketingplatform_admin_v1alpha_ListUserGroupsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_marketingplatform_admin_v1alpha_ListUserGroupsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_marketingplatform_admin_v1alpha_ListUserGroupsResponse_descriptor = + getDescriptor().getMessageType(15); + internal_static_google_marketingplatform_admin_v1alpha_ListUserGroupsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_marketingplatform_admin_v1alpha_ListUserGroupsResponse_descriptor, + new java.lang.String[] { + "UserGroups", "NextPageToken", + }); + internal_static_google_marketingplatform_admin_v1alpha_CreateUserGroupRequest_descriptor = + getDescriptor().getMessageType(16); + internal_static_google_marketingplatform_admin_v1alpha_CreateUserGroupRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_marketingplatform_admin_v1alpha_CreateUserGroupRequest_descriptor, + new java.lang.String[] { + "Parent", "UserGroup", + }); + internal_static_google_marketingplatform_admin_v1alpha_UpdateUserGroupRequest_descriptor = + getDescriptor().getMessageType(17); + internal_static_google_marketingplatform_admin_v1alpha_UpdateUserGroupRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_marketingplatform_admin_v1alpha_UpdateUserGroupRequest_descriptor, + new java.lang.String[] { + "UserGroup", "UpdateMask", + }); + internal_static_google_marketingplatform_admin_v1alpha_DeleteUserGroupRequest_descriptor = + getDescriptor().getMessageType(18); + internal_static_google_marketingplatform_admin_v1alpha_DeleteUserGroupRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_marketingplatform_admin_v1alpha_DeleteUserGroupRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_marketingplatform_admin_v1alpha_GetUserGroupMemberRequest_descriptor = + getDescriptor().getMessageType(19); + internal_static_google_marketingplatform_admin_v1alpha_GetUserGroupMemberRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_marketingplatform_admin_v1alpha_GetUserGroupMemberRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_marketingplatform_admin_v1alpha_ListUserGroupMembersRequest_descriptor = + getDescriptor().getMessageType(20); + internal_static_google_marketingplatform_admin_v1alpha_ListUserGroupMembersRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_marketingplatform_admin_v1alpha_ListUserGroupMembersRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_marketingplatform_admin_v1alpha_ListUserGroupMembersResponse_descriptor = + getDescriptor().getMessageType(21); + internal_static_google_marketingplatform_admin_v1alpha_ListUserGroupMembersResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_marketingplatform_admin_v1alpha_ListUserGroupMembersResponse_descriptor, + new java.lang.String[] { + "UserGroupMembers", "NextPageToken", + }); + internal_static_google_marketingplatform_admin_v1alpha_CreateUserGroupMemberRequest_descriptor = + getDescriptor().getMessageType(22); + internal_static_google_marketingplatform_admin_v1alpha_CreateUserGroupMemberRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_marketingplatform_admin_v1alpha_CreateUserGroupMemberRequest_descriptor, + new java.lang.String[] { + "Parent", "UserGroupMember", + }); + internal_static_google_marketingplatform_admin_v1alpha_UpdateUserGroupMemberRequest_descriptor = + getDescriptor().getMessageType(23); + internal_static_google_marketingplatform_admin_v1alpha_UpdateUserGroupMemberRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_marketingplatform_admin_v1alpha_UpdateUserGroupMemberRequest_descriptor, + new java.lang.String[] { + "UserGroupMember", "UpdateMask", + }); + internal_static_google_marketingplatform_admin_v1alpha_DeleteUserGroupMemberRequest_descriptor = + getDescriptor().getMessageType(24); + internal_static_google_marketingplatform_admin_v1alpha_DeleteUserGroupMemberRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_marketingplatform_admin_v1alpha_DeleteUserGroupMemberRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_marketingplatform_admin_v1alpha_GetAdminAccessBindingRequest_descriptor = + getDescriptor().getMessageType(25); + internal_static_google_marketingplatform_admin_v1alpha_GetAdminAccessBindingRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_marketingplatform_admin_v1alpha_GetAdminAccessBindingRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_marketingplatform_admin_v1alpha_ListAdminAccessBindingsRequest_descriptor = + getDescriptor().getMessageType(26); + internal_static_google_marketingplatform_admin_v1alpha_ListAdminAccessBindingsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_marketingplatform_admin_v1alpha_ListAdminAccessBindingsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_marketingplatform_admin_v1alpha_ListAdminAccessBindingsResponse_descriptor = + getDescriptor().getMessageType(27); + internal_static_google_marketingplatform_admin_v1alpha_ListAdminAccessBindingsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_marketingplatform_admin_v1alpha_ListAdminAccessBindingsResponse_descriptor, + new java.lang.String[] { + "AdminAccessBindings", "NextPageToken", + }); + internal_static_google_marketingplatform_admin_v1alpha_CreateAdminAccessBindingRequest_descriptor = + getDescriptor().getMessageType(28); + internal_static_google_marketingplatform_admin_v1alpha_CreateAdminAccessBindingRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_marketingplatform_admin_v1alpha_CreateAdminAccessBindingRequest_descriptor, + new java.lang.String[] { + "Parent", "AdminAccessBinding", + }); + internal_static_google_marketingplatform_admin_v1alpha_UpdateAdminAccessBindingRequest_descriptor = + getDescriptor().getMessageType(29); + internal_static_google_marketingplatform_admin_v1alpha_UpdateAdminAccessBindingRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_marketingplatform_admin_v1alpha_UpdateAdminAccessBindingRequest_descriptor, + new java.lang.String[] { + "AdminAccessBinding", "UpdateMask", + }); descriptor.resolveAllFeaturesImmutable(); com.google.api.AnnotationsProto.getDescriptor(); com.google.api.ClientProto.getDescriptor(); @@ -391,6 +730,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ResourceProto.getDescriptor(); com.google.ads.marketingplatform.admin.v1alpha.ResourcesProto.getDescriptor(); com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); com.google.type.DateProto.getDescriptor(); com.google.type.MoneyProto.getDescriptor(); com.google.protobuf.ExtensionRegistry registry = diff --git a/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/OrganizationRole.java b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/OrganizationRole.java new file mode 100644 index 000000000000..0ac69cb12fba --- /dev/null +++ b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/OrganizationRole.java @@ -0,0 +1,220 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/marketingplatform/admin/v1alpha/resources.proto +// Protobuf Java Version: 4.33.6 + +package com.google.ads.marketingplatform.admin.v1alpha; + +/** + * + * + *
+ * Roles that can be assigned to a user or user group in a GMP organization.
+ * 
+ * + * Protobuf enum {@code google.marketingplatform.admin.v1alpha.OrganizationRole} + */ +@com.google.protobuf.Generated +public enum OrganizationRole implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Unknown or unspecified organization role.
+   * 
+ * + * ORGANIZATION_ROLE_UNSPECIFIED = 0; + */ + ORGANIZATION_ROLE_UNSPECIFIED(0), + /** + * + * + *
+   * Organization admin role that grants all administrative privileges.
+   * 
+ * + * ORG_ADMIN_ROLE = 1; + */ + ORG_ADMIN_ROLE(1), + /** + * + * + *
+   * User admin role that grants access to the Users section to perform various
+   * user management functions.
+   * 
+ * + * USER_ADMIN_ROLE = 2; + */ + USER_ADMIN_ROLE(2), + /** + * + * + *
+   * Billing admin role that grants access to the Billing section to perform
+   * various billing-related functions.
+   * 
+ * + * BILLING_ADMIN_ROLE = 3; + */ + BILLING_ADMIN_ROLE(3), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "OrganizationRole"); + } + + /** + * + * + *
+   * Unknown or unspecified organization role.
+   * 
+ * + * ORGANIZATION_ROLE_UNSPECIFIED = 0; + */ + public static final int ORGANIZATION_ROLE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+   * Organization admin role that grants all administrative privileges.
+   * 
+ * + * ORG_ADMIN_ROLE = 1; + */ + public static final int ORG_ADMIN_ROLE_VALUE = 1; + + /** + * + * + *
+   * User admin role that grants access to the Users section to perform various
+   * user management functions.
+   * 
+ * + * USER_ADMIN_ROLE = 2; + */ + public static final int USER_ADMIN_ROLE_VALUE = 2; + + /** + * + * + *
+   * Billing admin role that grants access to the Billing section to perform
+   * various billing-related functions.
+   * 
+ * + * BILLING_ADMIN_ROLE = 3; + */ + public static final int BILLING_ADMIN_ROLE_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static OrganizationRole valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static OrganizationRole forNumber(int value) { + switch (value) { + case 0: + return ORGANIZATION_ROLE_UNSPECIFIED; + case 1: + return ORG_ADMIN_ROLE; + case 2: + return USER_ADMIN_ROLE; + case 3: + return BILLING_ADMIN_ROLE; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public OrganizationRole findValueByNumber(int number) { + return OrganizationRole.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.ads.marketingplatform.admin.v1alpha.ResourcesProto.getDescriptor() + .getEnumTypes() + .get(3); + } + + private static final OrganizationRole[] VALUES = values(); + + public static OrganizationRole valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private OrganizationRole(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.marketingplatform.admin.v1alpha.OrganizationRole) +} diff --git a/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/ResourcesProto.java b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/ResourcesProto.java index 4b4b03ce2518..1d577aebe44c 100644 --- a/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/ResourcesProto.java +++ b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/ResourcesProto.java @@ -48,6 +48,18 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_marketingplatform_admin_v1alpha_AnalyticsAccountLink_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_marketingplatform_admin_v1alpha_AnalyticsAccountLink_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_marketingplatform_admin_v1alpha_UserGroup_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_marketingplatform_admin_v1alpha_UserGroup_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_marketingplatform_admin_v1alpha_UserGroupMember_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_marketingplatform_admin_v1alpha_UserGroupMember_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_marketingplatform_admin_v1alpha_AdminAccessBinding_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_marketingplatform_admin_v1alpha_AdminAccessBinding_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -57,46 +69,80 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { - "\n6google/marketingplatform/admin/v1alpha" - + "/resources.proto\022&google.marketingplatfo" - + "rm.admin.v1alpha\032\037google/api/field_behav" - + "ior.proto\032\031google/api/resource.proto\"\253\001\n" - + "\014Organization\022\021\n\004name\030\001 \001(\tB\003\340A\010\022\024\n\014disp" - + "lay_name\030\002 \001(\t:r\352Ao\n2marketingplatformad" - + "min.googleapis.com/Organization\022\034organiz" - + "ations/{organization}*\rorganizations2\014or" - + "ganization\"\263\003\n\024AnalyticsAccountLink\022\021\n\004n" - + "ame\030\001 \001(\tB\003\340A\010\022K\n\021analytics_account\030\002 \001(" - + "\tB0\340A\002\340A\005\372A\'\n%analyticsadmin.googleapis." - + "com/Account\022\031\n\014display_name\030\003 \001(\tB\003\340A\003\022c" - + "\n\027link_verification_state\030\004 \001(\0162=.google" - + ".marketingplatform.admin.v1alpha.LinkVer" - + "ificationStateB\003\340A\003:\272\001\352A\266\001\n:marketingpla" - + "tformadmin.googleapis.com/AnalyticsAccou" - + "ntLink\022Korganizations/{organization}/ana" - + "lyticsAccountLinks/{analytics_account_li" - + "nk}*\025analyticsAccountLinks2\024analyticsAcc" - + "ountLink*\220\001\n\025LinkVerificationState\022\'\n#LI" - + "NK_VERIFICATION_STATE_UNSPECIFIED\020\000\022$\n L" - + "INK_VERIFICATION_STATE_VERIFIED\020\001\022(\n$LIN" - + "K_VERIFICATION_STATE_NOT_VERIFIED\020\002*\207\001\n\025" - + "AnalyticsServiceLevel\022\'\n#ANALYTICS_SERVI" - + "CE_LEVEL_UNSPECIFIED\020\000\022$\n ANALYTICS_SERV" - + "ICE_LEVEL_STANDARD\020\001\022\037\n\033ANALYTICS_SERVIC" - + "E_LEVEL_360\020\002*\263\001\n\025AnalyticsPropertyType\022" - + "\'\n#ANALYTICS_PROPERTY_TYPE_UNSPECIFIED\020\000" - + "\022$\n ANALYTICS_PROPERTY_TYPE_ORDINARY\020\001\022\'" - + "\n#ANALYTICS_PROPERTY_TYPE_SUBPROPERTY\020\002\022" - + "\"\n\036ANALYTICS_PROPERTY_TYPE_ROLLUP\020\003B\330\002\n." - + "com.google.ads.marketingplatform.admin.v" - + "1alphaB\016ResourcesProtoP\001ZKgoogle.golang." - + "org/genproto/googleapis/marketingplatfor" - + "m/admin/v1alpha;admin\252\002*Google.Ads.Marke" - + "tingPlatform.Admin.V1Alpha\312\002*Google\\Ads\\" - + "MarketingPlatform\\Admin\\V1alpha\352\002.Google" - + "::Ads::MarketingPlatform::Admin::V1alpha" - + "\352A;\n%analyticsadmin.googleapis.com/Accou" - + "nt\022\022accounts/{account}b\006proto3" + "\n" + + "6google/marketingplatform/admin/v1alpha/resources.proto\022&google.marketingplatfo" + + "rm.admin.v1alpha\032\037google/api/field_behavior.proto\032\031google/api/resource.proto\"\253\001\n" + + "\014Organization\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\010\022\024\n" + + "\014display_name\030\002 \001(\t:r\352Ao\n" + + "2marketingplatformad" + + "min.googleapis.com/Organization\022\034organizations/{organization}*\r" + + "organizations2\014organization\"\263\003\n" + + "\024AnalyticsAccountLink\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\010\022K\n" + + "\021analytics_account\030\002 \001(\tB0\340A\002\340A\005\372A\'\n" + + "%analyticsadmin.googleapis.com/Account\022\031\n" + + "\014display_name\030\003 \001(\tB\003\340A\003\022c\n" + + "\027link_verification_state\030\004 \001(\0162=.google" + + ".marketingplatform.admin.v1alpha.LinkVerificationStateB\003\340A\003:\272\001\352A\266\001\n" + + ":marketingplatformadmin.googleapis.com/AnalyticsAccou" + + "ntLink\022Korganizations/{organization}/analyticsAccountLinks/{analytics_account_li" + + "nk}*\025analyticsAccountLinks2\024analyticsAccountLink\"\327\001\n" + + "\tUserGroup\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\010\022\031\n" + + "\014display_name\030\002 \001(\tB\003\340A\001\022\030\n" + + "\013description\030\003 \001(\tB\003\340A\001:\201\001\352A~\n" + + "/marketingplatformadmin.googleapis.com/UserGroup\0224organizat" + + "ions/{organization}/userGroups/{user_group}*\n" + + "userGroups2\tuserGroup\"\322\003\n" + + "\017UserGroupMember\022\024\n\n" + + "user_email\030\002 \001(\tH\000\022\024\n\n" + + "user_group\030\003 \001(\tH\000\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\010\022d\n" + + "\017membership_role\030\004 \001(\0162F.google.marketingplatfor" + + "m.admin.v1alpha.UserGroupMember.MembershipRoleB\003\340A\001\"h\n" + + "\016MembershipRole\022\037\n" + + "\033MEMBERSHIP_ROLE_UNSPECIFIED\020\000\022\031\n" + + "\025MEMBERSHIP_ROLE_OWNER\020\001\022\032\n" + + "\026MEMBERSHIP_ROLE_MEMBER\020\002:\245\001\352A\241\001\n" + + "5marketingplatformadmin.googleapis.com/UserGroupMember\022Eorganizations/{orga" + + "nization}/userGroups/{user_group}/member" + + "s/{member}*\020userGroupMembers2\017userGroupMemberB\010\n" + + "\006member\"\362\002\n" + + "\022AdminAccessBinding\022\024\n\n" + + "user_email\030\002 \001(\tH\000\022\024\n\n" + + "user_group\030\003 \001(\tH\000\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\010\022Y\n" + + "\022organization_roles\030\004" + + " \003(\01628.google.marketingplatform.admin.v1alpha.OrganizationRoleB\003\340A\001:\260\001\352A\254\001\n" + + "8marketingplatformadmin.googleapis.com/AdminAccessBinding\022Gorganizations/{organi" + + "zation}/adminAccessBindings/{admin_acces" + + "s_binding}*\023adminAccessBindings2\022adminAccessBindingB\017\n\r" + + "access_target*\220\001\n" + + "\025LinkVerificationState\022\'\n" + + "#LINK_VERIFICATION_STATE_UNSPECIFIED\020\000\022$\n" + + " LINK_VERIFICATION_STATE_VERIFIED\020\001\022(\n" + + "$LINK_VERIFICATION_STATE_NOT_VERIFIED\020\002*\207\001\n" + + "\025AnalyticsServiceLevel\022\'\n" + + "#ANALYTICS_SERVICE_LEVEL_UNSPECIFIED\020\000\022$\n" + + " ANALYTICS_SERVICE_LEVEL_STANDARD\020\001\022\037\n" + + "\033ANALYTICS_SERVICE_LEVEL_360\020\002*\263\001\n" + + "\025AnalyticsPropertyType\022\'\n" + + "#ANALYTICS_PROPERTY_TYPE_UNSPECIFIED\020\000\022$\n" + + " ANALYTICS_PROPERTY_TYPE_ORDINARY\020\001\022\'\n" + + "#ANALYTICS_PROPERTY_TYPE_SUBPROPERTY\020\002\022\"\n" + + "\036ANALYTICS_PROPERTY_TYPE_ROLLUP\020\003*v\n" + + "\020OrganizationRole\022!\n" + + "\035ORGANIZATION_ROLE_UNSPECIFIED\020\000\022\022\n" + + "\016ORG_ADMIN_ROLE\020\001\022\023\n" + + "\017USER_ADMIN_ROLE\020\002\022\026\n" + + "\022BILLING_ADMIN_ROLE\020\003B\330\002\n" + + ".com.google.ads.marketingplatform.admin.v1alphaB\016ResourcesPro" + + "toP\001ZKgoogle.golang.org/genproto/googleapis/marketingplatform/admin/v1alpha;admi" + + "n\252\002*Google.Ads.MarketingPlatform.Admin.V" + + "1Alpha\312\002*Google\\Ads\\MarketingPlatform\\Ad" + + "min\\V1alpha\352\002.Google::Ads::MarketingPlatform::Admin::V1alpha\352A;\n" + + "%analyticsadmin.googleapis.com/Account\022\022accounts/{account}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -121,6 +167,30 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Name", "AnalyticsAccount", "DisplayName", "LinkVerificationState", }); + internal_static_google_marketingplatform_admin_v1alpha_UserGroup_descriptor = + getDescriptor().getMessageType(2); + internal_static_google_marketingplatform_admin_v1alpha_UserGroup_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_marketingplatform_admin_v1alpha_UserGroup_descriptor, + new java.lang.String[] { + "Name", "DisplayName", "Description", + }); + internal_static_google_marketingplatform_admin_v1alpha_UserGroupMember_descriptor = + getDescriptor().getMessageType(3); + internal_static_google_marketingplatform_admin_v1alpha_UserGroupMember_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_marketingplatform_admin_v1alpha_UserGroupMember_descriptor, + new java.lang.String[] { + "UserEmail", "UserGroup", "Name", "MembershipRole", "Member", + }); + internal_static_google_marketingplatform_admin_v1alpha_AdminAccessBinding_descriptor = + getDescriptor().getMessageType(4); + internal_static_google_marketingplatform_admin_v1alpha_AdminAccessBinding_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_marketingplatform_admin_v1alpha_AdminAccessBinding_descriptor, + new java.lang.String[] { + "UserEmail", "UserGroup", "Name", "OrganizationRoles", "AccessTarget", + }); descriptor.resolveAllFeaturesImmutable(); com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); diff --git a/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/UpdateAdminAccessBindingRequest.java b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/UpdateAdminAccessBindingRequest.java new file mode 100644 index 000000000000..ff1908ae5bf9 --- /dev/null +++ b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/UpdateAdminAccessBindingRequest.java @@ -0,0 +1,1086 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/marketingplatform/admin/v1alpha/marketingplatform_admin.proto +// Protobuf Java Version: 4.33.6 + +package com.google.ads.marketingplatform.admin.v1alpha; + +/** + * + * + *
+ * Request message for UpdateAdminAccessBinding RPC.
+ * 
+ * + * Protobuf type {@code google.marketingplatform.admin.v1alpha.UpdateAdminAccessBindingRequest} + */ +@com.google.protobuf.Generated +public final class UpdateAdminAccessBindingRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.marketingplatform.admin.v1alpha.UpdateAdminAccessBindingRequest) + UpdateAdminAccessBindingRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "UpdateAdminAccessBindingRequest"); + } + + // Use UpdateAdminAccessBindingRequest.newBuilder() to construct. + private UpdateAdminAccessBindingRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private UpdateAdminAccessBindingRequest() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_UpdateAdminAccessBindingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_UpdateAdminAccessBindingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.ads.marketingplatform.admin.v1alpha.UpdateAdminAccessBindingRequest.class, + com.google.ads.marketingplatform.admin.v1alpha.UpdateAdminAccessBindingRequest.Builder + .class); + } + + private int bitField0_; + public static final int ADMIN_ACCESS_BINDING_FIELD_NUMBER = 1; + private com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding adminAccessBinding_; + + /** + * + * + *
+   * Required. The AdminAccessBinding to update.
+   * 
+ * + * + * .google.marketingplatform.admin.v1alpha.AdminAccessBinding admin_access_binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the adminAccessBinding field is set. + */ + @java.lang.Override + public boolean hasAdminAccessBinding() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The AdminAccessBinding to update.
+   * 
+ * + * + * .google.marketingplatform.admin.v1alpha.AdminAccessBinding admin_access_binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The adminAccessBinding. + */ + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding getAdminAccessBinding() { + return adminAccessBinding_ == null + ? com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding.getDefaultInstance() + : adminAccessBinding_; + } + + /** + * + * + *
+   * Required. The AdminAccessBinding to update.
+   * 
+ * + * + * .google.marketingplatform.admin.v1alpha.AdminAccessBinding admin_access_binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBindingOrBuilder + getAdminAccessBindingOrBuilder() { + return adminAccessBinding_ == null + ? com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding.getDefaultInstance() + : adminAccessBinding_; + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + + /** + * + * + *
+   * Required. The list of fields to update. Field names must be in snake case
+   * (for example, "field_to_update"). Omitted fields will not be updated. To
+   * replace the entire entity, use one path with the string "*" to match all
+   * fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Required. The list of fields to update. Field names must be in snake case
+   * (for example, "field_to_update"). Omitted fields will not be updated. To
+   * replace the entire entity, use one path with the string "*" to match all
+   * fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + /** + * + * + *
+   * Required. The list of fields to update. Field names must be in snake case
+   * (for example, "field_to_update"). Omitted fields will not be updated. To
+   * replace the entire entity, use one path with the string "*" to match all
+   * fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getAdminAccessBinding()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getUpdateMask()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getAdminAccessBinding()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.ads.marketingplatform.admin.v1alpha.UpdateAdminAccessBindingRequest)) { + return super.equals(obj); + } + com.google.ads.marketingplatform.admin.v1alpha.UpdateAdminAccessBindingRequest other = + (com.google.ads.marketingplatform.admin.v1alpha.UpdateAdminAccessBindingRequest) obj; + + if (hasAdminAccessBinding() != other.hasAdminAccessBinding()) return false; + if (hasAdminAccessBinding()) { + if (!getAdminAccessBinding().equals(other.getAdminAccessBinding())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAdminAccessBinding()) { + hash = (37 * hash) + ADMIN_ACCESS_BINDING_FIELD_NUMBER; + hash = (53 * hash) + getAdminAccessBinding().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.ads.marketingplatform.admin.v1alpha.UpdateAdminAccessBindingRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.UpdateAdminAccessBindingRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.UpdateAdminAccessBindingRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.UpdateAdminAccessBindingRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.UpdateAdminAccessBindingRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.UpdateAdminAccessBindingRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.UpdateAdminAccessBindingRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.UpdateAdminAccessBindingRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.UpdateAdminAccessBindingRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.UpdateAdminAccessBindingRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.UpdateAdminAccessBindingRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.UpdateAdminAccessBindingRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.ads.marketingplatform.admin.v1alpha.UpdateAdminAccessBindingRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for UpdateAdminAccessBinding RPC.
+   * 
+ * + * Protobuf type {@code google.marketingplatform.admin.v1alpha.UpdateAdminAccessBindingRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.marketingplatform.admin.v1alpha.UpdateAdminAccessBindingRequest) + com.google.ads.marketingplatform.admin.v1alpha.UpdateAdminAccessBindingRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_UpdateAdminAccessBindingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_UpdateAdminAccessBindingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.ads.marketingplatform.admin.v1alpha.UpdateAdminAccessBindingRequest.class, + com.google.ads.marketingplatform.admin.v1alpha.UpdateAdminAccessBindingRequest.Builder + .class); + } + + // Construct using + // com.google.ads.marketingplatform.admin.v1alpha.UpdateAdminAccessBindingRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetAdminAccessBindingFieldBuilder(); + internalGetUpdateMaskFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + adminAccessBinding_ = null; + if (adminAccessBindingBuilder_ != null) { + adminAccessBindingBuilder_.dispose(); + adminAccessBindingBuilder_ = null; + } + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_UpdateAdminAccessBindingRequest_descriptor; + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.UpdateAdminAccessBindingRequest + getDefaultInstanceForType() { + return com.google.ads.marketingplatform.admin.v1alpha.UpdateAdminAccessBindingRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.UpdateAdminAccessBindingRequest build() { + com.google.ads.marketingplatform.admin.v1alpha.UpdateAdminAccessBindingRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.UpdateAdminAccessBindingRequest + buildPartial() { + com.google.ads.marketingplatform.admin.v1alpha.UpdateAdminAccessBindingRequest result = + new com.google.ads.marketingplatform.admin.v1alpha.UpdateAdminAccessBindingRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.ads.marketingplatform.admin.v1alpha.UpdateAdminAccessBindingRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.adminAccessBinding_ = + adminAccessBindingBuilder_ == null + ? adminAccessBinding_ + : adminAccessBindingBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.ads.marketingplatform.admin.v1alpha.UpdateAdminAccessBindingRequest) { + return mergeFrom( + (com.google.ads.marketingplatform.admin.v1alpha.UpdateAdminAccessBindingRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.ads.marketingplatform.admin.v1alpha.UpdateAdminAccessBindingRequest other) { + if (other + == com.google.ads.marketingplatform.admin.v1alpha.UpdateAdminAccessBindingRequest + .getDefaultInstance()) return this; + if (other.hasAdminAccessBinding()) { + mergeAdminAccessBinding(other.getAdminAccessBinding()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetAdminAccessBindingFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding adminAccessBinding_; + private com.google.protobuf.SingleFieldBuilder< + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding, + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding.Builder, + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBindingOrBuilder> + adminAccessBindingBuilder_; + + /** + * + * + *
+     * Required. The AdminAccessBinding to update.
+     * 
+ * + * + * .google.marketingplatform.admin.v1alpha.AdminAccessBinding admin_access_binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the adminAccessBinding field is set. + */ + public boolean hasAdminAccessBinding() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. The AdminAccessBinding to update.
+     * 
+ * + * + * .google.marketingplatform.admin.v1alpha.AdminAccessBinding admin_access_binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The adminAccessBinding. + */ + public com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding + getAdminAccessBinding() { + if (adminAccessBindingBuilder_ == null) { + return adminAccessBinding_ == null + ? com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding.getDefaultInstance() + : adminAccessBinding_; + } else { + return adminAccessBindingBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The AdminAccessBinding to update.
+     * 
+ * + * + * .google.marketingplatform.admin.v1alpha.AdminAccessBinding admin_access_binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAdminAccessBinding( + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding value) { + if (adminAccessBindingBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + adminAccessBinding_ = value; + } else { + adminAccessBindingBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The AdminAccessBinding to update.
+     * 
+ * + * + * .google.marketingplatform.admin.v1alpha.AdminAccessBinding admin_access_binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAdminAccessBinding( + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding.Builder builderForValue) { + if (adminAccessBindingBuilder_ == null) { + adminAccessBinding_ = builderForValue.build(); + } else { + adminAccessBindingBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The AdminAccessBinding to update.
+     * 
+ * + * + * .google.marketingplatform.admin.v1alpha.AdminAccessBinding admin_access_binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeAdminAccessBinding( + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding value) { + if (adminAccessBindingBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && adminAccessBinding_ != null + && adminAccessBinding_ + != com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding + .getDefaultInstance()) { + getAdminAccessBindingBuilder().mergeFrom(value); + } else { + adminAccessBinding_ = value; + } + } else { + adminAccessBindingBuilder_.mergeFrom(value); + } + if (adminAccessBinding_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The AdminAccessBinding to update.
+     * 
+ * + * + * .google.marketingplatform.admin.v1alpha.AdminAccessBinding admin_access_binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearAdminAccessBinding() { + bitField0_ = (bitField0_ & ~0x00000001); + adminAccessBinding_ = null; + if (adminAccessBindingBuilder_ != null) { + adminAccessBindingBuilder_.dispose(); + adminAccessBindingBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The AdminAccessBinding to update.
+     * 
+ * + * + * .google.marketingplatform.admin.v1alpha.AdminAccessBinding admin_access_binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding.Builder + getAdminAccessBindingBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetAdminAccessBindingFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The AdminAccessBinding to update.
+     * 
+ * + * + * .google.marketingplatform.admin.v1alpha.AdminAccessBinding admin_access_binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBindingOrBuilder + getAdminAccessBindingOrBuilder() { + if (adminAccessBindingBuilder_ != null) { + return adminAccessBindingBuilder_.getMessageOrBuilder(); + } else { + return adminAccessBinding_ == null + ? com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding.getDefaultInstance() + : adminAccessBinding_; + } + } + + /** + * + * + *
+     * Required. The AdminAccessBinding to update.
+     * 
+ * + * + * .google.marketingplatform.admin.v1alpha.AdminAccessBinding admin_access_binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding, + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding.Builder, + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBindingOrBuilder> + internalGetAdminAccessBindingFieldBuilder() { + if (adminAccessBindingBuilder_ == null) { + adminAccessBindingBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding, + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding.Builder, + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBindingOrBuilder>( + getAdminAccessBinding(), getParentForChildren(), isClean()); + adminAccessBinding_ = null; + } + return adminAccessBindingBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + + /** + * + * + *
+     * Required. The list of fields to update. Field names must be in snake case
+     * (for example, "field_to_update"). Omitted fields will not be updated. To
+     * replace the entire entity, use one path with the string "*" to match all
+     * fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Required. The list of fields to update. Field names must be in snake case
+     * (for example, "field_to_update"). Omitted fields will not be updated. To
+     * replace the entire entity, use one path with the string "*" to match all
+     * fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The list of fields to update. Field names must be in snake case
+     * (for example, "field_to_update"). Omitted fields will not be updated. To
+     * replace the entire entity, use one path with the string "*" to match all
+     * fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The list of fields to update. Field names must be in snake case
+     * (for example, "field_to_update"). Omitted fields will not be updated. To
+     * replace the entire entity, use one path with the string "*" to match all
+     * fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The list of fields to update. Field names must be in snake case
+     * (for example, "field_to_update"). Omitted fields will not be updated. To
+     * replace the entire entity, use one path with the string "*" to match all
+     * fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + if (updateMask_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The list of fields to update. Field names must be in snake case
+     * (for example, "field_to_update"). Omitted fields will not be updated. To
+     * replace the entire entity, use one path with the string "*" to match all
+     * fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000002); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The list of fields to update. Field names must be in snake case
+     * (for example, "field_to_update"). Omitted fields will not be updated. To
+     * replace the entire entity, use one path with the string "*" to match all
+     * fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetUpdateMaskFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The list of fields to update. Field names must be in snake case
+     * (for example, "field_to_update"). Omitted fields will not be updated. To
+     * replace the entire entity, use one path with the string "*" to match all
+     * fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + + /** + * + * + *
+     * Required. The list of fields to update. Field names must be in snake case
+     * (for example, "field_to_update"). Omitted fields will not be updated. To
+     * replace the entire entity, use one path with the string "*" to match all
+     * fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + internalGetUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.marketingplatform.admin.v1alpha.UpdateAdminAccessBindingRequest) + } + + // @@protoc_insertion_point(class_scope:google.marketingplatform.admin.v1alpha.UpdateAdminAccessBindingRequest) + private static final com.google.ads.marketingplatform.admin.v1alpha + .UpdateAdminAccessBindingRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.ads.marketingplatform.admin.v1alpha.UpdateAdminAccessBindingRequest(); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.UpdateAdminAccessBindingRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateAdminAccessBindingRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.UpdateAdminAccessBindingRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/UpdateAdminAccessBindingRequestOrBuilder.java b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/UpdateAdminAccessBindingRequestOrBuilder.java new file mode 100644 index 000000000000..87e3f58541a6 --- /dev/null +++ b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/UpdateAdminAccessBindingRequestOrBuilder.java @@ -0,0 +1,121 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/marketingplatform/admin/v1alpha/marketingplatform_admin.proto +// Protobuf Java Version: 4.33.6 + +package com.google.ads.marketingplatform.admin.v1alpha; + +@com.google.protobuf.Generated +public interface UpdateAdminAccessBindingRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.marketingplatform.admin.v1alpha.UpdateAdminAccessBindingRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The AdminAccessBinding to update.
+   * 
+ * + * + * .google.marketingplatform.admin.v1alpha.AdminAccessBinding admin_access_binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the adminAccessBinding field is set. + */ + boolean hasAdminAccessBinding(); + + /** + * + * + *
+   * Required. The AdminAccessBinding to update.
+   * 
+ * + * + * .google.marketingplatform.admin.v1alpha.AdminAccessBinding admin_access_binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The adminAccessBinding. + */ + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding getAdminAccessBinding(); + + /** + * + * + *
+   * Required. The AdminAccessBinding to update.
+   * 
+ * + * + * .google.marketingplatform.admin.v1alpha.AdminAccessBinding admin_access_binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBindingOrBuilder + getAdminAccessBindingOrBuilder(); + + /** + * + * + *
+   * Required. The list of fields to update. Field names must be in snake case
+   * (for example, "field_to_update"). Omitted fields will not be updated. To
+   * replace the entire entity, use one path with the string "*" to match all
+   * fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + + /** + * + * + *
+   * Required. The list of fields to update. Field names must be in snake case
+   * (for example, "field_to_update"). Omitted fields will not be updated. To
+   * replace the entire entity, use one path with the string "*" to match all
+   * fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + + /** + * + * + *
+   * Required. The list of fields to update. Field names must be in snake case
+   * (for example, "field_to_update"). Omitted fields will not be updated. To
+   * replace the entire entity, use one path with the string "*" to match all
+   * fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/UpdateUserGroupMemberRequest.java b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/UpdateUserGroupMemberRequest.java new file mode 100644 index 000000000000..8bdb6de9ddd5 --- /dev/null +++ b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/UpdateUserGroupMemberRequest.java @@ -0,0 +1,1080 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/marketingplatform/admin/v1alpha/marketingplatform_admin.proto +// Protobuf Java Version: 4.33.6 + +package com.google.ads.marketingplatform.admin.v1alpha; + +/** + * + * + *
+ * Request message for UpdateUserGroupMember RPC.
+ * 
+ * + * Protobuf type {@code google.marketingplatform.admin.v1alpha.UpdateUserGroupMemberRequest} + */ +@com.google.protobuf.Generated +public final class UpdateUserGroupMemberRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.marketingplatform.admin.v1alpha.UpdateUserGroupMemberRequest) + UpdateUserGroupMemberRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "UpdateUserGroupMemberRequest"); + } + + // Use UpdateUserGroupMemberRequest.newBuilder() to construct. + private UpdateUserGroupMemberRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private UpdateUserGroupMemberRequest() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_UpdateUserGroupMemberRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_UpdateUserGroupMemberRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupMemberRequest.class, + com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupMemberRequest.Builder + .class); + } + + private int bitField0_; + public static final int USER_GROUP_MEMBER_FIELD_NUMBER = 1; + private com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember userGroupMember_; + + /** + * + * + *
+   * Required. The user group member to update.
+   * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroupMember user_group_member = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the userGroupMember field is set. + */ + @java.lang.Override + public boolean hasUserGroupMember() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The user group member to update.
+   * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroupMember user_group_member = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The userGroupMember. + */ + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember getUserGroupMember() { + return userGroupMember_ == null + ? com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember.getDefaultInstance() + : userGroupMember_; + } + + /** + * + * + *
+   * Required. The user group member to update.
+   * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroupMember user_group_member = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.UserGroupMemberOrBuilder + getUserGroupMemberOrBuilder() { + return userGroupMember_ == null + ? com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember.getDefaultInstance() + : userGroupMember_; + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + + /** + * + * + *
+   * Required. The list of fields to update. Field names must be in snake case
+   * (for example, "field_to_update"). Omitted fields will not be updated. To
+   * replace the entire entity, use one path with the string "*" to match all
+   * fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Required. The list of fields to update. Field names must be in snake case
+   * (for example, "field_to_update"). Omitted fields will not be updated. To
+   * replace the entire entity, use one path with the string "*" to match all
+   * fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + /** + * + * + *
+   * Required. The list of fields to update. Field names must be in snake case
+   * (for example, "field_to_update"). Omitted fields will not be updated. To
+   * replace the entire entity, use one path with the string "*" to match all
+   * fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getUserGroupMember()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getUpdateMask()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUserGroupMember()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupMemberRequest)) { + return super.equals(obj); + } + com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupMemberRequest other = + (com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupMemberRequest) obj; + + if (hasUserGroupMember() != other.hasUserGroupMember()) return false; + if (hasUserGroupMember()) { + if (!getUserGroupMember().equals(other.getUserGroupMember())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasUserGroupMember()) { + hash = (37 * hash) + USER_GROUP_MEMBER_FIELD_NUMBER; + hash = (53 * hash) + getUserGroupMember().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupMemberRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupMemberRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupMemberRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupMemberRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupMemberRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupMemberRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupMemberRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupMemberRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupMemberRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupMemberRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupMemberRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupMemberRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupMemberRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for UpdateUserGroupMember RPC.
+   * 
+ * + * Protobuf type {@code google.marketingplatform.admin.v1alpha.UpdateUserGroupMemberRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.marketingplatform.admin.v1alpha.UpdateUserGroupMemberRequest) + com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupMemberRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_UpdateUserGroupMemberRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_UpdateUserGroupMemberRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupMemberRequest.class, + com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupMemberRequest.Builder + .class); + } + + // Construct using + // com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupMemberRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetUserGroupMemberFieldBuilder(); + internalGetUpdateMaskFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + userGroupMember_ = null; + if (userGroupMemberBuilder_ != null) { + userGroupMemberBuilder_.dispose(); + userGroupMemberBuilder_ = null; + } + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_UpdateUserGroupMemberRequest_descriptor; + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupMemberRequest + getDefaultInstanceForType() { + return com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupMemberRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupMemberRequest build() { + com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupMemberRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupMemberRequest + buildPartial() { + com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupMemberRequest result = + new com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupMemberRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupMemberRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.userGroupMember_ = + userGroupMemberBuilder_ == null ? userGroupMember_ : userGroupMemberBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupMemberRequest) { + return mergeFrom( + (com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupMemberRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupMemberRequest other) { + if (other + == com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupMemberRequest + .getDefaultInstance()) return this; + if (other.hasUserGroupMember()) { + mergeUserGroupMember(other.getUserGroupMember()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetUserGroupMemberFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember userGroupMember_; + private com.google.protobuf.SingleFieldBuilder< + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember, + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember.Builder, + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMemberOrBuilder> + userGroupMemberBuilder_; + + /** + * + * + *
+     * Required. The user group member to update.
+     * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroupMember user_group_member = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the userGroupMember field is set. + */ + public boolean hasUserGroupMember() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. The user group member to update.
+     * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroupMember user_group_member = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The userGroupMember. + */ + public com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember getUserGroupMember() { + if (userGroupMemberBuilder_ == null) { + return userGroupMember_ == null + ? com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember.getDefaultInstance() + : userGroupMember_; + } else { + return userGroupMemberBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The user group member to update.
+     * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroupMember user_group_member = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUserGroupMember( + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember value) { + if (userGroupMemberBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + userGroupMember_ = value; + } else { + userGroupMemberBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The user group member to update.
+     * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroupMember user_group_member = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUserGroupMember( + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember.Builder builderForValue) { + if (userGroupMemberBuilder_ == null) { + userGroupMember_ = builderForValue.build(); + } else { + userGroupMemberBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The user group member to update.
+     * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroupMember user_group_member = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUserGroupMember( + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember value) { + if (userGroupMemberBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && userGroupMember_ != null + && userGroupMember_ + != com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember + .getDefaultInstance()) { + getUserGroupMemberBuilder().mergeFrom(value); + } else { + userGroupMember_ = value; + } + } else { + userGroupMemberBuilder_.mergeFrom(value); + } + if (userGroupMember_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The user group member to update.
+     * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroupMember user_group_member = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUserGroupMember() { + bitField0_ = (bitField0_ & ~0x00000001); + userGroupMember_ = null; + if (userGroupMemberBuilder_ != null) { + userGroupMemberBuilder_.dispose(); + userGroupMemberBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The user group member to update.
+     * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroupMember user_group_member = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember.Builder + getUserGroupMemberBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetUserGroupMemberFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The user group member to update.
+     * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroupMember user_group_member = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.ads.marketingplatform.admin.v1alpha.UserGroupMemberOrBuilder + getUserGroupMemberOrBuilder() { + if (userGroupMemberBuilder_ != null) { + return userGroupMemberBuilder_.getMessageOrBuilder(); + } else { + return userGroupMember_ == null + ? com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember.getDefaultInstance() + : userGroupMember_; + } + } + + /** + * + * + *
+     * Required. The user group member to update.
+     * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroupMember user_group_member = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember, + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember.Builder, + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMemberOrBuilder> + internalGetUserGroupMemberFieldBuilder() { + if (userGroupMemberBuilder_ == null) { + userGroupMemberBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember, + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember.Builder, + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMemberOrBuilder>( + getUserGroupMember(), getParentForChildren(), isClean()); + userGroupMember_ = null; + } + return userGroupMemberBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + + /** + * + * + *
+     * Required. The list of fields to update. Field names must be in snake case
+     * (for example, "field_to_update"). Omitted fields will not be updated. To
+     * replace the entire entity, use one path with the string "*" to match all
+     * fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Required. The list of fields to update. Field names must be in snake case
+     * (for example, "field_to_update"). Omitted fields will not be updated. To
+     * replace the entire entity, use one path with the string "*" to match all
+     * fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The list of fields to update. Field names must be in snake case
+     * (for example, "field_to_update"). Omitted fields will not be updated. To
+     * replace the entire entity, use one path with the string "*" to match all
+     * fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The list of fields to update. Field names must be in snake case
+     * (for example, "field_to_update"). Omitted fields will not be updated. To
+     * replace the entire entity, use one path with the string "*" to match all
+     * fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The list of fields to update. Field names must be in snake case
+     * (for example, "field_to_update"). Omitted fields will not be updated. To
+     * replace the entire entity, use one path with the string "*" to match all
+     * fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + if (updateMask_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The list of fields to update. Field names must be in snake case
+     * (for example, "field_to_update"). Omitted fields will not be updated. To
+     * replace the entire entity, use one path with the string "*" to match all
+     * fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000002); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The list of fields to update. Field names must be in snake case
+     * (for example, "field_to_update"). Omitted fields will not be updated. To
+     * replace the entire entity, use one path with the string "*" to match all
+     * fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetUpdateMaskFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The list of fields to update. Field names must be in snake case
+     * (for example, "field_to_update"). Omitted fields will not be updated. To
+     * replace the entire entity, use one path with the string "*" to match all
+     * fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + + /** + * + * + *
+     * Required. The list of fields to update. Field names must be in snake case
+     * (for example, "field_to_update"). Omitted fields will not be updated. To
+     * replace the entire entity, use one path with the string "*" to match all
+     * fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + internalGetUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.marketingplatform.admin.v1alpha.UpdateUserGroupMemberRequest) + } + + // @@protoc_insertion_point(class_scope:google.marketingplatform.admin.v1alpha.UpdateUserGroupMemberRequest) + private static final com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupMemberRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupMemberRequest(); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupMemberRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateUserGroupMemberRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupMemberRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/UpdateUserGroupMemberRequestOrBuilder.java b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/UpdateUserGroupMemberRequestOrBuilder.java new file mode 100644 index 000000000000..aa0ba0128a6d --- /dev/null +++ b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/UpdateUserGroupMemberRequestOrBuilder.java @@ -0,0 +1,121 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/marketingplatform/admin/v1alpha/marketingplatform_admin.proto +// Protobuf Java Version: 4.33.6 + +package com.google.ads.marketingplatform.admin.v1alpha; + +@com.google.protobuf.Generated +public interface UpdateUserGroupMemberRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.marketingplatform.admin.v1alpha.UpdateUserGroupMemberRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The user group member to update.
+   * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroupMember user_group_member = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the userGroupMember field is set. + */ + boolean hasUserGroupMember(); + + /** + * + * + *
+   * Required. The user group member to update.
+   * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroupMember user_group_member = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The userGroupMember. + */ + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember getUserGroupMember(); + + /** + * + * + *
+   * Required. The user group member to update.
+   * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroupMember user_group_member = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMemberOrBuilder + getUserGroupMemberOrBuilder(); + + /** + * + * + *
+   * Required. The list of fields to update. Field names must be in snake case
+   * (for example, "field_to_update"). Omitted fields will not be updated. To
+   * replace the entire entity, use one path with the string "*" to match all
+   * fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + + /** + * + * + *
+   * Required. The list of fields to update. Field names must be in snake case
+   * (for example, "field_to_update"). Omitted fields will not be updated. To
+   * replace the entire entity, use one path with the string "*" to match all
+   * fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + + /** + * + * + *
+   * Required. The list of fields to update. Field names must be in snake case
+   * (for example, "field_to_update"). Omitted fields will not be updated. To
+   * replace the entire entity, use one path with the string "*" to match all
+   * fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/UpdateUserGroupRequest.java b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/UpdateUserGroupRequest.java new file mode 100644 index 000000000000..f927acdde6ae --- /dev/null +++ b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/UpdateUserGroupRequest.java @@ -0,0 +1,1062 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/marketingplatform/admin/v1alpha/marketingplatform_admin.proto +// Protobuf Java Version: 4.33.6 + +package com.google.ads.marketingplatform.admin.v1alpha; + +/** + * + * + *
+ * Request message for UpdateUserGroup RPC.
+ * 
+ * + * Protobuf type {@code google.marketingplatform.admin.v1alpha.UpdateUserGroupRequest} + */ +@com.google.protobuf.Generated +public final class UpdateUserGroupRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.marketingplatform.admin.v1alpha.UpdateUserGroupRequest) + UpdateUserGroupRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "UpdateUserGroupRequest"); + } + + // Use UpdateUserGroupRequest.newBuilder() to construct. + private UpdateUserGroupRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private UpdateUserGroupRequest() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_UpdateUserGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_UpdateUserGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupRequest.class, + com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupRequest.Builder.class); + } + + private int bitField0_; + public static final int USER_GROUP_FIELD_NUMBER = 1; + private com.google.ads.marketingplatform.admin.v1alpha.UserGroup userGroup_; + + /** + * + * + *
+   * Required. The user group to update.
+   * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroup user_group = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the userGroup field is set. + */ + @java.lang.Override + public boolean hasUserGroup() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The user group to update.
+   * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroup user_group = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The userGroup. + */ + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.UserGroup getUserGroup() { + return userGroup_ == null + ? com.google.ads.marketingplatform.admin.v1alpha.UserGroup.getDefaultInstance() + : userGroup_; + } + + /** + * + * + *
+   * Required. The user group to update.
+   * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroup user_group = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.UserGroupOrBuilder getUserGroupOrBuilder() { + return userGroup_ == null + ? com.google.ads.marketingplatform.admin.v1alpha.UserGroup.getDefaultInstance() + : userGroup_; + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + + /** + * + * + *
+   * Required. The list of fields to update. Field names must be in snake case
+   * (for example, "field_to_update"). Omitted fields will not be updated. To
+   * replace the entire entity, use one path with the string "*" to match all
+   * fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Required. The list of fields to update. Field names must be in snake case
+   * (for example, "field_to_update"). Omitted fields will not be updated. To
+   * replace the entire entity, use one path with the string "*" to match all
+   * fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + /** + * + * + *
+   * Required. The list of fields to update. Field names must be in snake case
+   * (for example, "field_to_update"). Omitted fields will not be updated. To
+   * replace the entire entity, use one path with the string "*" to match all
+   * fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getUserGroup()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getUpdateMask()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUserGroup()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupRequest)) { + return super.equals(obj); + } + com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupRequest other = + (com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupRequest) obj; + + if (hasUserGroup() != other.hasUserGroup()) return false; + if (hasUserGroup()) { + if (!getUserGroup().equals(other.getUserGroup())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasUserGroup()) { + hash = (37 * hash) + USER_GROUP_FIELD_NUMBER; + hash = (53 * hash) + getUserGroup().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for UpdateUserGroup RPC.
+   * 
+ * + * Protobuf type {@code google.marketingplatform.admin.v1alpha.UpdateUserGroupRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.marketingplatform.admin.v1alpha.UpdateUserGroupRequest) + com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_UpdateUserGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_UpdateUserGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupRequest.class, + com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupRequest.Builder.class); + } + + // Construct using + // com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetUserGroupFieldBuilder(); + internalGetUpdateMaskFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + userGroup_ = null; + if (userGroupBuilder_ != null) { + userGroupBuilder_.dispose(); + userGroupBuilder_ = null; + } + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminProto + .internal_static_google_marketingplatform_admin_v1alpha_UpdateUserGroupRequest_descriptor; + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupRequest + getDefaultInstanceForType() { + return com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupRequest build() { + com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupRequest buildPartial() { + com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupRequest result = + new com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.userGroup_ = userGroupBuilder_ == null ? userGroup_ : userGroupBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupRequest) { + return mergeFrom( + (com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupRequest other) { + if (other + == com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupRequest + .getDefaultInstance()) return this; + if (other.hasUserGroup()) { + mergeUserGroup(other.getUserGroup()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetUserGroupFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.ads.marketingplatform.admin.v1alpha.UserGroup userGroup_; + private com.google.protobuf.SingleFieldBuilder< + com.google.ads.marketingplatform.admin.v1alpha.UserGroup, + com.google.ads.marketingplatform.admin.v1alpha.UserGroup.Builder, + com.google.ads.marketingplatform.admin.v1alpha.UserGroupOrBuilder> + userGroupBuilder_; + + /** + * + * + *
+     * Required. The user group to update.
+     * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroup user_group = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the userGroup field is set. + */ + public boolean hasUserGroup() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. The user group to update.
+     * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroup user_group = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The userGroup. + */ + public com.google.ads.marketingplatform.admin.v1alpha.UserGroup getUserGroup() { + if (userGroupBuilder_ == null) { + return userGroup_ == null + ? com.google.ads.marketingplatform.admin.v1alpha.UserGroup.getDefaultInstance() + : userGroup_; + } else { + return userGroupBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The user group to update.
+     * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroup user_group = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUserGroup(com.google.ads.marketingplatform.admin.v1alpha.UserGroup value) { + if (userGroupBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + userGroup_ = value; + } else { + userGroupBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The user group to update.
+     * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroup user_group = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUserGroup( + com.google.ads.marketingplatform.admin.v1alpha.UserGroup.Builder builderForValue) { + if (userGroupBuilder_ == null) { + userGroup_ = builderForValue.build(); + } else { + userGroupBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The user group to update.
+     * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroup user_group = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUserGroup(com.google.ads.marketingplatform.admin.v1alpha.UserGroup value) { + if (userGroupBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && userGroup_ != null + && userGroup_ + != com.google.ads.marketingplatform.admin.v1alpha.UserGroup.getDefaultInstance()) { + getUserGroupBuilder().mergeFrom(value); + } else { + userGroup_ = value; + } + } else { + userGroupBuilder_.mergeFrom(value); + } + if (userGroup_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The user group to update.
+     * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroup user_group = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUserGroup() { + bitField0_ = (bitField0_ & ~0x00000001); + userGroup_ = null; + if (userGroupBuilder_ != null) { + userGroupBuilder_.dispose(); + userGroupBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The user group to update.
+     * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroup user_group = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.ads.marketingplatform.admin.v1alpha.UserGroup.Builder getUserGroupBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetUserGroupFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The user group to update.
+     * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroup user_group = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.ads.marketingplatform.admin.v1alpha.UserGroupOrBuilder + getUserGroupOrBuilder() { + if (userGroupBuilder_ != null) { + return userGroupBuilder_.getMessageOrBuilder(); + } else { + return userGroup_ == null + ? com.google.ads.marketingplatform.admin.v1alpha.UserGroup.getDefaultInstance() + : userGroup_; + } + } + + /** + * + * + *
+     * Required. The user group to update.
+     * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroup user_group = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.ads.marketingplatform.admin.v1alpha.UserGroup, + com.google.ads.marketingplatform.admin.v1alpha.UserGroup.Builder, + com.google.ads.marketingplatform.admin.v1alpha.UserGroupOrBuilder> + internalGetUserGroupFieldBuilder() { + if (userGroupBuilder_ == null) { + userGroupBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.ads.marketingplatform.admin.v1alpha.UserGroup, + com.google.ads.marketingplatform.admin.v1alpha.UserGroup.Builder, + com.google.ads.marketingplatform.admin.v1alpha.UserGroupOrBuilder>( + getUserGroup(), getParentForChildren(), isClean()); + userGroup_ = null; + } + return userGroupBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + + /** + * + * + *
+     * Required. The list of fields to update. Field names must be in snake case
+     * (for example, "field_to_update"). Omitted fields will not be updated. To
+     * replace the entire entity, use one path with the string "*" to match all
+     * fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Required. The list of fields to update. Field names must be in snake case
+     * (for example, "field_to_update"). Omitted fields will not be updated. To
+     * replace the entire entity, use one path with the string "*" to match all
+     * fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The list of fields to update. Field names must be in snake case
+     * (for example, "field_to_update"). Omitted fields will not be updated. To
+     * replace the entire entity, use one path with the string "*" to match all
+     * fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The list of fields to update. Field names must be in snake case
+     * (for example, "field_to_update"). Omitted fields will not be updated. To
+     * replace the entire entity, use one path with the string "*" to match all
+     * fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The list of fields to update. Field names must be in snake case
+     * (for example, "field_to_update"). Omitted fields will not be updated. To
+     * replace the entire entity, use one path with the string "*" to match all
+     * fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + if (updateMask_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The list of fields to update. Field names must be in snake case
+     * (for example, "field_to_update"). Omitted fields will not be updated. To
+     * replace the entire entity, use one path with the string "*" to match all
+     * fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000002); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The list of fields to update. Field names must be in snake case
+     * (for example, "field_to_update"). Omitted fields will not be updated. To
+     * replace the entire entity, use one path with the string "*" to match all
+     * fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetUpdateMaskFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The list of fields to update. Field names must be in snake case
+     * (for example, "field_to_update"). Omitted fields will not be updated. To
+     * replace the entire entity, use one path with the string "*" to match all
+     * fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + + /** + * + * + *
+     * Required. The list of fields to update. Field names must be in snake case
+     * (for example, "field_to_update"). Omitted fields will not be updated. To
+     * replace the entire entity, use one path with the string "*" to match all
+     * fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + internalGetUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.marketingplatform.admin.v1alpha.UpdateUserGroupRequest) + } + + // @@protoc_insertion_point(class_scope:google.marketingplatform.admin.v1alpha.UpdateUserGroupRequest) + private static final com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupRequest(); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateUserGroupRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/UpdateUserGroupRequestOrBuilder.java b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/UpdateUserGroupRequestOrBuilder.java new file mode 100644 index 000000000000..eb604367114e --- /dev/null +++ b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/UpdateUserGroupRequestOrBuilder.java @@ -0,0 +1,120 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/marketingplatform/admin/v1alpha/marketingplatform_admin.proto +// Protobuf Java Version: 4.33.6 + +package com.google.ads.marketingplatform.admin.v1alpha; + +@com.google.protobuf.Generated +public interface UpdateUserGroupRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.marketingplatform.admin.v1alpha.UpdateUserGroupRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The user group to update.
+   * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroup user_group = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the userGroup field is set. + */ + boolean hasUserGroup(); + + /** + * + * + *
+   * Required. The user group to update.
+   * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroup user_group = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The userGroup. + */ + com.google.ads.marketingplatform.admin.v1alpha.UserGroup getUserGroup(); + + /** + * + * + *
+   * Required. The user group to update.
+   * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroup user_group = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.ads.marketingplatform.admin.v1alpha.UserGroupOrBuilder getUserGroupOrBuilder(); + + /** + * + * + *
+   * Required. The list of fields to update. Field names must be in snake case
+   * (for example, "field_to_update"). Omitted fields will not be updated. To
+   * replace the entire entity, use one path with the string "*" to match all
+   * fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + + /** + * + * + *
+   * Required. The list of fields to update. Field names must be in snake case
+   * (for example, "field_to_update"). Omitted fields will not be updated. To
+   * replace the entire entity, use one path with the string "*" to match all
+   * fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + + /** + * + * + *
+   * Required. The list of fields to update. Field names must be in snake case
+   * (for example, "field_to_update"). Omitted fields will not be updated. To
+   * replace the entire entity, use one path with the string "*" to match all
+   * fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/UserGroup.java b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/UserGroup.java new file mode 100644 index 000000000000..256622a3f7f3 --- /dev/null +++ b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/UserGroup.java @@ -0,0 +1,996 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/marketingplatform/admin/v1alpha/resources.proto +// Protobuf Java Version: 4.33.6 + +package com.google.ads.marketingplatform.admin.v1alpha; + +/** + * + * + *
+ * A resource message representing a user group in a GMP organization.
+ * 
+ * + * Protobuf type {@code google.marketingplatform.admin.v1alpha.UserGroup} + */ +@com.google.protobuf.Generated +public final class UserGroup extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.marketingplatform.admin.v1alpha.UserGroup) + UserGroupOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "UserGroup"); + } + + // Use UserGroup.newBuilder() to construct. + private UserGroup(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private UserGroup() { + name_ = ""; + displayName_ = ""; + description_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.ads.marketingplatform.admin.v1alpha.ResourcesProto + .internal_static_google_marketingplatform_admin_v1alpha_UserGroup_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.ads.marketingplatform.admin.v1alpha.ResourcesProto + .internal_static_google_marketingplatform_admin_v1alpha_UserGroup_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.ads.marketingplatform.admin.v1alpha.UserGroup.class, + com.google.ads.marketingplatform.admin.v1alpha.UserGroup.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Identifier. Resource name of this UserGroup.
+   *
+   * Format: organizations/{org_id}/userGroups/{user_group_id}
+   * Example: "organizations/123abc/userGroups/456def"
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Identifier. Resource name of this UserGroup.
+   *
+   * Format: organizations/{org_id}/userGroups/{user_group_id}
+   * Example: "organizations/123abc/userGroups/456def"
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + + /** + * + * + *
+   * Optional. The human-readable name for the user group.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The human-readable name for the user group.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
+   * Optional. The description of the user group.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The description of the user group.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, displayName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, description_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, displayName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, description_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.ads.marketingplatform.admin.v1alpha.UserGroup)) { + return super.equals(obj); + } + com.google.ads.marketingplatform.admin.v1alpha.UserGroup other = + (com.google.ads.marketingplatform.admin.v1alpha.UserGroup) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.ads.marketingplatform.admin.v1alpha.UserGroup parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.UserGroup parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.UserGroup parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.UserGroup parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.UserGroup parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.UserGroup parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.UserGroup parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.UserGroup parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.UserGroup parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.UserGroup parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.UserGroup parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.UserGroup parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.ads.marketingplatform.admin.v1alpha.UserGroup prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A resource message representing a user group in a GMP organization.
+   * 
+ * + * Protobuf type {@code google.marketingplatform.admin.v1alpha.UserGroup} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.marketingplatform.admin.v1alpha.UserGroup) + com.google.ads.marketingplatform.admin.v1alpha.UserGroupOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.ads.marketingplatform.admin.v1alpha.ResourcesProto + .internal_static_google_marketingplatform_admin_v1alpha_UserGroup_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.ads.marketingplatform.admin.v1alpha.ResourcesProto + .internal_static_google_marketingplatform_admin_v1alpha_UserGroup_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.ads.marketingplatform.admin.v1alpha.UserGroup.class, + com.google.ads.marketingplatform.admin.v1alpha.UserGroup.Builder.class); + } + + // Construct using com.google.ads.marketingplatform.admin.v1alpha.UserGroup.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + displayName_ = ""; + description_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.ads.marketingplatform.admin.v1alpha.ResourcesProto + .internal_static_google_marketingplatform_admin_v1alpha_UserGroup_descriptor; + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.UserGroup getDefaultInstanceForType() { + return com.google.ads.marketingplatform.admin.v1alpha.UserGroup.getDefaultInstance(); + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.UserGroup build() { + com.google.ads.marketingplatform.admin.v1alpha.UserGroup result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.UserGroup buildPartial() { + com.google.ads.marketingplatform.admin.v1alpha.UserGroup result = + new com.google.ads.marketingplatform.admin.v1alpha.UserGroup(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.ads.marketingplatform.admin.v1alpha.UserGroup result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.description_ = description_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.ads.marketingplatform.admin.v1alpha.UserGroup) { + return mergeFrom((com.google.ads.marketingplatform.admin.v1alpha.UserGroup) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.ads.marketingplatform.admin.v1alpha.UserGroup other) { + if (other == com.google.ads.marketingplatform.admin.v1alpha.UserGroup.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Identifier. Resource name of this UserGroup.
+     *
+     * Format: organizations/{org_id}/userGroups/{user_group_id}
+     * Example: "organizations/123abc/userGroups/456def"
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Identifier. Resource name of this UserGroup.
+     *
+     * Format: organizations/{org_id}/userGroups/{user_group_id}
+     * Example: "organizations/123abc/userGroups/456def"
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Identifier. Resource name of this UserGroup.
+     *
+     * Format: organizations/{org_id}/userGroups/{user_group_id}
+     * Example: "organizations/123abc/userGroups/456def"
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. Resource name of this UserGroup.
+     *
+     * Format: organizations/{org_id}/userGroups/{user_group_id}
+     * Example: "organizations/123abc/userGroups/456def"
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. Resource name of this UserGroup.
+     *
+     * Format: organizations/{org_id}/userGroups/{user_group_id}
+     * Example: "organizations/123abc/userGroups/456def"
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + + /** + * + * + *
+     * Optional. The human-readable name for the user group.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The human-readable name for the user group.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The human-readable name for the user group.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The human-readable name for the user group.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The human-readable name for the user group.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + + /** + * + * + *
+     * Optional. The description of the user group.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The description of the user group.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The description of the user group.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The description of the user group.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The description of the user group.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.marketingplatform.admin.v1alpha.UserGroup) + } + + // @@protoc_insertion_point(class_scope:google.marketingplatform.admin.v1alpha.UserGroup) + private static final com.google.ads.marketingplatform.admin.v1alpha.UserGroup DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.ads.marketingplatform.admin.v1alpha.UserGroup(); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.UserGroup getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UserGroup parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.UserGroup getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/UserGroupMember.java b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/UserGroupMember.java new file mode 100644 index 000000000000..1e2360a30e5a --- /dev/null +++ b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/UserGroupMember.java @@ -0,0 +1,1560 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/marketingplatform/admin/v1alpha/resources.proto +// Protobuf Java Version: 4.33.6 + +package com.google.ads.marketingplatform.admin.v1alpha; + +/** + * + * + *
+ * A resource message representing a member of a user group.
+ * 
+ * + * Protobuf type {@code google.marketingplatform.admin.v1alpha.UserGroupMember} + */ +@com.google.protobuf.Generated +public final class UserGroupMember extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.marketingplatform.admin.v1alpha.UserGroupMember) + UserGroupMemberOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "UserGroupMember"); + } + + // Use UserGroupMember.newBuilder() to construct. + private UserGroupMember(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private UserGroupMember() { + name_ = ""; + membershipRole_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.ads.marketingplatform.admin.v1alpha.ResourcesProto + .internal_static_google_marketingplatform_admin_v1alpha_UserGroupMember_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.ads.marketingplatform.admin.v1alpha.ResourcesProto + .internal_static_google_marketingplatform_admin_v1alpha_UserGroupMember_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember.class, + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember.Builder.class); + } + + /** + * + * + *
+   * The role of the member in the user group.
+   * 
+ * + * Protobuf enum {@code google.marketingplatform.admin.v1alpha.UserGroupMember.MembershipRole} + */ + public enum MembershipRole implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified membership role.
+     * 
+ * + * MEMBERSHIP_ROLE_UNSPECIFIED = 0; + */ + MEMBERSHIP_ROLE_UNSPECIFIED(0), + /** + * + * + *
+     * Owner role that can add and remove group members.
+     * 
+ * + * MEMBERSHIP_ROLE_OWNER = 1; + */ + MEMBERSHIP_ROLE_OWNER(1), + /** + * + * + *
+     * Member role that receives all permissions assigned to the group.
+     * 
+ * + * MEMBERSHIP_ROLE_MEMBER = 2; + */ + MEMBERSHIP_ROLE_MEMBER(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "MembershipRole"); + } + + /** + * + * + *
+     * Unspecified membership role.
+     * 
+ * + * MEMBERSHIP_ROLE_UNSPECIFIED = 0; + */ + public static final int MEMBERSHIP_ROLE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Owner role that can add and remove group members.
+     * 
+ * + * MEMBERSHIP_ROLE_OWNER = 1; + */ + public static final int MEMBERSHIP_ROLE_OWNER_VALUE = 1; + + /** + * + * + *
+     * Member role that receives all permissions assigned to the group.
+     * 
+ * + * MEMBERSHIP_ROLE_MEMBER = 2; + */ + public static final int MEMBERSHIP_ROLE_MEMBER_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static MembershipRole valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static MembershipRole forNumber(int value) { + switch (value) { + case 0: + return MEMBERSHIP_ROLE_UNSPECIFIED; + case 1: + return MEMBERSHIP_ROLE_OWNER; + case 2: + return MEMBERSHIP_ROLE_MEMBER; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public MembershipRole findValueByNumber(int number) { + return MembershipRole.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final MembershipRole[] VALUES = values(); + + public static MembershipRole valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private MembershipRole(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.marketingplatform.admin.v1alpha.UserGroupMember.MembershipRole) + } + + private int memberCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object member_; + + public enum MemberCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + USER_EMAIL(2), + USER_GROUP(3), + MEMBER_NOT_SET(0); + private final int value; + + private MemberCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static MemberCase valueOf(int value) { + return forNumber(value); + } + + public static MemberCase forNumber(int value) { + switch (value) { + case 2: + return USER_EMAIL; + case 3: + return USER_GROUP; + case 0: + return MEMBER_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public MemberCase getMemberCase() { + return MemberCase.forNumber(memberCase_); + } + + public static final int USER_EMAIL_FIELD_NUMBER = 2; + + /** + * + * + *
+   * Email address of the user member.
+   * 
+ * + * string user_email = 2; + * + * @return Whether the userEmail field is set. + */ + public boolean hasUserEmail() { + return memberCase_ == 2; + } + + /** + * + * + *
+   * Email address of the user member.
+   * 
+ * + * string user_email = 2; + * + * @return The userEmail. + */ + public java.lang.String getUserEmail() { + java.lang.Object ref = ""; + if (memberCase_ == 2) { + ref = member_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (memberCase_ == 2) { + member_ = s; + } + return s; + } + } + + /** + * + * + *
+   * Email address of the user member.
+   * 
+ * + * string user_email = 2; + * + * @return The bytes for userEmail. + */ + public com.google.protobuf.ByteString getUserEmailBytes() { + java.lang.Object ref = ""; + if (memberCase_ == 2) { + ref = member_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (memberCase_ == 2) { + member_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_GROUP_FIELD_NUMBER = 3; + + /** + * + * + *
+   * User group resource name of the group member.
+   * 
+ * + * string user_group = 3; + * + * @return Whether the userGroup field is set. + */ + public boolean hasUserGroup() { + return memberCase_ == 3; + } + + /** + * + * + *
+   * User group resource name of the group member.
+   * 
+ * + * string user_group = 3; + * + * @return The userGroup. + */ + public java.lang.String getUserGroup() { + java.lang.Object ref = ""; + if (memberCase_ == 3) { + ref = member_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (memberCase_ == 3) { + member_ = s; + } + return s; + } + } + + /** + * + * + *
+   * User group resource name of the group member.
+   * 
+ * + * string user_group = 3; + * + * @return The bytes for userGroup. + */ + public com.google.protobuf.ByteString getUserGroupBytes() { + java.lang.Object ref = ""; + if (memberCase_ == 3) { + ref = member_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (memberCase_ == 3) { + member_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Identifier. The resource name of this UserGroupMember.
+   *
+   * Format:
+   * organizations/{org_id}/userGroups/{user_group_id}/members/{member_id}
+   * Example:
+   * "organizations/123abc/userGroups/456def/members/789ghi"
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Identifier. The resource name of this UserGroupMember.
+   *
+   * Format:
+   * organizations/{org_id}/userGroups/{user_group_id}/members/{member_id}
+   * Example:
+   * "organizations/123abc/userGroups/456def/members/789ghi"
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MEMBERSHIP_ROLE_FIELD_NUMBER = 4; + private int membershipRole_ = 0; + + /** + * + * + *
+   * Optional. The role of the member in the user group.
+   * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroupMember.MembershipRole membership_role = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for membershipRole. + */ + @java.lang.Override + public int getMembershipRoleValue() { + return membershipRole_; + } + + /** + * + * + *
+   * Optional. The role of the member in the user group.
+   * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroupMember.MembershipRole membership_role = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The membershipRole. + */ + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember.MembershipRole + getMembershipRole() { + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember.MembershipRole result = + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember.MembershipRole.forNumber( + membershipRole_); + return result == null + ? com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember.MembershipRole.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (memberCase_ == 2) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, member_); + } + if (memberCase_ == 3) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, member_); + } + if (membershipRole_ + != com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember.MembershipRole + .MEMBERSHIP_ROLE_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, membershipRole_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (memberCase_ == 2) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, member_); + } + if (memberCase_ == 3) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, member_); + } + if (membershipRole_ + != com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember.MembershipRole + .MEMBERSHIP_ROLE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, membershipRole_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember)) { + return super.equals(obj); + } + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember other = + (com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember) obj; + + if (!getName().equals(other.getName())) return false; + if (membershipRole_ != other.membershipRole_) return false; + if (!getMemberCase().equals(other.getMemberCase())) return false; + switch (memberCase_) { + case 2: + if (!getUserEmail().equals(other.getUserEmail())) return false; + break; + case 3: + if (!getUserGroup().equals(other.getUserGroup())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + MEMBERSHIP_ROLE_FIELD_NUMBER; + hash = (53 * hash) + membershipRole_; + switch (memberCase_) { + case 2: + hash = (37 * hash) + USER_EMAIL_FIELD_NUMBER; + hash = (53 * hash) + getUserEmail().hashCode(); + break; + case 3: + hash = (37 * hash) + USER_GROUP_FIELD_NUMBER; + hash = (53 * hash) + getUserGroup().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A resource message representing a member of a user group.
+   * 
+ * + * Protobuf type {@code google.marketingplatform.admin.v1alpha.UserGroupMember} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.marketingplatform.admin.v1alpha.UserGroupMember) + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMemberOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.ads.marketingplatform.admin.v1alpha.ResourcesProto + .internal_static_google_marketingplatform_admin_v1alpha_UserGroupMember_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.ads.marketingplatform.admin.v1alpha.ResourcesProto + .internal_static_google_marketingplatform_admin_v1alpha_UserGroupMember_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember.class, + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember.Builder.class); + } + + // Construct using com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + membershipRole_ = 0; + memberCase_ = 0; + member_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.ads.marketingplatform.admin.v1alpha.ResourcesProto + .internal_static_google_marketingplatform_admin_v1alpha_UserGroupMember_descriptor; + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember + getDefaultInstanceForType() { + return com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember.getDefaultInstance(); + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember build() { + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember buildPartial() { + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember result = + new com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.membershipRole_ = membershipRole_; + } + } + + private void buildPartialOneofs( + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember result) { + result.memberCase_ = memberCase_; + result.member_ = this.member_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember) { + return mergeFrom((com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember other) { + if (other + == com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.membershipRole_ != 0) { + setMembershipRoleValue(other.getMembershipRoleValue()); + } + switch (other.getMemberCase()) { + case USER_EMAIL: + { + memberCase_ = 2; + member_ = other.member_; + onChanged(); + break; + } + case USER_GROUP: + { + memberCase_ = 3; + member_ = other.member_; + onChanged(); + break; + } + case MEMBER_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + memberCase_ = 2; + member_ = s; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + memberCase_ = 3; + member_ = s; + break; + } // case 26 + case 32: + { + membershipRole_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int memberCase_ = 0; + private java.lang.Object member_; + + public MemberCase getMemberCase() { + return MemberCase.forNumber(memberCase_); + } + + public Builder clearMember() { + memberCase_ = 0; + member_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+     * Email address of the user member.
+     * 
+ * + * string user_email = 2; + * + * @return Whether the userEmail field is set. + */ + @java.lang.Override + public boolean hasUserEmail() { + return memberCase_ == 2; + } + + /** + * + * + *
+     * Email address of the user member.
+     * 
+ * + * string user_email = 2; + * + * @return The userEmail. + */ + @java.lang.Override + public java.lang.String getUserEmail() { + java.lang.Object ref = ""; + if (memberCase_ == 2) { + ref = member_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (memberCase_ == 2) { + member_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Email address of the user member.
+     * 
+ * + * string user_email = 2; + * + * @return The bytes for userEmail. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUserEmailBytes() { + java.lang.Object ref = ""; + if (memberCase_ == 2) { + ref = member_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (memberCase_ == 2) { + member_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Email address of the user member.
+     * 
+ * + * string user_email = 2; + * + * @param value The userEmail to set. + * @return This builder for chaining. + */ + public Builder setUserEmail(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + memberCase_ = 2; + member_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Email address of the user member.
+     * 
+ * + * string user_email = 2; + * + * @return This builder for chaining. + */ + public Builder clearUserEmail() { + if (memberCase_ == 2) { + memberCase_ = 0; + member_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Email address of the user member.
+     * 
+ * + * string user_email = 2; + * + * @param value The bytes for userEmail to set. + * @return This builder for chaining. + */ + public Builder setUserEmailBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + memberCase_ = 2; + member_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * User group resource name of the group member.
+     * 
+ * + * string user_group = 3; + * + * @return Whether the userGroup field is set. + */ + @java.lang.Override + public boolean hasUserGroup() { + return memberCase_ == 3; + } + + /** + * + * + *
+     * User group resource name of the group member.
+     * 
+ * + * string user_group = 3; + * + * @return The userGroup. + */ + @java.lang.Override + public java.lang.String getUserGroup() { + java.lang.Object ref = ""; + if (memberCase_ == 3) { + ref = member_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (memberCase_ == 3) { + member_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * User group resource name of the group member.
+     * 
+ * + * string user_group = 3; + * + * @return The bytes for userGroup. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUserGroupBytes() { + java.lang.Object ref = ""; + if (memberCase_ == 3) { + ref = member_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (memberCase_ == 3) { + member_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * User group resource name of the group member.
+     * 
+ * + * string user_group = 3; + * + * @param value The userGroup to set. + * @return This builder for chaining. + */ + public Builder setUserGroup(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + memberCase_ = 3; + member_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * User group resource name of the group member.
+     * 
+ * + * string user_group = 3; + * + * @return This builder for chaining. + */ + public Builder clearUserGroup() { + if (memberCase_ == 3) { + memberCase_ = 0; + member_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * User group resource name of the group member.
+     * 
+ * + * string user_group = 3; + * + * @param value The bytes for userGroup to set. + * @return This builder for chaining. + */ + public Builder setUserGroupBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + memberCase_ = 3; + member_ = value; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Identifier. The resource name of this UserGroupMember.
+     *
+     * Format:
+     * organizations/{org_id}/userGroups/{user_group_id}/members/{member_id}
+     * Example:
+     * "organizations/123abc/userGroups/456def/members/789ghi"
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Identifier. The resource name of this UserGroupMember.
+     *
+     * Format:
+     * organizations/{org_id}/userGroups/{user_group_id}/members/{member_id}
+     * Example:
+     * "organizations/123abc/userGroups/456def/members/789ghi"
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Identifier. The resource name of this UserGroupMember.
+     *
+     * Format:
+     * organizations/{org_id}/userGroups/{user_group_id}/members/{member_id}
+     * Example:
+     * "organizations/123abc/userGroups/456def/members/789ghi"
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. The resource name of this UserGroupMember.
+     *
+     * Format:
+     * organizations/{org_id}/userGroups/{user_group_id}/members/{member_id}
+     * Example:
+     * "organizations/123abc/userGroups/456def/members/789ghi"
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. The resource name of this UserGroupMember.
+     *
+     * Format:
+     * organizations/{org_id}/userGroups/{user_group_id}/members/{member_id}
+     * Example:
+     * "organizations/123abc/userGroups/456def/members/789ghi"
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private int membershipRole_ = 0; + + /** + * + * + *
+     * Optional. The role of the member in the user group.
+     * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroupMember.MembershipRole membership_role = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for membershipRole. + */ + @java.lang.Override + public int getMembershipRoleValue() { + return membershipRole_; + } + + /** + * + * + *
+     * Optional. The role of the member in the user group.
+     * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroupMember.MembershipRole membership_role = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for membershipRole to set. + * @return This builder for chaining. + */ + public Builder setMembershipRoleValue(int value) { + membershipRole_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The role of the member in the user group.
+     * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroupMember.MembershipRole membership_role = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The membershipRole. + */ + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember.MembershipRole + getMembershipRole() { + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember.MembershipRole result = + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember.MembershipRole.forNumber( + membershipRole_); + return result == null + ? com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember.MembershipRole + .UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. The role of the member in the user group.
+     * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroupMember.MembershipRole membership_role = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The membershipRole to set. + * @return This builder for chaining. + */ + public Builder setMembershipRole( + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember.MembershipRole value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + membershipRole_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The role of the member in the user group.
+     * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroupMember.MembershipRole membership_role = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearMembershipRole() { + bitField0_ = (bitField0_ & ~0x00000008); + membershipRole_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.marketingplatform.admin.v1alpha.UserGroupMember) + } + + // @@protoc_insertion_point(class_scope:google.marketingplatform.admin.v1alpha.UserGroupMember) + private static final com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember(); + } + + public static com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UserGroupMember parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/UserGroupMemberName.java b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/UserGroupMemberName.java new file mode 100644 index 000000000000..3cd2d0fa5f86 --- /dev/null +++ b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/UserGroupMemberName.java @@ -0,0 +1,230 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.marketingplatform.admin.v1alpha; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; +import org.jspecify.annotations.NullMarked; +import org.jspecify.annotations.Nullable; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@NullMarked +@Generated("by gapic-generator-java") +public class UserGroupMemberName implements ResourceName { + private static final PathTemplate ORGANIZATION_USER_GROUP_MEMBER = + PathTemplate.createWithoutUrlEncoding( + "organizations/{organization}/userGroups/{user_group}/members/{member}"); + private volatile Map fieldValuesMap; + private final String organization; + private final String userGroup; + private final String member; + + @Deprecated + protected UserGroupMemberName() { + organization = null; + userGroup = null; + member = null; + } + + private UserGroupMemberName(Builder builder) { + organization = Preconditions.checkNotNull(builder.getOrganization()); + userGroup = Preconditions.checkNotNull(builder.getUserGroup()); + member = Preconditions.checkNotNull(builder.getMember()); + } + + public String getOrganization() { + return organization; + } + + public String getUserGroup() { + return userGroup; + } + + public String getMember() { + return member; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static UserGroupMemberName of(String organization, String userGroup, String member) { + return newBuilder() + .setOrganization(organization) + .setUserGroup(userGroup) + .setMember(member) + .build(); + } + + public static String format(String organization, String userGroup, String member) { + return newBuilder() + .setOrganization(organization) + .setUserGroup(userGroup) + .setMember(member) + .build() + .toString(); + } + + public static @Nullable UserGroupMemberName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + ORGANIZATION_USER_GROUP_MEMBER.validatedMatch( + formattedString, "UserGroupMemberName.parse: formattedString not in valid format"); + return of(matchMap.get("organization"), matchMap.get("user_group"), matchMap.get("member")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List<@Nullable UserGroupMemberName> values) { + List list = new ArrayList<>(values.size()); + for (UserGroupMemberName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return ORGANIZATION_USER_GROUP_MEMBER.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (organization != null) { + fieldMapBuilder.put("organization", organization); + } + if (userGroup != null) { + fieldMapBuilder.put("user_group", userGroup); + } + if (member != null) { + fieldMapBuilder.put("member", member); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return ORGANIZATION_USER_GROUP_MEMBER.instantiate( + "organization", organization, "user_group", userGroup, "member", member); + } + + @Override + public boolean equals(@Nullable Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + UserGroupMemberName that = ((UserGroupMemberName) o); + return Objects.equals(this.organization, that.organization) + && Objects.equals(this.userGroup, that.userGroup) + && Objects.equals(this.member, that.member); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(organization); + h *= 1000003; + h ^= Objects.hashCode(userGroup); + h *= 1000003; + h ^= Objects.hashCode(member); + return h; + } + + /** Builder for organizations/{organization}/userGroups/{user_group}/members/{member}. */ + public static class Builder { + private String organization; + private String userGroup; + private String member; + + protected Builder() {} + + public String getOrganization() { + return organization; + } + + public String getUserGroup() { + return userGroup; + } + + public String getMember() { + return member; + } + + public Builder setOrganization(String organization) { + this.organization = organization; + return this; + } + + public Builder setUserGroup(String userGroup) { + this.userGroup = userGroup; + return this; + } + + public Builder setMember(String member) { + this.member = member; + return this; + } + + private Builder(UserGroupMemberName userGroupMemberName) { + this.organization = userGroupMemberName.organization; + this.userGroup = userGroupMemberName.userGroup; + this.member = userGroupMemberName.member; + } + + public UserGroupMemberName build() { + return new UserGroupMemberName(this); + } + } +} diff --git a/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/UserGroupMemberOrBuilder.java b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/UserGroupMemberOrBuilder.java new file mode 100644 index 000000000000..ef1f30b8ba96 --- /dev/null +++ b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/UserGroupMemberOrBuilder.java @@ -0,0 +1,174 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/marketingplatform/admin/v1alpha/resources.proto +// Protobuf Java Version: 4.33.6 + +package com.google.ads.marketingplatform.admin.v1alpha; + +@com.google.protobuf.Generated +public interface UserGroupMemberOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.marketingplatform.admin.v1alpha.UserGroupMember) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Email address of the user member.
+   * 
+ * + * string user_email = 2; + * + * @return Whether the userEmail field is set. + */ + boolean hasUserEmail(); + + /** + * + * + *
+   * Email address of the user member.
+   * 
+ * + * string user_email = 2; + * + * @return The userEmail. + */ + java.lang.String getUserEmail(); + + /** + * + * + *
+   * Email address of the user member.
+   * 
+ * + * string user_email = 2; + * + * @return The bytes for userEmail. + */ + com.google.protobuf.ByteString getUserEmailBytes(); + + /** + * + * + *
+   * User group resource name of the group member.
+   * 
+ * + * string user_group = 3; + * + * @return Whether the userGroup field is set. + */ + boolean hasUserGroup(); + + /** + * + * + *
+   * User group resource name of the group member.
+   * 
+ * + * string user_group = 3; + * + * @return The userGroup. + */ + java.lang.String getUserGroup(); + + /** + * + * + *
+   * User group resource name of the group member.
+   * 
+ * + * string user_group = 3; + * + * @return The bytes for userGroup. + */ + com.google.protobuf.ByteString getUserGroupBytes(); + + /** + * + * + *
+   * Identifier. The resource name of this UserGroupMember.
+   *
+   * Format:
+   * organizations/{org_id}/userGroups/{user_group_id}/members/{member_id}
+   * Example:
+   * "organizations/123abc/userGroups/456def/members/789ghi"
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Identifier. The resource name of this UserGroupMember.
+   *
+   * Format:
+   * organizations/{org_id}/userGroups/{user_group_id}/members/{member_id}
+   * Example:
+   * "organizations/123abc/userGroups/456def/members/789ghi"
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. The role of the member in the user group.
+   * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroupMember.MembershipRole membership_role = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for membershipRole. + */ + int getMembershipRoleValue(); + + /** + * + * + *
+   * Optional. The role of the member in the user group.
+   * 
+ * + * + * .google.marketingplatform.admin.v1alpha.UserGroupMember.MembershipRole membership_role = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The membershipRole. + */ + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember.MembershipRole getMembershipRole(); + + com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember.MemberCase getMemberCase(); +} diff --git a/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/UserGroupName.java b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/UserGroupName.java new file mode 100644 index 000000000000..172609cb6ed6 --- /dev/null +++ b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/UserGroupName.java @@ -0,0 +1,196 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.marketingplatform.admin.v1alpha; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; +import org.jspecify.annotations.NullMarked; +import org.jspecify.annotations.Nullable; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@NullMarked +@Generated("by gapic-generator-java") +public class UserGroupName implements ResourceName { + private static final PathTemplate ORGANIZATION_USER_GROUP = + PathTemplate.createWithoutUrlEncoding("organizations/{organization}/userGroups/{user_group}"); + private volatile Map fieldValuesMap; + private final String organization; + private final String userGroup; + + @Deprecated + protected UserGroupName() { + organization = null; + userGroup = null; + } + + private UserGroupName(Builder builder) { + organization = Preconditions.checkNotNull(builder.getOrganization()); + userGroup = Preconditions.checkNotNull(builder.getUserGroup()); + } + + public String getOrganization() { + return organization; + } + + public String getUserGroup() { + return userGroup; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static UserGroupName of(String organization, String userGroup) { + return newBuilder().setOrganization(organization).setUserGroup(userGroup).build(); + } + + public static String format(String organization, String userGroup) { + return newBuilder().setOrganization(organization).setUserGroup(userGroup).build().toString(); + } + + public static @Nullable UserGroupName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + ORGANIZATION_USER_GROUP.validatedMatch( + formattedString, "UserGroupName.parse: formattedString not in valid format"); + return of(matchMap.get("organization"), matchMap.get("user_group")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List<@Nullable UserGroupName> values) { + List list = new ArrayList<>(values.size()); + for (UserGroupName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return ORGANIZATION_USER_GROUP.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (organization != null) { + fieldMapBuilder.put("organization", organization); + } + if (userGroup != null) { + fieldMapBuilder.put("user_group", userGroup); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return ORGANIZATION_USER_GROUP.instantiate( + "organization", organization, "user_group", userGroup); + } + + @Override + public boolean equals(@Nullable Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + UserGroupName that = ((UserGroupName) o); + return Objects.equals(this.organization, that.organization) + && Objects.equals(this.userGroup, that.userGroup); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(organization); + h *= 1000003; + h ^= Objects.hashCode(userGroup); + return h; + } + + /** Builder for organizations/{organization}/userGroups/{user_group}. */ + public static class Builder { + private String organization; + private String userGroup; + + protected Builder() {} + + public String getOrganization() { + return organization; + } + + public String getUserGroup() { + return userGroup; + } + + public Builder setOrganization(String organization) { + this.organization = organization; + return this; + } + + public Builder setUserGroup(String userGroup) { + this.userGroup = userGroup; + return this; + } + + private Builder(UserGroupName userGroupName) { + this.organization = userGroupName.organization; + this.userGroup = userGroupName.userGroup; + } + + public UserGroupName build() { + return new UserGroupName(this); + } + } +} diff --git a/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/UserGroupOrBuilder.java b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/UserGroupOrBuilder.java new file mode 100644 index 000000000000..24f8044bf940 --- /dev/null +++ b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/UserGroupOrBuilder.java @@ -0,0 +1,112 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/marketingplatform/admin/v1alpha/resources.proto +// Protobuf Java Version: 4.33.6 + +package com.google.ads.marketingplatform.admin.v1alpha; + +@com.google.protobuf.Generated +public interface UserGroupOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.marketingplatform.admin.v1alpha.UserGroup) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Identifier. Resource name of this UserGroup.
+   *
+   * Format: organizations/{org_id}/userGroups/{user_group_id}
+   * Example: "organizations/123abc/userGroups/456def"
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Identifier. Resource name of this UserGroup.
+   *
+   * Format: organizations/{org_id}/userGroups/{user_group_id}
+   * Example: "organizations/123abc/userGroups/456def"
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. The human-readable name for the user group.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + + /** + * + * + *
+   * Optional. The human-readable name for the user group.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Optional. The description of the user group.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
+   * Optional. The description of the user group.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); +} diff --git a/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/proto/google/marketingplatform/admin/v1alpha/marketingplatform_admin.proto b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/proto/google/marketingplatform/admin/v1alpha/marketingplatform_admin.proto index 32579bc26818..ba6f83ad3f75 100644 --- a/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/proto/google/marketingplatform/admin/v1alpha/marketingplatform_admin.proto +++ b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/proto/google/marketingplatform/admin/v1alpha/marketingplatform_admin.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -22,6 +22,7 @@ import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/marketingplatform/admin/v1alpha/resources.proto"; import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; import "google/type/date.proto"; import "google/type/money.proto"; @@ -44,7 +45,7 @@ service MarketingplatformAdminService { "https://www.googleapis.com/auth/marketingplatformadmin.analytics.read," "https://www.googleapis.com/auth/marketingplatformadmin.analytics.update"; - // Lookup for a single organization. + // Looks up a single organization. rpc GetOrganization(GetOrganizationRequest) returns (Organization) { option (google.api.http) = { get: "/v1alpha/{name=organizations/*}" @@ -120,7 +121,7 @@ service MarketingplatformAdminService { option (google.api.method_signature) = "analytics_account_link"; } - // Get the usage and billing data for properties within the organization for + // Gets the usage and billing data for properties within the organization for // the specified month. // // Per direct client org, user needs to be OrgAdmin/BillingAdmin on the @@ -138,6 +139,132 @@ service MarketingplatformAdminService { }; option (google.api.method_signature) = "organization"; } + + // Looks up a single user group. + rpc GetUserGroup(GetUserGroupRequest) returns (UserGroup) { + option (google.api.http) = { + get: "/v1alpha/{name=organizations/*/userGroups/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Returns a list of user groups in the specified GMP organization. + rpc ListUserGroups(ListUserGroupsRequest) returns (ListUserGroupsResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=organizations/*}/userGroups" + }; + option (google.api.method_signature) = "parent"; + } + + // Creates a user group in the specified GMP organization. + rpc CreateUserGroup(CreateUserGroupRequest) returns (UserGroup) { + option (google.api.http) = { + post: "/v1alpha/{parent=organizations/*}/userGroups" + body: "user_group" + }; + option (google.api.method_signature) = "parent,user_group"; + } + + // Updates a user group in the specified GMP organization. + rpc UpdateUserGroup(UpdateUserGroupRequest) returns (UserGroup) { + option (google.api.http) = { + patch: "/v1alpha/{user_group.name=organizations/*/userGroups/*}" + body: "user_group" + }; + option (google.api.method_signature) = "user_group,update_mask"; + } + + // Deletes a user group in the specified GMP organization. + rpc DeleteUserGroup(DeleteUserGroupRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1alpha/{name=organizations/*/userGroups/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Looks up a single user group member. + rpc GetUserGroupMember(GetUserGroupMemberRequest) returns (UserGroupMember) { + option (google.api.http) = { + get: "/v1alpha/{name=organizations/*/userGroups/*/members/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Returns a list of members in the specified user group. + rpc ListUserGroupMembers(ListUserGroupMembersRequest) + returns (ListUserGroupMembersResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=organizations/*/userGroups/*}/members" + }; + option (google.api.method_signature) = "parent"; + } + + // Adds a member to the specified GMP user group. + rpc CreateUserGroupMember(CreateUserGroupMemberRequest) + returns (UserGroupMember) { + option (google.api.http) = { + post: "/v1alpha/{parent=organizations/*/userGroups/*}/members" + body: "user_group_member" + }; + option (google.api.method_signature) = "parent,user_group_member"; + } + + // Updates a member in the specified GMP user group. + rpc UpdateUserGroupMember(UpdateUserGroupMemberRequest) + returns (UserGroupMember) { + option (google.api.http) = { + patch: "/v1alpha/{user_group_member.name=organizations/*/userGroups/*/members/*}" + body: "user_group_member" + }; + option (google.api.method_signature) = "user_group_member,update_mask"; + } + + // Deletes a member in the specified GMP user group. + rpc DeleteUserGroupMember(DeleteUserGroupMemberRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1alpha/{name=organizations/*/userGroups/*/members/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Looks up a single admin access binding. + rpc GetAdminAccessBinding(GetAdminAccessBindingRequest) + returns (AdminAccessBinding) { + option (google.api.http) = { + get: "/v1alpha/{name=organizations/*/adminAccessBindings/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Returns a list of admin access bindings in the specified GMP organization. + rpc ListAdminAccessBindings(ListAdminAccessBindingsRequest) + returns (ListAdminAccessBindingsResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=organizations/*}/adminAccessBindings" + }; + option (google.api.method_signature) = "parent"; + } + + // Creates an admin access binding in the specified GMP organization. + rpc CreateAdminAccessBinding(CreateAdminAccessBindingRequest) + returns (AdminAccessBinding) { + option (google.api.http) = { + post: "/v1alpha/{parent=organizations/*}/adminAccessBindings" + body: "admin_access_binding" + }; + option (google.api.method_signature) = "parent,admin_access_binding"; + } + + // Updates an admin access binding in the specified GMP organization. + rpc UpdateAdminAccessBinding(UpdateAdminAccessBindingRequest) + returns (AdminAccessBinding) { + option (google.api.http) = { + patch: "/v1alpha/{admin_access_binding.name=organizations/*/adminAccessBindings/*}" + body: "admin_access_binding" + }; + option (google.api.method_signature) = "admin_access_binding,update_mask"; + } } // Request message for GetOrganization RPC. @@ -374,3 +501,265 @@ message ReportPropertyUsageResponse { // Will be empty if user only has access to usage data. BillInfo bill_info = 2; } + +// Request message for GetUserGroup RPC. +message GetUserGroupRequest { + // Required. The name of the UserGroup to retrieve. + // Format: organizations/{org_id}/userGroups/{user_group_id} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "marketingplatformadmin.googleapis.com/UserGroup" + } + ]; +} + +// Request message for ListUserGroups RPC. +message ListUserGroupsRequest { + // Required. The parent org where this UserGroup will be listed. + // Format: organizations/{org_id} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "marketingplatformadmin.googleapis.com/UserGroup" + } + ]; + + // Optional. The maximum number of user groups to return in one call. The + // service may return fewer than this value. + // + // If unspecified, at most 50 user groups will be returned. The maximum value + // is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous ListUserGroups call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListUserGroups` must + // match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for ListUserGroups RPC. +message ListUserGroupsResponse { + // User groups in the organization. + repeated UserGroup user_groups = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// Request message for CreateUserGroup RPC. +message CreateUserGroupRequest { + // Required. The parent resource where this UserGroup will be created. + // Format: organizations/{org_id} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "marketingplatformadmin.googleapis.com/UserGroup" + } + ]; + + // Required. The user group to create. + UserGroup user_group = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for UpdateUserGroup RPC. +message UpdateUserGroupRequest { + // Required. The user group to update. + UserGroup user_group = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of fields to update. Field names must be in snake case + // (for example, "field_to_update"). Omitted fields will not be updated. To + // replace the entire entity, use one path with the string "*" to match all + // fields. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for DeleteUserGroup RPC. +message DeleteUserGroupRequest { + // Required. The name of the user group to delete. + // Format: organizations/{org_id}/userGroups/{user_group_id} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "marketingplatformadmin.googleapis.com/UserGroup" + } + ]; +} + +// Request message for GetUserGroupMember RPC. +message GetUserGroupMemberRequest { + // Required. The name of the user group member to retrieve. + // Format: + // organizations/{org_id}/userGroups/{user_group_id}/members/{member_id} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "marketingplatformadmin.googleapis.com/UserGroupMember" + } + ]; +} + +// Request message for ListUserGroupMembers RPC. +message ListUserGroupMembersRequest { + // Required. The parent user group where this UserGroupMember will be listed. + // Format: organizations/{org_id}/userGroups/{user_group_id} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "marketingplatformadmin.googleapis.com/UserGroupMember" + } + ]; + + // Optional. The maximum number of user group members to return in one call. + // The service may return fewer than this value. + // + // If unspecified, at most 50 user group members will be returned. The + // maximum value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous ListUserGroupMembers call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to + // `ListUserGroupMembers` must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for ListUserGroupMembers RPC. +message ListUserGroupMembersResponse { + // User group members in the user group. + repeated UserGroupMember user_group_members = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// Request message for CreateUserGroupMember RPC. +message CreateUserGroupMemberRequest { + // Required. The parent resource where this UserGroupMember will be created. + // Format: organizations/{org_id}/userGroups/{user_group_id} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "marketingplatformadmin.googleapis.com/UserGroupMember" + } + ]; + + // Required. The user group member to create. + UserGroupMember user_group_member = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for UpdateUserGroupMember RPC. +message UpdateUserGroupMemberRequest { + // Required. The user group member to update. + UserGroupMember user_group_member = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of fields to update. Field names must be in snake case + // (for example, "field_to_update"). Omitted fields will not be updated. To + // replace the entire entity, use one path with the string "*" to match all + // fields. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for DeleteUserGroupMember RPC. +message DeleteUserGroupMemberRequest { + // Required. The name of the user group member to delete. + // Format: + // organizations/{org_id}/userGroups/{user_group_id}/members/{member_id} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "marketingplatformadmin.googleapis.com/UserGroupMember" + } + ]; +} + +// Response message for GetAdminAccessBinding RPC. +message GetAdminAccessBindingRequest { + // Required. The name of the AdminAccessBinding to retrieve. + // Format: + // organizations/{org_id}/adminAccessBindings/{admin_access_binding_id} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "marketingplatformadmin.googleapis.com/AdminAccessBinding" + } + ]; +} + +// Request message for ListAdminAccessBindings RPC. +message ListAdminAccessBindingsRequest { + // Required. The parent organization, which owns this collection of Admin + // Access Bindings. Format: organizations/{org_id} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "marketingplatformadmin.googleapis.com/AdminAccessBinding" + } + ]; + + // Optional. The maximum number of Admin Access Bindings to return in one + // call. The service may return fewer than this value. + // + // If unspecified, at most 50 Admin Access Bindings will be returned. The + // maximum value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous ListAdminAccessBindings + // call. Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to + // `ListAdminAccessBindings` must match the call that provided the page + // token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for ListAdminAccessBindings RPC. +message ListAdminAccessBindingsResponse { + // Admin Access Bindings in the organization. + repeated AdminAccessBinding admin_access_bindings = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// Request message for CreateAdminAccessBinding RPC. +message CreateAdminAccessBindingRequest { + // Required. The parent organization, which owns this Admin Access Binding. + // Format: organizations/{org_id} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "marketingplatformadmin.googleapis.com/AdminAccessBinding" + } + ]; + + // Required. The Admin Access Binding to create. + // + // Only 'user_email' input is allowed. + AdminAccessBinding admin_access_binding = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for UpdateAdminAccessBinding RPC. +message UpdateAdminAccessBindingRequest { + // Required. The AdminAccessBinding to update. + AdminAccessBinding admin_access_binding = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of fields to update. Field names must be in snake case + // (for example, "field_to_update"). Omitted fields will not be updated. To + // replace the entire entity, use one path with the string "*" to match all + // fields. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; +} diff --git a/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/proto/google/marketingplatform/admin/v1alpha/resources.proto b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/proto/google/marketingplatform/admin/v1alpha/resources.proto index ed8f5b192eb8..a3ede0f77930 100644 --- a/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/proto/google/marketingplatform/admin/v1alpha/resources.proto +++ b/java-marketingplatformadminapi/proto-admin-v1alpha/src/main/proto/google/marketingplatform/admin/v1alpha/resources.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -72,6 +72,23 @@ enum AnalyticsPropertyType { ANALYTICS_PROPERTY_TYPE_ROLLUP = 3; } +// Roles that can be assigned to a user or user group in a GMP organization. +enum OrganizationRole { + // Unknown or unspecified organization role. + ORGANIZATION_ROLE_UNSPECIFIED = 0; + + // Organization admin role that grants all administrative privileges. + ORG_ADMIN_ROLE = 1; + + // User admin role that grants access to the Users section to perform various + // user management functions. + USER_ADMIN_ROLE = 2; + + // Billing admin role that grants access to the Billing section to perform + // various billing-related functions. + BILLING_ADMIN_ROLE = 3; +} + // A resource message representing a Google Marketing Platform organization. message Organization { option (google.api.resource) = { @@ -128,3 +145,102 @@ message AnalyticsAccountLink { LinkVerificationState link_verification_state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } + +// A resource message representing a user group in a GMP organization. +message UserGroup { + option (google.api.resource) = { + type: "marketingplatformadmin.googleapis.com/UserGroup" + pattern: "organizations/{organization}/userGroups/{user_group}" + plural: "userGroups" + singular: "userGroup" + }; + + // Identifier. Resource name of this UserGroup. + // + // Format: organizations/{org_id}/userGroups/{user_group_id} + // Example: "organizations/123abc/userGroups/456def" + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Optional. The human-readable name for the user group. + string display_name = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The description of the user group. + string description = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// A resource message representing a member of a user group. +message UserGroupMember { + option (google.api.resource) = { + type: "marketingplatformadmin.googleapis.com/UserGroupMember" + pattern: "organizations/{organization}/userGroups/{user_group}/members/{member}" + plural: "userGroupMembers" + singular: "userGroupMember" + }; + + // The role of the member in the user group. + enum MembershipRole { + // Unspecified membership role. + MEMBERSHIP_ROLE_UNSPECIFIED = 0; + + // Owner role that can add and remove group members. + MEMBERSHIP_ROLE_OWNER = 1; + + // Member role that receives all permissions assigned to the group. + MEMBERSHIP_ROLE_MEMBER = 2; + } + + // The member of the user group. + oneof member { + // Email address of the user member. + string user_email = 2; + + // User group resource name of the group member. + string user_group = 3; + } + + // Identifier. The resource name of this UserGroupMember. + // + // Format: + // organizations/{org_id}/userGroups/{user_group_id}/members/{member_id} + // Example: + // "organizations/123abc/userGroups/456def/members/789ghi" + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Optional. The role of the member in the user group. + MembershipRole membership_role = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// A resource message representing a binding to a set of roles. +message AdminAccessBinding { + option (google.api.resource) = { + type: "marketingplatformadmin.googleapis.com/AdminAccessBinding" + pattern: "organizations/{organization}/adminAccessBindings/{admin_access_binding}" + plural: "adminAccessBindings" + singular: "adminAccessBinding" + }; + + // The entity to which the roles are granted. + oneof access_target { + // Email address of the user. + string user_email = 2; + + // Resource name of the user group. + string user_group = 3; + } + + // Identifier. The resource name of this AdminAccessBinding. + // + // Format: + // organizations/{org_id}/adminAccessBindings/{admin_access_binding_id} + // Example: "organizations/123abc/adminAccessBindings/456def" + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Optional. A list of roles granted to the parent organization. + // + // USER_ADMIN_ROLE and BILLING_ADMIN_ROLE will be automatically added if + // ORG_ADMIN_ROLE is assigned. + // + // No roles will be assigned if no roles are specified. + repeated OrganizationRole organization_roles = 4 + [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/createadminaccessbinding/AsyncCreateAdminAccessBinding.java b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/createadminaccessbinding/AsyncCreateAdminAccessBinding.java new file mode 100644 index 000000000000..dd6af5bc1b1a --- /dev/null +++ b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/createadminaccessbinding/AsyncCreateAdminAccessBinding.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.marketingplatform.admin.v1alpha.samples; + +// [START marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_CreateAdminAccessBinding_async] +import com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding; +import com.google.ads.marketingplatform.admin.v1alpha.CreateAdminAccessBindingRequest; +import com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient; +import com.google.ads.marketingplatform.admin.v1alpha.OrganizationName; +import com.google.api.core.ApiFuture; + +public class AsyncCreateAdminAccessBinding { + + public static void main(String[] args) throws Exception { + asyncCreateAdminAccessBinding(); + } + + public static void asyncCreateAdminAccessBinding() throws Exception { + // 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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = + MarketingplatformAdminServiceClient.create()) { + CreateAdminAccessBindingRequest request = + CreateAdminAccessBindingRequest.newBuilder() + .setParent(OrganizationName.of("[ORGANIZATION]").toString()) + .setAdminAccessBinding(AdminAccessBinding.newBuilder().build()) + .build(); + ApiFuture future = + marketingplatformAdminServiceClient + .createAdminAccessBindingCallable() + .futureCall(request); + // Do something. + AdminAccessBinding response = future.get(); + } + } +} +// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_CreateAdminAccessBinding_async] diff --git a/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/createadminaccessbinding/SyncCreateAdminAccessBinding.java b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/createadminaccessbinding/SyncCreateAdminAccessBinding.java new file mode 100644 index 000000000000..510725d45201 --- /dev/null +++ b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/createadminaccessbinding/SyncCreateAdminAccessBinding.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.marketingplatform.admin.v1alpha.samples; + +// [START marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_CreateAdminAccessBinding_sync] +import com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding; +import com.google.ads.marketingplatform.admin.v1alpha.CreateAdminAccessBindingRequest; +import com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient; +import com.google.ads.marketingplatform.admin.v1alpha.OrganizationName; + +public class SyncCreateAdminAccessBinding { + + public static void main(String[] args) throws Exception { + syncCreateAdminAccessBinding(); + } + + public static void syncCreateAdminAccessBinding() throws Exception { + // 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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = + MarketingplatformAdminServiceClient.create()) { + CreateAdminAccessBindingRequest request = + CreateAdminAccessBindingRequest.newBuilder() + .setParent(OrganizationName.of("[ORGANIZATION]").toString()) + .setAdminAccessBinding(AdminAccessBinding.newBuilder().build()) + .build(); + AdminAccessBinding response = + marketingplatformAdminServiceClient.createAdminAccessBinding(request); + } + } +} +// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_CreateAdminAccessBinding_sync] diff --git a/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/createadminaccessbinding/SyncCreateAdminAccessBindingOrganizationnameAdminaccessbinding.java b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/createadminaccessbinding/SyncCreateAdminAccessBindingOrganizationnameAdminaccessbinding.java new file mode 100644 index 000000000000..0170d6c59ab9 --- /dev/null +++ b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/createadminaccessbinding/SyncCreateAdminAccessBindingOrganizationnameAdminaccessbinding.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.marketingplatform.admin.v1alpha.samples; + +// [START marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_CreateAdminAccessBinding_OrganizationnameAdminaccessbinding_sync] +import com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding; +import com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient; +import com.google.ads.marketingplatform.admin.v1alpha.OrganizationName; + +public class SyncCreateAdminAccessBindingOrganizationnameAdminaccessbinding { + + public static void main(String[] args) throws Exception { + syncCreateAdminAccessBindingOrganizationnameAdminaccessbinding(); + } + + public static void syncCreateAdminAccessBindingOrganizationnameAdminaccessbinding() + throws Exception { + // 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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = + MarketingplatformAdminServiceClient.create()) { + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + AdminAccessBinding adminAccessBinding = AdminAccessBinding.newBuilder().build(); + AdminAccessBinding response = + marketingplatformAdminServiceClient.createAdminAccessBinding(parent, adminAccessBinding); + } + } +} +// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_CreateAdminAccessBinding_OrganizationnameAdminaccessbinding_sync] diff --git a/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/createadminaccessbinding/SyncCreateAdminAccessBindingStringAdminaccessbinding.java b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/createadminaccessbinding/SyncCreateAdminAccessBindingStringAdminaccessbinding.java new file mode 100644 index 000000000000..755313a78843 --- /dev/null +++ b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/createadminaccessbinding/SyncCreateAdminAccessBindingStringAdminaccessbinding.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.marketingplatform.admin.v1alpha.samples; + +// [START marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_CreateAdminAccessBinding_StringAdminaccessbinding_sync] +import com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding; +import com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient; +import com.google.ads.marketingplatform.admin.v1alpha.OrganizationName; + +public class SyncCreateAdminAccessBindingStringAdminaccessbinding { + + public static void main(String[] args) throws Exception { + syncCreateAdminAccessBindingStringAdminaccessbinding(); + } + + public static void syncCreateAdminAccessBindingStringAdminaccessbinding() throws Exception { + // 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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = + MarketingplatformAdminServiceClient.create()) { + String parent = OrganizationName.of("[ORGANIZATION]").toString(); + AdminAccessBinding adminAccessBinding = AdminAccessBinding.newBuilder().build(); + AdminAccessBinding response = + marketingplatformAdminServiceClient.createAdminAccessBinding(parent, adminAccessBinding); + } + } +} +// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_CreateAdminAccessBinding_StringAdminaccessbinding_sync] diff --git a/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/createusergroup/AsyncCreateUserGroup.java b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/createusergroup/AsyncCreateUserGroup.java new file mode 100644 index 000000000000..855824823a41 --- /dev/null +++ b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/createusergroup/AsyncCreateUserGroup.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.marketingplatform.admin.v1alpha.samples; + +// [START marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_CreateUserGroup_async] +import com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupRequest; +import com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient; +import com.google.ads.marketingplatform.admin.v1alpha.OrganizationName; +import com.google.ads.marketingplatform.admin.v1alpha.UserGroup; +import com.google.api.core.ApiFuture; + +public class AsyncCreateUserGroup { + + public static void main(String[] args) throws Exception { + asyncCreateUserGroup(); + } + + public static void asyncCreateUserGroup() throws Exception { + // 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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = + MarketingplatformAdminServiceClient.create()) { + CreateUserGroupRequest request = + CreateUserGroupRequest.newBuilder() + .setParent(OrganizationName.of("[ORGANIZATION]").toString()) + .setUserGroup(UserGroup.newBuilder().build()) + .build(); + ApiFuture future = + marketingplatformAdminServiceClient.createUserGroupCallable().futureCall(request); + // Do something. + UserGroup response = future.get(); + } + } +} +// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_CreateUserGroup_async] diff --git a/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/createusergroup/SyncCreateUserGroup.java b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/createusergroup/SyncCreateUserGroup.java new file mode 100644 index 000000000000..a7180971c91b --- /dev/null +++ b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/createusergroup/SyncCreateUserGroup.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.marketingplatform.admin.v1alpha.samples; + +// [START marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_CreateUserGroup_sync] +import com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupRequest; +import com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient; +import com.google.ads.marketingplatform.admin.v1alpha.OrganizationName; +import com.google.ads.marketingplatform.admin.v1alpha.UserGroup; + +public class SyncCreateUserGroup { + + public static void main(String[] args) throws Exception { + syncCreateUserGroup(); + } + + public static void syncCreateUserGroup() throws Exception { + // 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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = + MarketingplatformAdminServiceClient.create()) { + CreateUserGroupRequest request = + CreateUserGroupRequest.newBuilder() + .setParent(OrganizationName.of("[ORGANIZATION]").toString()) + .setUserGroup(UserGroup.newBuilder().build()) + .build(); + UserGroup response = marketingplatformAdminServiceClient.createUserGroup(request); + } + } +} +// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_CreateUserGroup_sync] diff --git a/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/createusergroup/SyncCreateUserGroupOrganizationnameUsergroup.java b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/createusergroup/SyncCreateUserGroupOrganizationnameUsergroup.java new file mode 100644 index 000000000000..9bde39c53ab2 --- /dev/null +++ b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/createusergroup/SyncCreateUserGroupOrganizationnameUsergroup.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.marketingplatform.admin.v1alpha.samples; + +// [START marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_CreateUserGroup_OrganizationnameUsergroup_sync] +import com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient; +import com.google.ads.marketingplatform.admin.v1alpha.OrganizationName; +import com.google.ads.marketingplatform.admin.v1alpha.UserGroup; + +public class SyncCreateUserGroupOrganizationnameUsergroup { + + public static void main(String[] args) throws Exception { + syncCreateUserGroupOrganizationnameUsergroup(); + } + + public static void syncCreateUserGroupOrganizationnameUsergroup() throws Exception { + // 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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = + MarketingplatformAdminServiceClient.create()) { + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + UserGroup userGroup = UserGroup.newBuilder().build(); + UserGroup response = marketingplatformAdminServiceClient.createUserGroup(parent, userGroup); + } + } +} +// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_CreateUserGroup_OrganizationnameUsergroup_sync] diff --git a/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/createusergroup/SyncCreateUserGroupStringUsergroup.java b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/createusergroup/SyncCreateUserGroupStringUsergroup.java new file mode 100644 index 000000000000..22c0a3a4b107 --- /dev/null +++ b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/createusergroup/SyncCreateUserGroupStringUsergroup.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.marketingplatform.admin.v1alpha.samples; + +// [START marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_CreateUserGroup_StringUsergroup_sync] +import com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient; +import com.google.ads.marketingplatform.admin.v1alpha.OrganizationName; +import com.google.ads.marketingplatform.admin.v1alpha.UserGroup; + +public class SyncCreateUserGroupStringUsergroup { + + public static void main(String[] args) throws Exception { + syncCreateUserGroupStringUsergroup(); + } + + public static void syncCreateUserGroupStringUsergroup() throws Exception { + // 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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = + MarketingplatformAdminServiceClient.create()) { + String parent = OrganizationName.of("[ORGANIZATION]").toString(); + UserGroup userGroup = UserGroup.newBuilder().build(); + UserGroup response = marketingplatformAdminServiceClient.createUserGroup(parent, userGroup); + } + } +} +// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_CreateUserGroup_StringUsergroup_sync] diff --git a/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/createusergroupmember/AsyncCreateUserGroupMember.java b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/createusergroupmember/AsyncCreateUserGroupMember.java new file mode 100644 index 000000000000..46fd2ca0ab61 --- /dev/null +++ b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/createusergroupmember/AsyncCreateUserGroupMember.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.marketingplatform.admin.v1alpha.samples; + +// [START marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_CreateUserGroupMember_async] +import com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupMemberRequest; +import com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient; +import com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember; +import com.google.ads.marketingplatform.admin.v1alpha.UserGroupName; +import com.google.api.core.ApiFuture; + +public class AsyncCreateUserGroupMember { + + public static void main(String[] args) throws Exception { + asyncCreateUserGroupMember(); + } + + public static void asyncCreateUserGroupMember() throws Exception { + // 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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = + MarketingplatformAdminServiceClient.create()) { + CreateUserGroupMemberRequest request = + CreateUserGroupMemberRequest.newBuilder() + .setParent(UserGroupName.of("[ORGANIZATION]", "[USER_GROUP]").toString()) + .setUserGroupMember(UserGroupMember.newBuilder().build()) + .build(); + ApiFuture future = + marketingplatformAdminServiceClient.createUserGroupMemberCallable().futureCall(request); + // Do something. + UserGroupMember response = future.get(); + } + } +} +// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_CreateUserGroupMember_async] diff --git a/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/createusergroupmember/SyncCreateUserGroupMember.java b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/createusergroupmember/SyncCreateUserGroupMember.java new file mode 100644 index 000000000000..64a57e73401b --- /dev/null +++ b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/createusergroupmember/SyncCreateUserGroupMember.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.marketingplatform.admin.v1alpha.samples; + +// [START marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_CreateUserGroupMember_sync] +import com.google.ads.marketingplatform.admin.v1alpha.CreateUserGroupMemberRequest; +import com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient; +import com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember; +import com.google.ads.marketingplatform.admin.v1alpha.UserGroupName; + +public class SyncCreateUserGroupMember { + + public static void main(String[] args) throws Exception { + syncCreateUserGroupMember(); + } + + public static void syncCreateUserGroupMember() throws Exception { + // 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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = + MarketingplatformAdminServiceClient.create()) { + CreateUserGroupMemberRequest request = + CreateUserGroupMemberRequest.newBuilder() + .setParent(UserGroupName.of("[ORGANIZATION]", "[USER_GROUP]").toString()) + .setUserGroupMember(UserGroupMember.newBuilder().build()) + .build(); + UserGroupMember response = marketingplatformAdminServiceClient.createUserGroupMember(request); + } + } +} +// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_CreateUserGroupMember_sync] diff --git a/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/createusergroupmember/SyncCreateUserGroupMemberStringUsergroupmember.java b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/createusergroupmember/SyncCreateUserGroupMemberStringUsergroupmember.java new file mode 100644 index 000000000000..c8dafcf91406 --- /dev/null +++ b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/createusergroupmember/SyncCreateUserGroupMemberStringUsergroupmember.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.marketingplatform.admin.v1alpha.samples; + +// [START marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_CreateUserGroupMember_StringUsergroupmember_sync] +import com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient; +import com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember; +import com.google.ads.marketingplatform.admin.v1alpha.UserGroupName; + +public class SyncCreateUserGroupMemberStringUsergroupmember { + + public static void main(String[] args) throws Exception { + syncCreateUserGroupMemberStringUsergroupmember(); + } + + public static void syncCreateUserGroupMemberStringUsergroupmember() throws Exception { + // 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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = + MarketingplatformAdminServiceClient.create()) { + String parent = UserGroupName.of("[ORGANIZATION]", "[USER_GROUP]").toString(); + UserGroupMember userGroupMember = UserGroupMember.newBuilder().build(); + UserGroupMember response = + marketingplatformAdminServiceClient.createUserGroupMember(parent, userGroupMember); + } + } +} +// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_CreateUserGroupMember_StringUsergroupmember_sync] diff --git a/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/createusergroupmember/SyncCreateUserGroupMemberUsergroupnameUsergroupmember.java b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/createusergroupmember/SyncCreateUserGroupMemberUsergroupnameUsergroupmember.java new file mode 100644 index 000000000000..fe5836e884d9 --- /dev/null +++ b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/createusergroupmember/SyncCreateUserGroupMemberUsergroupnameUsergroupmember.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.marketingplatform.admin.v1alpha.samples; + +// [START marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_CreateUserGroupMember_UsergroupnameUsergroupmember_sync] +import com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient; +import com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember; +import com.google.ads.marketingplatform.admin.v1alpha.UserGroupName; + +public class SyncCreateUserGroupMemberUsergroupnameUsergroupmember { + + public static void main(String[] args) throws Exception { + syncCreateUserGroupMemberUsergroupnameUsergroupmember(); + } + + public static void syncCreateUserGroupMemberUsergroupnameUsergroupmember() throws Exception { + // 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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = + MarketingplatformAdminServiceClient.create()) { + UserGroupName parent = UserGroupName.of("[ORGANIZATION]", "[USER_GROUP]"); + UserGroupMember userGroupMember = UserGroupMember.newBuilder().build(); + UserGroupMember response = + marketingplatformAdminServiceClient.createUserGroupMember(parent, userGroupMember); + } + } +} +// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_CreateUserGroupMember_UsergroupnameUsergroupmember_sync] diff --git a/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/deleteusergroup/AsyncDeleteUserGroup.java b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/deleteusergroup/AsyncDeleteUserGroup.java new file mode 100644 index 000000000000..117c25438c28 --- /dev/null +++ b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/deleteusergroup/AsyncDeleteUserGroup.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.marketingplatform.admin.v1alpha.samples; + +// [START marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_DeleteUserGroup_async] +import com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupRequest; +import com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient; +import com.google.ads.marketingplatform.admin.v1alpha.UserGroupName; +import com.google.api.core.ApiFuture; +import com.google.protobuf.Empty; + +public class AsyncDeleteUserGroup { + + public static void main(String[] args) throws Exception { + asyncDeleteUserGroup(); + } + + public static void asyncDeleteUserGroup() throws Exception { + // 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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = + MarketingplatformAdminServiceClient.create()) { + DeleteUserGroupRequest request = + DeleteUserGroupRequest.newBuilder() + .setName(UserGroupName.of("[ORGANIZATION]", "[USER_GROUP]").toString()) + .build(); + ApiFuture future = + marketingplatformAdminServiceClient.deleteUserGroupCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_DeleteUserGroup_async] diff --git a/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/deleteusergroup/SyncDeleteUserGroup.java b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/deleteusergroup/SyncDeleteUserGroup.java new file mode 100644 index 000000000000..859781349c8c --- /dev/null +++ b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/deleteusergroup/SyncDeleteUserGroup.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.marketingplatform.admin.v1alpha.samples; + +// [START marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_DeleteUserGroup_sync] +import com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupRequest; +import com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient; +import com.google.ads.marketingplatform.admin.v1alpha.UserGroupName; +import com.google.protobuf.Empty; + +public class SyncDeleteUserGroup { + + public static void main(String[] args) throws Exception { + syncDeleteUserGroup(); + } + + public static void syncDeleteUserGroup() throws Exception { + // 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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = + MarketingplatformAdminServiceClient.create()) { + DeleteUserGroupRequest request = + DeleteUserGroupRequest.newBuilder() + .setName(UserGroupName.of("[ORGANIZATION]", "[USER_GROUP]").toString()) + .build(); + marketingplatformAdminServiceClient.deleteUserGroup(request); + } + } +} +// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_DeleteUserGroup_sync] diff --git a/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/deleteusergroup/SyncDeleteUserGroupString.java b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/deleteusergroup/SyncDeleteUserGroupString.java new file mode 100644 index 000000000000..167b1293cae5 --- /dev/null +++ b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/deleteusergroup/SyncDeleteUserGroupString.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.marketingplatform.admin.v1alpha.samples; + +// [START marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_DeleteUserGroup_String_sync] +import com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient; +import com.google.ads.marketingplatform.admin.v1alpha.UserGroupName; +import com.google.protobuf.Empty; + +public class SyncDeleteUserGroupString { + + public static void main(String[] args) throws Exception { + syncDeleteUserGroupString(); + } + + public static void syncDeleteUserGroupString() throws Exception { + // 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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = + MarketingplatformAdminServiceClient.create()) { + String name = UserGroupName.of("[ORGANIZATION]", "[USER_GROUP]").toString(); + marketingplatformAdminServiceClient.deleteUserGroup(name); + } + } +} +// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_DeleteUserGroup_String_sync] diff --git a/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/deleteusergroup/SyncDeleteUserGroupUsergroupname.java b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/deleteusergroup/SyncDeleteUserGroupUsergroupname.java new file mode 100644 index 000000000000..46fa87c1633b --- /dev/null +++ b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/deleteusergroup/SyncDeleteUserGroupUsergroupname.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.marketingplatform.admin.v1alpha.samples; + +// [START marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_DeleteUserGroup_Usergroupname_sync] +import com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient; +import com.google.ads.marketingplatform.admin.v1alpha.UserGroupName; +import com.google.protobuf.Empty; + +public class SyncDeleteUserGroupUsergroupname { + + public static void main(String[] args) throws Exception { + syncDeleteUserGroupUsergroupname(); + } + + public static void syncDeleteUserGroupUsergroupname() throws Exception { + // 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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = + MarketingplatformAdminServiceClient.create()) { + UserGroupName name = UserGroupName.of("[ORGANIZATION]", "[USER_GROUP]"); + marketingplatformAdminServiceClient.deleteUserGroup(name); + } + } +} +// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_DeleteUserGroup_Usergroupname_sync] diff --git a/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/deleteusergroupmember/AsyncDeleteUserGroupMember.java b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/deleteusergroupmember/AsyncDeleteUserGroupMember.java new file mode 100644 index 000000000000..3d24c0fb3ae4 --- /dev/null +++ b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/deleteusergroupmember/AsyncDeleteUserGroupMember.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.marketingplatform.admin.v1alpha.samples; + +// [START marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_DeleteUserGroupMember_async] +import com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupMemberRequest; +import com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient; +import com.google.ads.marketingplatform.admin.v1alpha.UserGroupMemberName; +import com.google.api.core.ApiFuture; +import com.google.protobuf.Empty; + +public class AsyncDeleteUserGroupMember { + + public static void main(String[] args) throws Exception { + asyncDeleteUserGroupMember(); + } + + public static void asyncDeleteUserGroupMember() throws Exception { + // 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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = + MarketingplatformAdminServiceClient.create()) { + DeleteUserGroupMemberRequest request = + DeleteUserGroupMemberRequest.newBuilder() + .setName( + UserGroupMemberName.of("[ORGANIZATION]", "[USER_GROUP]", "[MEMBER]").toString()) + .build(); + ApiFuture future = + marketingplatformAdminServiceClient.deleteUserGroupMemberCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_DeleteUserGroupMember_async] diff --git a/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/deleteusergroupmember/SyncDeleteUserGroupMember.java b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/deleteusergroupmember/SyncDeleteUserGroupMember.java new file mode 100644 index 000000000000..4e48676b5109 --- /dev/null +++ b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/deleteusergroupmember/SyncDeleteUserGroupMember.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.marketingplatform.admin.v1alpha.samples; + +// [START marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_DeleteUserGroupMember_sync] +import com.google.ads.marketingplatform.admin.v1alpha.DeleteUserGroupMemberRequest; +import com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient; +import com.google.ads.marketingplatform.admin.v1alpha.UserGroupMemberName; +import com.google.protobuf.Empty; + +public class SyncDeleteUserGroupMember { + + public static void main(String[] args) throws Exception { + syncDeleteUserGroupMember(); + } + + public static void syncDeleteUserGroupMember() throws Exception { + // 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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = + MarketingplatformAdminServiceClient.create()) { + DeleteUserGroupMemberRequest request = + DeleteUserGroupMemberRequest.newBuilder() + .setName( + UserGroupMemberName.of("[ORGANIZATION]", "[USER_GROUP]", "[MEMBER]").toString()) + .build(); + marketingplatformAdminServiceClient.deleteUserGroupMember(request); + } + } +} +// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_DeleteUserGroupMember_sync] diff --git a/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/deleteusergroupmember/SyncDeleteUserGroupMemberString.java b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/deleteusergroupmember/SyncDeleteUserGroupMemberString.java new file mode 100644 index 000000000000..c22bf4e0310f --- /dev/null +++ b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/deleteusergroupmember/SyncDeleteUserGroupMemberString.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.marketingplatform.admin.v1alpha.samples; + +// [START marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_DeleteUserGroupMember_String_sync] +import com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient; +import com.google.ads.marketingplatform.admin.v1alpha.UserGroupMemberName; +import com.google.protobuf.Empty; + +public class SyncDeleteUserGroupMemberString { + + public static void main(String[] args) throws Exception { + syncDeleteUserGroupMemberString(); + } + + public static void syncDeleteUserGroupMemberString() throws Exception { + // 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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = + MarketingplatformAdminServiceClient.create()) { + String name = UserGroupMemberName.of("[ORGANIZATION]", "[USER_GROUP]", "[MEMBER]").toString(); + marketingplatformAdminServiceClient.deleteUserGroupMember(name); + } + } +} +// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_DeleteUserGroupMember_String_sync] diff --git a/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/deleteusergroupmember/SyncDeleteUserGroupMemberUsergroupmembername.java b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/deleteusergroupmember/SyncDeleteUserGroupMemberUsergroupmembername.java new file mode 100644 index 000000000000..0f1bd0f04a85 --- /dev/null +++ b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/deleteusergroupmember/SyncDeleteUserGroupMemberUsergroupmembername.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.marketingplatform.admin.v1alpha.samples; + +// [START marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_DeleteUserGroupMember_Usergroupmembername_sync] +import com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient; +import com.google.ads.marketingplatform.admin.v1alpha.UserGroupMemberName; +import com.google.protobuf.Empty; + +public class SyncDeleteUserGroupMemberUsergroupmembername { + + public static void main(String[] args) throws Exception { + syncDeleteUserGroupMemberUsergroupmembername(); + } + + public static void syncDeleteUserGroupMemberUsergroupmembername() throws Exception { + // 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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = + MarketingplatformAdminServiceClient.create()) { + UserGroupMemberName name = + UserGroupMemberName.of("[ORGANIZATION]", "[USER_GROUP]", "[MEMBER]"); + marketingplatformAdminServiceClient.deleteUserGroupMember(name); + } + } +} +// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_DeleteUserGroupMember_Usergroupmembername_sync] diff --git a/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/getadminaccessbinding/AsyncGetAdminAccessBinding.java b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/getadminaccessbinding/AsyncGetAdminAccessBinding.java new file mode 100644 index 000000000000..c42778dd8aff --- /dev/null +++ b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/getadminaccessbinding/AsyncGetAdminAccessBinding.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.marketingplatform.admin.v1alpha.samples; + +// [START marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_GetAdminAccessBinding_async] +import com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding; +import com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBindingName; +import com.google.ads.marketingplatform.admin.v1alpha.GetAdminAccessBindingRequest; +import com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient; +import com.google.api.core.ApiFuture; + +public class AsyncGetAdminAccessBinding { + + public static void main(String[] args) throws Exception { + asyncGetAdminAccessBinding(); + } + + public static void asyncGetAdminAccessBinding() throws Exception { + // 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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = + MarketingplatformAdminServiceClient.create()) { + GetAdminAccessBindingRequest request = + GetAdminAccessBindingRequest.newBuilder() + .setName( + AdminAccessBindingName.of("[ORGANIZATION]", "[ADMIN_ACCESS_BINDING]").toString()) + .build(); + ApiFuture future = + marketingplatformAdminServiceClient.getAdminAccessBindingCallable().futureCall(request); + // Do something. + AdminAccessBinding response = future.get(); + } + } +} +// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_GetAdminAccessBinding_async] diff --git a/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/getadminaccessbinding/SyncGetAdminAccessBinding.java b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/getadminaccessbinding/SyncGetAdminAccessBinding.java new file mode 100644 index 000000000000..6e5bde31f8ec --- /dev/null +++ b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/getadminaccessbinding/SyncGetAdminAccessBinding.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.marketingplatform.admin.v1alpha.samples; + +// [START marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_GetAdminAccessBinding_sync] +import com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding; +import com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBindingName; +import com.google.ads.marketingplatform.admin.v1alpha.GetAdminAccessBindingRequest; +import com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient; + +public class SyncGetAdminAccessBinding { + + public static void main(String[] args) throws Exception { + syncGetAdminAccessBinding(); + } + + public static void syncGetAdminAccessBinding() throws Exception { + // 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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = + MarketingplatformAdminServiceClient.create()) { + GetAdminAccessBindingRequest request = + GetAdminAccessBindingRequest.newBuilder() + .setName( + AdminAccessBindingName.of("[ORGANIZATION]", "[ADMIN_ACCESS_BINDING]").toString()) + .build(); + AdminAccessBinding response = + marketingplatformAdminServiceClient.getAdminAccessBinding(request); + } + } +} +// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_GetAdminAccessBinding_sync] diff --git a/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/getadminaccessbinding/SyncGetAdminAccessBindingAdminaccessbindingname.java b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/getadminaccessbinding/SyncGetAdminAccessBindingAdminaccessbindingname.java new file mode 100644 index 000000000000..23f0e0095e23 --- /dev/null +++ b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/getadminaccessbinding/SyncGetAdminAccessBindingAdminaccessbindingname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.marketingplatform.admin.v1alpha.samples; + +// [START marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_GetAdminAccessBinding_Adminaccessbindingname_sync] +import com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding; +import com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBindingName; +import com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient; + +public class SyncGetAdminAccessBindingAdminaccessbindingname { + + public static void main(String[] args) throws Exception { + syncGetAdminAccessBindingAdminaccessbindingname(); + } + + public static void syncGetAdminAccessBindingAdminaccessbindingname() throws Exception { + // 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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = + MarketingplatformAdminServiceClient.create()) { + AdminAccessBindingName name = + AdminAccessBindingName.of("[ORGANIZATION]", "[ADMIN_ACCESS_BINDING]"); + AdminAccessBinding response = marketingplatformAdminServiceClient.getAdminAccessBinding(name); + } + } +} +// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_GetAdminAccessBinding_Adminaccessbindingname_sync] diff --git a/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/getadminaccessbinding/SyncGetAdminAccessBindingString.java b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/getadminaccessbinding/SyncGetAdminAccessBindingString.java new file mode 100644 index 000000000000..4c6893ac3c92 --- /dev/null +++ b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/getadminaccessbinding/SyncGetAdminAccessBindingString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.marketingplatform.admin.v1alpha.samples; + +// [START marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_GetAdminAccessBinding_String_sync] +import com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding; +import com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBindingName; +import com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient; + +public class SyncGetAdminAccessBindingString { + + public static void main(String[] args) throws Exception { + syncGetAdminAccessBindingString(); + } + + public static void syncGetAdminAccessBindingString() throws Exception { + // 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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = + MarketingplatformAdminServiceClient.create()) { + String name = + AdminAccessBindingName.of("[ORGANIZATION]", "[ADMIN_ACCESS_BINDING]").toString(); + AdminAccessBinding response = marketingplatformAdminServiceClient.getAdminAccessBinding(name); + } + } +} +// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_GetAdminAccessBinding_String_sync] diff --git a/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/getusergroup/AsyncGetUserGroup.java b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/getusergroup/AsyncGetUserGroup.java new file mode 100644 index 000000000000..fd56be1b1610 --- /dev/null +++ b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/getusergroup/AsyncGetUserGroup.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.marketingplatform.admin.v1alpha.samples; + +// [START marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_GetUserGroup_async] +import com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupRequest; +import com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient; +import com.google.ads.marketingplatform.admin.v1alpha.UserGroup; +import com.google.ads.marketingplatform.admin.v1alpha.UserGroupName; +import com.google.api.core.ApiFuture; + +public class AsyncGetUserGroup { + + public static void main(String[] args) throws Exception { + asyncGetUserGroup(); + } + + public static void asyncGetUserGroup() throws Exception { + // 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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = + MarketingplatformAdminServiceClient.create()) { + GetUserGroupRequest request = + GetUserGroupRequest.newBuilder() + .setName(UserGroupName.of("[ORGANIZATION]", "[USER_GROUP]").toString()) + .build(); + ApiFuture future = + marketingplatformAdminServiceClient.getUserGroupCallable().futureCall(request); + // Do something. + UserGroup response = future.get(); + } + } +} +// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_GetUserGroup_async] diff --git a/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/getusergroup/SyncGetUserGroup.java b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/getusergroup/SyncGetUserGroup.java new file mode 100644 index 000000000000..bde4c787b0ef --- /dev/null +++ b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/getusergroup/SyncGetUserGroup.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.marketingplatform.admin.v1alpha.samples; + +// [START marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_GetUserGroup_sync] +import com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupRequest; +import com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient; +import com.google.ads.marketingplatform.admin.v1alpha.UserGroup; +import com.google.ads.marketingplatform.admin.v1alpha.UserGroupName; + +public class SyncGetUserGroup { + + public static void main(String[] args) throws Exception { + syncGetUserGroup(); + } + + public static void syncGetUserGroup() throws Exception { + // 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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = + MarketingplatformAdminServiceClient.create()) { + GetUserGroupRequest request = + GetUserGroupRequest.newBuilder() + .setName(UserGroupName.of("[ORGANIZATION]", "[USER_GROUP]").toString()) + .build(); + UserGroup response = marketingplatformAdminServiceClient.getUserGroup(request); + } + } +} +// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_GetUserGroup_sync] diff --git a/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/getusergroup/SyncGetUserGroupString.java b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/getusergroup/SyncGetUserGroupString.java new file mode 100644 index 000000000000..380d8bf79fc1 --- /dev/null +++ b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/getusergroup/SyncGetUserGroupString.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.marketingplatform.admin.v1alpha.samples; + +// [START marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_GetUserGroup_String_sync] +import com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient; +import com.google.ads.marketingplatform.admin.v1alpha.UserGroup; +import com.google.ads.marketingplatform.admin.v1alpha.UserGroupName; + +public class SyncGetUserGroupString { + + public static void main(String[] args) throws Exception { + syncGetUserGroupString(); + } + + public static void syncGetUserGroupString() throws Exception { + // 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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = + MarketingplatformAdminServiceClient.create()) { + String name = UserGroupName.of("[ORGANIZATION]", "[USER_GROUP]").toString(); + UserGroup response = marketingplatformAdminServiceClient.getUserGroup(name); + } + } +} +// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_GetUserGroup_String_sync] diff --git a/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/getusergroup/SyncGetUserGroupUsergroupname.java b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/getusergroup/SyncGetUserGroupUsergroupname.java new file mode 100644 index 000000000000..ddcccd585c06 --- /dev/null +++ b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/getusergroup/SyncGetUserGroupUsergroupname.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.marketingplatform.admin.v1alpha.samples; + +// [START marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_GetUserGroup_Usergroupname_sync] +import com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient; +import com.google.ads.marketingplatform.admin.v1alpha.UserGroup; +import com.google.ads.marketingplatform.admin.v1alpha.UserGroupName; + +public class SyncGetUserGroupUsergroupname { + + public static void main(String[] args) throws Exception { + syncGetUserGroupUsergroupname(); + } + + public static void syncGetUserGroupUsergroupname() throws Exception { + // 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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = + MarketingplatformAdminServiceClient.create()) { + UserGroupName name = UserGroupName.of("[ORGANIZATION]", "[USER_GROUP]"); + UserGroup response = marketingplatformAdminServiceClient.getUserGroup(name); + } + } +} +// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_GetUserGroup_Usergroupname_sync] diff --git a/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/getusergroupmember/AsyncGetUserGroupMember.java b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/getusergroupmember/AsyncGetUserGroupMember.java new file mode 100644 index 000000000000..495a7b91fcf7 --- /dev/null +++ b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/getusergroupmember/AsyncGetUserGroupMember.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.marketingplatform.admin.v1alpha.samples; + +// [START marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_GetUserGroupMember_async] +import com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupMemberRequest; +import com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient; +import com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember; +import com.google.ads.marketingplatform.admin.v1alpha.UserGroupMemberName; +import com.google.api.core.ApiFuture; + +public class AsyncGetUserGroupMember { + + public static void main(String[] args) throws Exception { + asyncGetUserGroupMember(); + } + + public static void asyncGetUserGroupMember() throws Exception { + // 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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = + MarketingplatformAdminServiceClient.create()) { + GetUserGroupMemberRequest request = + GetUserGroupMemberRequest.newBuilder() + .setName( + UserGroupMemberName.of("[ORGANIZATION]", "[USER_GROUP]", "[MEMBER]").toString()) + .build(); + ApiFuture future = + marketingplatformAdminServiceClient.getUserGroupMemberCallable().futureCall(request); + // Do something. + UserGroupMember response = future.get(); + } + } +} +// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_GetUserGroupMember_async] diff --git a/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/getusergroupmember/SyncGetUserGroupMember.java b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/getusergroupmember/SyncGetUserGroupMember.java new file mode 100644 index 000000000000..5e320c0c44e4 --- /dev/null +++ b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/getusergroupmember/SyncGetUserGroupMember.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.marketingplatform.admin.v1alpha.samples; + +// [START marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_GetUserGroupMember_sync] +import com.google.ads.marketingplatform.admin.v1alpha.GetUserGroupMemberRequest; +import com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient; +import com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember; +import com.google.ads.marketingplatform.admin.v1alpha.UserGroupMemberName; + +public class SyncGetUserGroupMember { + + public static void main(String[] args) throws Exception { + syncGetUserGroupMember(); + } + + public static void syncGetUserGroupMember() throws Exception { + // 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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = + MarketingplatformAdminServiceClient.create()) { + GetUserGroupMemberRequest request = + GetUserGroupMemberRequest.newBuilder() + .setName( + UserGroupMemberName.of("[ORGANIZATION]", "[USER_GROUP]", "[MEMBER]").toString()) + .build(); + UserGroupMember response = marketingplatformAdminServiceClient.getUserGroupMember(request); + } + } +} +// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_GetUserGroupMember_sync] diff --git a/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/getusergroupmember/SyncGetUserGroupMemberString.java b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/getusergroupmember/SyncGetUserGroupMemberString.java new file mode 100644 index 000000000000..c6329433a065 --- /dev/null +++ b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/getusergroupmember/SyncGetUserGroupMemberString.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.marketingplatform.admin.v1alpha.samples; + +// [START marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_GetUserGroupMember_String_sync] +import com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient; +import com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember; +import com.google.ads.marketingplatform.admin.v1alpha.UserGroupMemberName; + +public class SyncGetUserGroupMemberString { + + public static void main(String[] args) throws Exception { + syncGetUserGroupMemberString(); + } + + public static void syncGetUserGroupMemberString() throws Exception { + // 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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = + MarketingplatformAdminServiceClient.create()) { + String name = UserGroupMemberName.of("[ORGANIZATION]", "[USER_GROUP]", "[MEMBER]").toString(); + UserGroupMember response = marketingplatformAdminServiceClient.getUserGroupMember(name); + } + } +} +// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_GetUserGroupMember_String_sync] diff --git a/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/getusergroupmember/SyncGetUserGroupMemberUsergroupmembername.java b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/getusergroupmember/SyncGetUserGroupMemberUsergroupmembername.java new file mode 100644 index 000000000000..43deb0eabd65 --- /dev/null +++ b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/getusergroupmember/SyncGetUserGroupMemberUsergroupmembername.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.marketingplatform.admin.v1alpha.samples; + +// [START marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_GetUserGroupMember_Usergroupmembername_sync] +import com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient; +import com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember; +import com.google.ads.marketingplatform.admin.v1alpha.UserGroupMemberName; + +public class SyncGetUserGroupMemberUsergroupmembername { + + public static void main(String[] args) throws Exception { + syncGetUserGroupMemberUsergroupmembername(); + } + + public static void syncGetUserGroupMemberUsergroupmembername() throws Exception { + // 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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = + MarketingplatformAdminServiceClient.create()) { + UserGroupMemberName name = + UserGroupMemberName.of("[ORGANIZATION]", "[USER_GROUP]", "[MEMBER]"); + UserGroupMember response = marketingplatformAdminServiceClient.getUserGroupMember(name); + } + } +} +// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_GetUserGroupMember_Usergroupmembername_sync] diff --git a/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/listadminaccessbindings/AsyncListAdminAccessBindings.java b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/listadminaccessbindings/AsyncListAdminAccessBindings.java new file mode 100644 index 000000000000..de369134651f --- /dev/null +++ b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/listadminaccessbindings/AsyncListAdminAccessBindings.java @@ -0,0 +1,57 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.marketingplatform.admin.v1alpha.samples; + +// [START marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_ListAdminAccessBindings_async] +import com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding; +import com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsRequest; +import com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient; +import com.google.ads.marketingplatform.admin.v1alpha.OrganizationName; +import com.google.api.core.ApiFuture; + +public class AsyncListAdminAccessBindings { + + public static void main(String[] args) throws Exception { + asyncListAdminAccessBindings(); + } + + public static void asyncListAdminAccessBindings() throws Exception { + // 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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = + MarketingplatformAdminServiceClient.create()) { + ListAdminAccessBindingsRequest request = + ListAdminAccessBindingsRequest.newBuilder() + .setParent(OrganizationName.of("[ORGANIZATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + marketingplatformAdminServiceClient + .listAdminAccessBindingsPagedCallable() + .futureCall(request); + // Do something. + for (AdminAccessBinding element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_ListAdminAccessBindings_async] diff --git a/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/listadminaccessbindings/AsyncListAdminAccessBindingsPaged.java b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/listadminaccessbindings/AsyncListAdminAccessBindingsPaged.java new file mode 100644 index 000000000000..9eae763eb92a --- /dev/null +++ b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/listadminaccessbindings/AsyncListAdminAccessBindingsPaged.java @@ -0,0 +1,63 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.marketingplatform.admin.v1alpha.samples; + +// [START marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_ListAdminAccessBindings_Paged_async] +import com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding; +import com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsRequest; +import com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsResponse; +import com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient; +import com.google.ads.marketingplatform.admin.v1alpha.OrganizationName; +import com.google.common.base.Strings; + +public class AsyncListAdminAccessBindingsPaged { + + public static void main(String[] args) throws Exception { + asyncListAdminAccessBindingsPaged(); + } + + public static void asyncListAdminAccessBindingsPaged() throws Exception { + // 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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = + MarketingplatformAdminServiceClient.create()) { + ListAdminAccessBindingsRequest request = + ListAdminAccessBindingsRequest.newBuilder() + .setParent(OrganizationName.of("[ORGANIZATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListAdminAccessBindingsResponse response = + marketingplatformAdminServiceClient.listAdminAccessBindingsCallable().call(request); + for (AdminAccessBinding element : response.getAdminAccessBindingsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_ListAdminAccessBindings_Paged_async] diff --git a/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/listadminaccessbindings/SyncListAdminAccessBindings.java b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/listadminaccessbindings/SyncListAdminAccessBindings.java new file mode 100644 index 000000000000..73ee48557dc4 --- /dev/null +++ b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/listadminaccessbindings/SyncListAdminAccessBindings.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.marketingplatform.admin.v1alpha.samples; + +// [START marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_ListAdminAccessBindings_sync] +import com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding; +import com.google.ads.marketingplatform.admin.v1alpha.ListAdminAccessBindingsRequest; +import com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient; +import com.google.ads.marketingplatform.admin.v1alpha.OrganizationName; + +public class SyncListAdminAccessBindings { + + public static void main(String[] args) throws Exception { + syncListAdminAccessBindings(); + } + + public static void syncListAdminAccessBindings() throws Exception { + // 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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = + MarketingplatformAdminServiceClient.create()) { + ListAdminAccessBindingsRequest request = + ListAdminAccessBindingsRequest.newBuilder() + .setParent(OrganizationName.of("[ORGANIZATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (AdminAccessBinding element : + marketingplatformAdminServiceClient.listAdminAccessBindings(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_ListAdminAccessBindings_sync] diff --git a/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/listadminaccessbindings/SyncListAdminAccessBindingsOrganizationname.java b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/listadminaccessbindings/SyncListAdminAccessBindingsOrganizationname.java new file mode 100644 index 000000000000..3d45ff59b919 --- /dev/null +++ b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/listadminaccessbindings/SyncListAdminAccessBindingsOrganizationname.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.marketingplatform.admin.v1alpha.samples; + +// [START marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_ListAdminAccessBindings_Organizationname_sync] +import com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding; +import com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient; +import com.google.ads.marketingplatform.admin.v1alpha.OrganizationName; + +public class SyncListAdminAccessBindingsOrganizationname { + + public static void main(String[] args) throws Exception { + syncListAdminAccessBindingsOrganizationname(); + } + + public static void syncListAdminAccessBindingsOrganizationname() throws Exception { + // 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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = + MarketingplatformAdminServiceClient.create()) { + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + for (AdminAccessBinding element : + marketingplatformAdminServiceClient.listAdminAccessBindings(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_ListAdminAccessBindings_Organizationname_sync] diff --git a/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/listadminaccessbindings/SyncListAdminAccessBindingsString.java b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/listadminaccessbindings/SyncListAdminAccessBindingsString.java new file mode 100644 index 000000000000..196778e5bfbb --- /dev/null +++ b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/listadminaccessbindings/SyncListAdminAccessBindingsString.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.marketingplatform.admin.v1alpha.samples; + +// [START marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_ListAdminAccessBindings_String_sync] +import com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding; +import com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient; +import com.google.ads.marketingplatform.admin.v1alpha.OrganizationName; + +public class SyncListAdminAccessBindingsString { + + public static void main(String[] args) throws Exception { + syncListAdminAccessBindingsString(); + } + + public static void syncListAdminAccessBindingsString() throws Exception { + // 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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = + MarketingplatformAdminServiceClient.create()) { + String parent = OrganizationName.of("[ORGANIZATION]").toString(); + for (AdminAccessBinding element : + marketingplatformAdminServiceClient.listAdminAccessBindings(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_ListAdminAccessBindings_String_sync] diff --git a/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/listusergroupmembers/AsyncListUserGroupMembers.java b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/listusergroupmembers/AsyncListUserGroupMembers.java new file mode 100644 index 000000000000..3255eac63d8b --- /dev/null +++ b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/listusergroupmembers/AsyncListUserGroupMembers.java @@ -0,0 +1,57 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.marketingplatform.admin.v1alpha.samples; + +// [START marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_ListUserGroupMembers_async] +import com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersRequest; +import com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient; +import com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember; +import com.google.ads.marketingplatform.admin.v1alpha.UserGroupName; +import com.google.api.core.ApiFuture; + +public class AsyncListUserGroupMembers { + + public static void main(String[] args) throws Exception { + asyncListUserGroupMembers(); + } + + public static void asyncListUserGroupMembers() throws Exception { + // 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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = + MarketingplatformAdminServiceClient.create()) { + ListUserGroupMembersRequest request = + ListUserGroupMembersRequest.newBuilder() + .setParent(UserGroupName.of("[ORGANIZATION]", "[USER_GROUP]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + marketingplatformAdminServiceClient + .listUserGroupMembersPagedCallable() + .futureCall(request); + // Do something. + for (UserGroupMember element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_ListUserGroupMembers_async] diff --git a/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/listusergroupmembers/AsyncListUserGroupMembersPaged.java b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/listusergroupmembers/AsyncListUserGroupMembersPaged.java new file mode 100644 index 000000000000..3762474887d0 --- /dev/null +++ b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/listusergroupmembers/AsyncListUserGroupMembersPaged.java @@ -0,0 +1,63 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.marketingplatform.admin.v1alpha.samples; + +// [START marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_ListUserGroupMembers_Paged_async] +import com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersRequest; +import com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersResponse; +import com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient; +import com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember; +import com.google.ads.marketingplatform.admin.v1alpha.UserGroupName; +import com.google.common.base.Strings; + +public class AsyncListUserGroupMembersPaged { + + public static void main(String[] args) throws Exception { + asyncListUserGroupMembersPaged(); + } + + public static void asyncListUserGroupMembersPaged() throws Exception { + // 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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = + MarketingplatformAdminServiceClient.create()) { + ListUserGroupMembersRequest request = + ListUserGroupMembersRequest.newBuilder() + .setParent(UserGroupName.of("[ORGANIZATION]", "[USER_GROUP]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListUserGroupMembersResponse response = + marketingplatformAdminServiceClient.listUserGroupMembersCallable().call(request); + for (UserGroupMember element : response.getUserGroupMembersList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_ListUserGroupMembers_Paged_async] diff --git a/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/listusergroupmembers/SyncListUserGroupMembers.java b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/listusergroupmembers/SyncListUserGroupMembers.java new file mode 100644 index 000000000000..c43b4f86db6f --- /dev/null +++ b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/listusergroupmembers/SyncListUserGroupMembers.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.marketingplatform.admin.v1alpha.samples; + +// [START marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_ListUserGroupMembers_sync] +import com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupMembersRequest; +import com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient; +import com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember; +import com.google.ads.marketingplatform.admin.v1alpha.UserGroupName; + +public class SyncListUserGroupMembers { + + public static void main(String[] args) throws Exception { + syncListUserGroupMembers(); + } + + public static void syncListUserGroupMembers() throws Exception { + // 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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = + MarketingplatformAdminServiceClient.create()) { + ListUserGroupMembersRequest request = + ListUserGroupMembersRequest.newBuilder() + .setParent(UserGroupName.of("[ORGANIZATION]", "[USER_GROUP]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (UserGroupMember element : + marketingplatformAdminServiceClient.listUserGroupMembers(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_ListUserGroupMembers_sync] diff --git a/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/listusergroupmembers/SyncListUserGroupMembersString.java b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/listusergroupmembers/SyncListUserGroupMembersString.java new file mode 100644 index 000000000000..a803254d074e --- /dev/null +++ b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/listusergroupmembers/SyncListUserGroupMembersString.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.marketingplatform.admin.v1alpha.samples; + +// [START marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_ListUserGroupMembers_String_sync] +import com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient; +import com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember; +import com.google.ads.marketingplatform.admin.v1alpha.UserGroupName; + +public class SyncListUserGroupMembersString { + + public static void main(String[] args) throws Exception { + syncListUserGroupMembersString(); + } + + public static void syncListUserGroupMembersString() throws Exception { + // 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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = + MarketingplatformAdminServiceClient.create()) { + String parent = UserGroupName.of("[ORGANIZATION]", "[USER_GROUP]").toString(); + for (UserGroupMember element : + marketingplatformAdminServiceClient.listUserGroupMembers(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_ListUserGroupMembers_String_sync] diff --git a/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/listusergroupmembers/SyncListUserGroupMembersUsergroupname.java b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/listusergroupmembers/SyncListUserGroupMembersUsergroupname.java new file mode 100644 index 000000000000..f1c83ca944e6 --- /dev/null +++ b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/listusergroupmembers/SyncListUserGroupMembersUsergroupname.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.marketingplatform.admin.v1alpha.samples; + +// [START marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_ListUserGroupMembers_Usergroupname_sync] +import com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient; +import com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember; +import com.google.ads.marketingplatform.admin.v1alpha.UserGroupName; + +public class SyncListUserGroupMembersUsergroupname { + + public static void main(String[] args) throws Exception { + syncListUserGroupMembersUsergroupname(); + } + + public static void syncListUserGroupMembersUsergroupname() throws Exception { + // 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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = + MarketingplatformAdminServiceClient.create()) { + UserGroupName parent = UserGroupName.of("[ORGANIZATION]", "[USER_GROUP]"); + for (UserGroupMember element : + marketingplatformAdminServiceClient.listUserGroupMembers(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_ListUserGroupMembers_Usergroupname_sync] diff --git a/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/listusergroups/AsyncListUserGroups.java b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/listusergroups/AsyncListUserGroups.java new file mode 100644 index 000000000000..f20ce0508170 --- /dev/null +++ b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/listusergroups/AsyncListUserGroups.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.marketingplatform.admin.v1alpha.samples; + +// [START marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_ListUserGroups_async] +import com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsRequest; +import com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient; +import com.google.ads.marketingplatform.admin.v1alpha.OrganizationName; +import com.google.ads.marketingplatform.admin.v1alpha.UserGroup; +import com.google.api.core.ApiFuture; + +public class AsyncListUserGroups { + + public static void main(String[] args) throws Exception { + asyncListUserGroups(); + } + + public static void asyncListUserGroups() throws Exception { + // 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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = + MarketingplatformAdminServiceClient.create()) { + ListUserGroupsRequest request = + ListUserGroupsRequest.newBuilder() + .setParent(OrganizationName.of("[ORGANIZATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + marketingplatformAdminServiceClient.listUserGroupsPagedCallable().futureCall(request); + // Do something. + for (UserGroup element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_ListUserGroups_async] diff --git a/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/listusergroups/AsyncListUserGroupsPaged.java b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/listusergroups/AsyncListUserGroupsPaged.java new file mode 100644 index 000000000000..5ba56e8a72e9 --- /dev/null +++ b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/listusergroups/AsyncListUserGroupsPaged.java @@ -0,0 +1,63 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.marketingplatform.admin.v1alpha.samples; + +// [START marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_ListUserGroups_Paged_async] +import com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsRequest; +import com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsResponse; +import com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient; +import com.google.ads.marketingplatform.admin.v1alpha.OrganizationName; +import com.google.ads.marketingplatform.admin.v1alpha.UserGroup; +import com.google.common.base.Strings; + +public class AsyncListUserGroupsPaged { + + public static void main(String[] args) throws Exception { + asyncListUserGroupsPaged(); + } + + public static void asyncListUserGroupsPaged() throws Exception { + // 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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = + MarketingplatformAdminServiceClient.create()) { + ListUserGroupsRequest request = + ListUserGroupsRequest.newBuilder() + .setParent(OrganizationName.of("[ORGANIZATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListUserGroupsResponse response = + marketingplatformAdminServiceClient.listUserGroupsCallable().call(request); + for (UserGroup element : response.getUserGroupsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_ListUserGroups_Paged_async] diff --git a/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/listusergroups/SyncListUserGroups.java b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/listusergroups/SyncListUserGroups.java new file mode 100644 index 000000000000..6a226a765f4c --- /dev/null +++ b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/listusergroups/SyncListUserGroups.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.marketingplatform.admin.v1alpha.samples; + +// [START marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_ListUserGroups_sync] +import com.google.ads.marketingplatform.admin.v1alpha.ListUserGroupsRequest; +import com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient; +import com.google.ads.marketingplatform.admin.v1alpha.OrganizationName; +import com.google.ads.marketingplatform.admin.v1alpha.UserGroup; + +public class SyncListUserGroups { + + public static void main(String[] args) throws Exception { + syncListUserGroups(); + } + + public static void syncListUserGroups() throws Exception { + // 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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = + MarketingplatformAdminServiceClient.create()) { + ListUserGroupsRequest request = + ListUserGroupsRequest.newBuilder() + .setParent(OrganizationName.of("[ORGANIZATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (UserGroup element : + marketingplatformAdminServiceClient.listUserGroups(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_ListUserGroups_sync] diff --git a/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/listusergroups/SyncListUserGroupsOrganizationname.java b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/listusergroups/SyncListUserGroupsOrganizationname.java new file mode 100644 index 000000000000..0aaafda87542 --- /dev/null +++ b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/listusergroups/SyncListUserGroupsOrganizationname.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.marketingplatform.admin.v1alpha.samples; + +// [START marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_ListUserGroups_Organizationname_sync] +import com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient; +import com.google.ads.marketingplatform.admin.v1alpha.OrganizationName; +import com.google.ads.marketingplatform.admin.v1alpha.UserGroup; + +public class SyncListUserGroupsOrganizationname { + + public static void main(String[] args) throws Exception { + syncListUserGroupsOrganizationname(); + } + + public static void syncListUserGroupsOrganizationname() throws Exception { + // 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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = + MarketingplatformAdminServiceClient.create()) { + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + for (UserGroup element : + marketingplatformAdminServiceClient.listUserGroups(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_ListUserGroups_Organizationname_sync] diff --git a/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/listusergroups/SyncListUserGroupsString.java b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/listusergroups/SyncListUserGroupsString.java new file mode 100644 index 000000000000..f2bdefa35567 --- /dev/null +++ b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/listusergroups/SyncListUserGroupsString.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.marketingplatform.admin.v1alpha.samples; + +// [START marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_ListUserGroups_String_sync] +import com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient; +import com.google.ads.marketingplatform.admin.v1alpha.OrganizationName; +import com.google.ads.marketingplatform.admin.v1alpha.UserGroup; + +public class SyncListUserGroupsString { + + public static void main(String[] args) throws Exception { + syncListUserGroupsString(); + } + + public static void syncListUserGroupsString() throws Exception { + // 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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = + MarketingplatformAdminServiceClient.create()) { + String parent = OrganizationName.of("[ORGANIZATION]").toString(); + for (UserGroup element : + marketingplatformAdminServiceClient.listUserGroups(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_ListUserGroups_String_sync] diff --git a/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/updateadminaccessbinding/AsyncUpdateAdminAccessBinding.java b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/updateadminaccessbinding/AsyncUpdateAdminAccessBinding.java new file mode 100644 index 000000000000..41e7dad3841d --- /dev/null +++ b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/updateadminaccessbinding/AsyncUpdateAdminAccessBinding.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.marketingplatform.admin.v1alpha.samples; + +// [START marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_UpdateAdminAccessBinding_async] +import com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding; +import com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient; +import com.google.ads.marketingplatform.admin.v1alpha.UpdateAdminAccessBindingRequest; +import com.google.api.core.ApiFuture; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateAdminAccessBinding { + + public static void main(String[] args) throws Exception { + asyncUpdateAdminAccessBinding(); + } + + public static void asyncUpdateAdminAccessBinding() throws Exception { + // 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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = + MarketingplatformAdminServiceClient.create()) { + UpdateAdminAccessBindingRequest request = + UpdateAdminAccessBindingRequest.newBuilder() + .setAdminAccessBinding(AdminAccessBinding.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = + marketingplatformAdminServiceClient + .updateAdminAccessBindingCallable() + .futureCall(request); + // Do something. + AdminAccessBinding response = future.get(); + } + } +} +// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_UpdateAdminAccessBinding_async] diff --git a/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/updateadminaccessbinding/SyncUpdateAdminAccessBinding.java b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/updateadminaccessbinding/SyncUpdateAdminAccessBinding.java new file mode 100644 index 000000000000..06e67093d5f1 --- /dev/null +++ b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/updateadminaccessbinding/SyncUpdateAdminAccessBinding.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.marketingplatform.admin.v1alpha.samples; + +// [START marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_UpdateAdminAccessBinding_sync] +import com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding; +import com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient; +import com.google.ads.marketingplatform.admin.v1alpha.UpdateAdminAccessBindingRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateAdminAccessBinding { + + public static void main(String[] args) throws Exception { + syncUpdateAdminAccessBinding(); + } + + public static void syncUpdateAdminAccessBinding() throws Exception { + // 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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = + MarketingplatformAdminServiceClient.create()) { + UpdateAdminAccessBindingRequest request = + UpdateAdminAccessBindingRequest.newBuilder() + .setAdminAccessBinding(AdminAccessBinding.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + AdminAccessBinding response = + marketingplatformAdminServiceClient.updateAdminAccessBinding(request); + } + } +} +// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_UpdateAdminAccessBinding_sync] diff --git a/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/updateadminaccessbinding/SyncUpdateAdminAccessBindingAdminaccessbindingFieldmask.java b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/updateadminaccessbinding/SyncUpdateAdminAccessBindingAdminaccessbindingFieldmask.java new file mode 100644 index 000000000000..6865f48250de --- /dev/null +++ b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/updateadminaccessbinding/SyncUpdateAdminAccessBindingAdminaccessbindingFieldmask.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.marketingplatform.admin.v1alpha.samples; + +// [START marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_UpdateAdminAccessBinding_AdminaccessbindingFieldmask_sync] +import com.google.ads.marketingplatform.admin.v1alpha.AdminAccessBinding; +import com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient; +import com.google.protobuf.FieldMask; + +public class SyncUpdateAdminAccessBindingAdminaccessbindingFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateAdminAccessBindingAdminaccessbindingFieldmask(); + } + + public static void syncUpdateAdminAccessBindingAdminaccessbindingFieldmask() throws Exception { + // 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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = + MarketingplatformAdminServiceClient.create()) { + AdminAccessBinding adminAccessBinding = AdminAccessBinding.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + AdminAccessBinding response = + marketingplatformAdminServiceClient.updateAdminAccessBinding( + adminAccessBinding, updateMask); + } + } +} +// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_UpdateAdminAccessBinding_AdminaccessbindingFieldmask_sync] diff --git a/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/updateusergroup/AsyncUpdateUserGroup.java b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/updateusergroup/AsyncUpdateUserGroup.java new file mode 100644 index 000000000000..9a7b25cb1c91 --- /dev/null +++ b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/updateusergroup/AsyncUpdateUserGroup.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.marketingplatform.admin.v1alpha.samples; + +// [START marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_UpdateUserGroup_async] +import com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient; +import com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupRequest; +import com.google.ads.marketingplatform.admin.v1alpha.UserGroup; +import com.google.api.core.ApiFuture; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateUserGroup { + + public static void main(String[] args) throws Exception { + asyncUpdateUserGroup(); + } + + public static void asyncUpdateUserGroup() throws Exception { + // 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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = + MarketingplatformAdminServiceClient.create()) { + UpdateUserGroupRequest request = + UpdateUserGroupRequest.newBuilder() + .setUserGroup(UserGroup.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = + marketingplatformAdminServiceClient.updateUserGroupCallable().futureCall(request); + // Do something. + UserGroup response = future.get(); + } + } +} +// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_UpdateUserGroup_async] diff --git a/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/updateusergroup/SyncUpdateUserGroup.java b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/updateusergroup/SyncUpdateUserGroup.java new file mode 100644 index 000000000000..d386ebb86b86 --- /dev/null +++ b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/updateusergroup/SyncUpdateUserGroup.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.marketingplatform.admin.v1alpha.samples; + +// [START marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_UpdateUserGroup_sync] +import com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient; +import com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupRequest; +import com.google.ads.marketingplatform.admin.v1alpha.UserGroup; +import com.google.protobuf.FieldMask; + +public class SyncUpdateUserGroup { + + public static void main(String[] args) throws Exception { + syncUpdateUserGroup(); + } + + public static void syncUpdateUserGroup() throws Exception { + // 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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = + MarketingplatformAdminServiceClient.create()) { + UpdateUserGroupRequest request = + UpdateUserGroupRequest.newBuilder() + .setUserGroup(UserGroup.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + UserGroup response = marketingplatformAdminServiceClient.updateUserGroup(request); + } + } +} +// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_UpdateUserGroup_sync] diff --git a/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/updateusergroup/SyncUpdateUserGroupUsergroupFieldmask.java b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/updateusergroup/SyncUpdateUserGroupUsergroupFieldmask.java new file mode 100644 index 000000000000..54caa0799d20 --- /dev/null +++ b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/updateusergroup/SyncUpdateUserGroupUsergroupFieldmask.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.marketingplatform.admin.v1alpha.samples; + +// [START marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_UpdateUserGroup_UsergroupFieldmask_sync] +import com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient; +import com.google.ads.marketingplatform.admin.v1alpha.UserGroup; +import com.google.protobuf.FieldMask; + +public class SyncUpdateUserGroupUsergroupFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateUserGroupUsergroupFieldmask(); + } + + public static void syncUpdateUserGroupUsergroupFieldmask() throws Exception { + // 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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = + MarketingplatformAdminServiceClient.create()) { + UserGroup userGroup = UserGroup.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + UserGroup response = + marketingplatformAdminServiceClient.updateUserGroup(userGroup, updateMask); + } + } +} +// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_UpdateUserGroup_UsergroupFieldmask_sync] diff --git a/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/updateusergroupmember/AsyncUpdateUserGroupMember.java b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/updateusergroupmember/AsyncUpdateUserGroupMember.java new file mode 100644 index 000000000000..4d9e1f4072cb --- /dev/null +++ b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/updateusergroupmember/AsyncUpdateUserGroupMember.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.marketingplatform.admin.v1alpha.samples; + +// [START marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_UpdateUserGroupMember_async] +import com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient; +import com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupMemberRequest; +import com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember; +import com.google.api.core.ApiFuture; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateUserGroupMember { + + public static void main(String[] args) throws Exception { + asyncUpdateUserGroupMember(); + } + + public static void asyncUpdateUserGroupMember() throws Exception { + // 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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = + MarketingplatformAdminServiceClient.create()) { + UpdateUserGroupMemberRequest request = + UpdateUserGroupMemberRequest.newBuilder() + .setUserGroupMember(UserGroupMember.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = + marketingplatformAdminServiceClient.updateUserGroupMemberCallable().futureCall(request); + // Do something. + UserGroupMember response = future.get(); + } + } +} +// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_UpdateUserGroupMember_async] diff --git a/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/updateusergroupmember/SyncUpdateUserGroupMember.java b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/updateusergroupmember/SyncUpdateUserGroupMember.java new file mode 100644 index 000000000000..aa07123ad028 --- /dev/null +++ b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/updateusergroupmember/SyncUpdateUserGroupMember.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.marketingplatform.admin.v1alpha.samples; + +// [START marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_UpdateUserGroupMember_sync] +import com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient; +import com.google.ads.marketingplatform.admin.v1alpha.UpdateUserGroupMemberRequest; +import com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember; +import com.google.protobuf.FieldMask; + +public class SyncUpdateUserGroupMember { + + public static void main(String[] args) throws Exception { + syncUpdateUserGroupMember(); + } + + public static void syncUpdateUserGroupMember() throws Exception { + // 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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = + MarketingplatformAdminServiceClient.create()) { + UpdateUserGroupMemberRequest request = + UpdateUserGroupMemberRequest.newBuilder() + .setUserGroupMember(UserGroupMember.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + UserGroupMember response = marketingplatformAdminServiceClient.updateUserGroupMember(request); + } + } +} +// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_UpdateUserGroupMember_sync] diff --git a/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/updateusergroupmember/SyncUpdateUserGroupMemberUsergroupmemberFieldmask.java b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/updateusergroupmember/SyncUpdateUserGroupMemberUsergroupmemberFieldmask.java new file mode 100644 index 000000000000..1a2bdace1740 --- /dev/null +++ b/java-marketingplatformadminapi/samples/snippets/generated/com/google/ads/marketingplatform/admin/v1alpha/marketingplatformadminservice/updateusergroupmember/SyncUpdateUserGroupMemberUsergroupmemberFieldmask.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.marketingplatform.admin.v1alpha.samples; + +// [START marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_UpdateUserGroupMember_UsergroupmemberFieldmask_sync] +import com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient; +import com.google.ads.marketingplatform.admin.v1alpha.UserGroupMember; +import com.google.protobuf.FieldMask; + +public class SyncUpdateUserGroupMemberUsergroupmemberFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateUserGroupMemberUsergroupmemberFieldmask(); + } + + public static void syncUpdateUserGroupMemberUsergroupmemberFieldmask() throws Exception { + // 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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = + MarketingplatformAdminServiceClient.create()) { + UserGroupMember userGroupMember = UserGroupMember.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + UserGroupMember response = + marketingplatformAdminServiceClient.updateUserGroupMember(userGroupMember, updateMask); + } + } +} +// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_UpdateUserGroupMember_UsergroupmemberFieldmask_sync] diff --git a/java-parametermanager/google-cloud-parametermanager/src/main/java/com/google/cloud/parametermanager/v1/ParameterManagerClient.java b/java-parametermanager/google-cloud-parametermanager/src/main/java/com/google/cloud/parametermanager/v1/ParameterManagerClient.java index 04710d36071b..e2c6e555a551 100644 --- a/java-parametermanager/google-cloud-parametermanager/src/main/java/com/google/cloud/parametermanager/v1/ParameterManagerClient.java +++ b/java-parametermanager/google-cloud-parametermanager/src/main/java/com/google/cloud/parametermanager/v1/ParameterManagerClient.java @@ -280,8 +280,219 @@ * * * + *

ListTemplates + *

Lists Templates in a given project and location. + * + *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listTemplates(ListTemplatesRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listTemplates(LocationName parent) + *

  • listTemplates(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listTemplatesPagedCallable() + *

  • listTemplatesCallable() + *

+ * + * + * + *

GetTemplate + *

Gets details of a single Template. + * + *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getTemplate(GetTemplateRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getTemplate(TemplateName name) + *

  • getTemplate(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getTemplateCallable() + *

+ * + * + * + *

CreateTemplate + *

Creates a new Template in a given project and location. + * + *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createTemplate(CreateTemplateRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • createTemplate(LocationName parent, Template template, String templateId) + *

  • createTemplate(String parent, Template template, String templateId) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createTemplateCallable() + *

+ * + * + * + *

UpdateTemplate + *

Updates a single Template. + * + *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateTemplate(UpdateTemplateRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updateTemplate(Template template, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateTemplateCallable() + *

+ * + * + * + *

DeleteTemplate + *

Deletes a single Template. + * + *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteTemplate(DeleteTemplateRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • deleteTemplate(TemplateName name) + *

  • deleteTemplate(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteTemplateCallable() + *

+ * + * + * + *

ListTemplateVersions + *

Lists TemplateVersions in a given project, location, and template. + * + *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listTemplateVersions(ListTemplateVersionsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listTemplateVersions(TemplateName parent) + *

  • listTemplateVersions(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listTemplateVersionsPagedCallable() + *

  • listTemplateVersionsCallable() + *

+ * + * + * + *

GetTemplateVersion + *

Gets details of a single TemplateVersion. + * + *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getTemplateVersion(GetTemplateVersionRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getTemplateVersion(TemplateVersionName name) + *

  • getTemplateVersion(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getTemplateVersionCallable() + *

+ * + * + * + *

CreateTemplateVersion + *

Creates a new TemplateVersion in a given project, location, and template. + * + *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createTemplateVersion(CreateTemplateVersionRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • createTemplateVersion(TemplateName parent, TemplateVersion templateVersion, String templateVersionId) + *

  • createTemplateVersion(String parent, TemplateVersion templateVersion, String templateVersionId) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createTemplateVersionCallable() + *

+ * + * + * + *

UpdateTemplateVersion + *

Updates a single TemplateVersion. + * + *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateTemplateVersion(UpdateTemplateVersionRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updateTemplateVersion(TemplateVersion templateVersion, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateTemplateVersionCallable() + *

+ * + * + * + *

DeleteTemplateVersion + *

Deletes a single TemplateVersion. + * + *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteTemplateVersion(DeleteTemplateVersionRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • deleteTemplateVersion(TemplateVersionName name) + *

  • deleteTemplateVersion(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteTemplateVersionCallable() + *

+ * + * + * + *

RenderTemplateVersion + *

Gets rendered version of a TemplateVersion. + * + *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • renderTemplateVersion(RenderTemplateVersionRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • renderTemplateVersion(TemplateVersionName name) + *

  • renderTemplateVersion(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • renderTemplateVersionCallable() + *

+ * + * + * *

ListLocations - *

Lists information about the supported locations for this service. + *

Lists information about the supported locations for this service. + *

This method lists locations based on the resource scope provided inthe [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field: ***Global locations**: If `name` is empty, the method lists thepublic locations available to all projects. * **Project-specificlocations**: If `name` follows the format`projects/{project}`, the method lists locations visible to thatspecific project. This includes public, private, or otherproject-specific locations enabled for the project. + *

For gRPC and client library implementations, the resource name ispassed as the `name` field. For direct service calls, the resourcename isincorporated into the request path based on the specific serviceimplementation and version. * *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    @@ -1841,7 +2052,7 @@ public final void deleteParameterVersion(DeleteParameterVersionRequest request) // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists information about the supported locations for this service. + * Lists Templates in a given project and location. * *

    Sample code: * @@ -1852,14 +2063,76 @@ public final void deleteParameterVersion(DeleteParameterVersionRequest request) * // - 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 (ParameterManagerClient parameterManagerClient = ParameterManagerClient.create()) { - * ListLocationsRequest request = - * ListLocationsRequest.newBuilder() - * .setName("name3373707") - * .setFilter("filter-1274492040") + * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + * for (Template element : parameterManagerClient.listTemplates(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }

+ * + * @param parent Required. Parent value for ListTemplatesRequest in the format + * `projects/*/locations/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListTemplatesPagedResponse listTemplates(@Nullable LocationName parent) { + ListTemplatesRequest request = + ListTemplatesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listTemplates(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Templates in a given project and location. + * + *

Sample code: + * + *

{@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 (ParameterManagerClient parameterManagerClient = ParameterManagerClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (Template element : parameterManagerClient.listTemplates(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListTemplatesRequest in the format + * `projects/*/locations/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListTemplatesPagedResponse listTemplates(String parent) { + ListTemplatesRequest request = ListTemplatesRequest.newBuilder().setParent(parent).build(); + return listTemplates(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Templates in a given project and location. + * + *

Sample code: + * + *

{@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 (ParameterManagerClient parameterManagerClient = ParameterManagerClient.create()) {
+   *   ListTemplatesRequest request =
+   *       ListTemplatesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
    *           .setPageSize(883849137)
    *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
    *           .build();
-   *   for (Location element : parameterManagerClient.listLocations(request).iterateAll()) {
+   *   for (Template element : parameterManagerClient.listTemplates(request).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
@@ -1868,13 +2141,13 @@ public final void deleteParameterVersion(DeleteParameterVersionRequest request)
    * @param 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
    */
-  public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) {
-    return listLocationsPagedCallable().call(request);
+  public final ListTemplatesPagedResponse listTemplates(ListTemplatesRequest request) {
+    return listTemplatesPagedCallable().call(request);
   }
 
   // AUTO-GENERATED DOCUMENTATION AND METHOD.
   /**
-   * Lists information about the supported locations for this service.
+   * Lists Templates in a given project and location.
    *
    * 

Sample code: * @@ -1885,30 +2158,31 @@ public final ListLocationsPagedResponse listLocations(ListLocationsRequest reque * // - 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 (ParameterManagerClient parameterManagerClient = ParameterManagerClient.create()) { - * ListLocationsRequest request = - * ListLocationsRequest.newBuilder() - * .setName("name3373707") - * .setFilter("filter-1274492040") + * ListTemplatesRequest request = + * ListTemplatesRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) * .setPageSize(883849137) * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .setOrderBy("orderBy-1207110587") * .build(); - * ApiFuture future = - * parameterManagerClient.listLocationsPagedCallable().futureCall(request); + * ApiFuture