diff --git a/java-analytics-data/README.md b/java-analytics-data/README.md index f7fa28166182..22cafbb3652f 100644 --- a/java-analytics-data/README.md +++ b/java-analytics-data/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.26.0 + 26.27.0 pom import 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 462e70e13883..44d9fe2179eb 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 @@ -1259,6 +1259,548 @@ public final ListAudienceListsPagedResponse listAudienceLists(ListAudienceListsR return stub.listAudienceListsCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a recurring audience list. Recurring audience lists produces new audience lists each + * day. Audience lists are users in an audience at the time of the list's creation. + * + *

A recurring audience list ensures that you have audience list based on the most recent data + * available for use each day. If you manually create audience list, you don't know when an + * audience list based on an additional day's data is available. This recurring audience list + * automates the creation of an audience list when an additional day's data is available. You will + * consume fewer quota tokens by using recurring audience list versus manually creating audience + * list at various times of day trying to guess when an additional day's data is ready. + * + *

This method is introduced at alpha stability with the intention of gathering feedback on + * syntax and capabilities before entering beta. To give your feedback on this API, complete the + * [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + * + *

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()) {
+   *   PropertyName parent = PropertyName.of("[PROPERTY]");
+   *   RecurringAudienceList recurringAudienceList = RecurringAudienceList.newBuilder().build();
+   *   RecurringAudienceList response =
+   *       alphaAnalyticsDataClient.createRecurringAudienceList(parent, recurringAudienceList);
+   * }
+   * }
+ * + * @param parent Required. The parent resource where this recurring audience list will be created. + * Format: `properties/{property}` + * @param recurringAudienceList Required. The recurring audience list to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final RecurringAudienceList createRecurringAudienceList( + PropertyName parent, RecurringAudienceList recurringAudienceList) { + CreateRecurringAudienceListRequest request = + CreateRecurringAudienceListRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setRecurringAudienceList(recurringAudienceList) + .build(); + return createRecurringAudienceList(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a recurring audience list. Recurring audience lists produces new audience lists each + * day. Audience lists are users in an audience at the time of the list's creation. + * + *

A recurring audience list ensures that you have audience list based on the most recent data + * available for use each day. If you manually create audience list, you don't know when an + * audience list based on an additional day's data is available. This recurring audience list + * automates the creation of an audience list when an additional day's data is available. You will + * consume fewer quota tokens by using recurring audience list versus manually creating audience + * list at various times of day trying to guess when an additional day's data is ready. + * + *

This method is introduced at alpha stability with the intention of gathering feedback on + * syntax and capabilities before entering beta. To give your feedback on this API, complete the + * [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + * + *

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()) {
+   *   String parent = PropertyName.of("[PROPERTY]").toString();
+   *   RecurringAudienceList recurringAudienceList = RecurringAudienceList.newBuilder().build();
+   *   RecurringAudienceList response =
+   *       alphaAnalyticsDataClient.createRecurringAudienceList(parent, recurringAudienceList);
+   * }
+   * }
+ * + * @param parent Required. The parent resource where this recurring audience list will be created. + * Format: `properties/{property}` + * @param recurringAudienceList Required. The recurring audience list to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final RecurringAudienceList createRecurringAudienceList( + String parent, RecurringAudienceList recurringAudienceList) { + CreateRecurringAudienceListRequest request = + CreateRecurringAudienceListRequest.newBuilder() + .setParent(parent) + .setRecurringAudienceList(recurringAudienceList) + .build(); + return createRecurringAudienceList(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a recurring audience list. Recurring audience lists produces new audience lists each + * day. Audience lists are users in an audience at the time of the list's creation. + * + *

A recurring audience list ensures that you have audience list based on the most recent data + * available for use each day. If you manually create audience list, you don't know when an + * audience list based on an additional day's data is available. This recurring audience list + * automates the creation of an audience list when an additional day's data is available. You will + * consume fewer quota tokens by using recurring audience list versus manually creating audience + * list at various times of day trying to guess when an additional day's data is ready. + * + *

This method is introduced at alpha stability with the intention of gathering feedback on + * syntax and capabilities before entering beta. To give your feedback on this API, complete the + * [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + * + *

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()) {
+   *   CreateRecurringAudienceListRequest request =
+   *       CreateRecurringAudienceListRequest.newBuilder()
+   *           .setParent(PropertyName.of("[PROPERTY]").toString())
+   *           .setRecurringAudienceList(RecurringAudienceList.newBuilder().build())
+   *           .build();
+   *   RecurringAudienceList response =
+   *       alphaAnalyticsDataClient.createRecurringAudienceList(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 RecurringAudienceList createRecurringAudienceList( + CreateRecurringAudienceListRequest request) { + return createRecurringAudienceListCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a recurring audience list. Recurring audience lists produces new audience lists each + * day. Audience lists are users in an audience at the time of the list's creation. + * + *

A recurring audience list ensures that you have audience list based on the most recent data + * available for use each day. If you manually create audience list, you don't know when an + * audience list based on an additional day's data is available. This recurring audience list + * automates the creation of an audience list when an additional day's data is available. You will + * consume fewer quota tokens by using recurring audience list versus manually creating audience + * list at various times of day trying to guess when an additional day's data is ready. + * + *

This method is introduced at alpha stability with the intention of gathering feedback on + * syntax and capabilities before entering beta. To give your feedback on this API, complete the + * [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + * + *

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()) {
+   *   CreateRecurringAudienceListRequest request =
+   *       CreateRecurringAudienceListRequest.newBuilder()
+   *           .setParent(PropertyName.of("[PROPERTY]").toString())
+   *           .setRecurringAudienceList(RecurringAudienceList.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       alphaAnalyticsDataClient.createRecurringAudienceListCallable().futureCall(request);
+   *   // Do something.
+   *   RecurringAudienceList response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + createRecurringAudienceListCallable() { + return stub.createRecurringAudienceListCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets configuration metadata about a specific recurring audience list. This method can be used + * to understand a recurring audience list's state after it has been created. For example, a + * recurring audience list resource will generate audience list instances for each day, and this + * method can be used to get the resource name of the most recent audience list instance. + * + *

This method is introduced at alpha stability with the intention of gathering feedback on + * syntax and capabilities before entering beta. To give your feedback on this API, complete the + * [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + * + *

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()) {
+   *   RecurringAudienceListName name =
+   *       RecurringAudienceListName.of("[PROPERTY]", "[RECURRING_AUDIENCE_LIST]");
+   *   RecurringAudienceList response = alphaAnalyticsDataClient.getRecurringAudienceList(name);
+   * }
+   * }
+ * + * @param name Required. The recurring audience list resource name. Format: + * `properties/{property}/recurringAudienceLists/{recurring_audience_list}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final RecurringAudienceList getRecurringAudienceList(RecurringAudienceListName name) { + GetRecurringAudienceListRequest request = + GetRecurringAudienceListRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getRecurringAudienceList(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets configuration metadata about a specific recurring audience list. This method can be used + * to understand a recurring audience list's state after it has been created. For example, a + * recurring audience list resource will generate audience list instances for each day, and this + * method can be used to get the resource name of the most recent audience list instance. + * + *

This method is introduced at alpha stability with the intention of gathering feedback on + * syntax and capabilities before entering beta. To give your feedback on this API, complete the + * [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + * + *

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()) {
+   *   String name =
+   *       RecurringAudienceListName.of("[PROPERTY]", "[RECURRING_AUDIENCE_LIST]").toString();
+   *   RecurringAudienceList response = alphaAnalyticsDataClient.getRecurringAudienceList(name);
+   * }
+   * }
+ * + * @param name Required. The recurring audience list resource name. Format: + * `properties/{property}/recurringAudienceLists/{recurring_audience_list}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final RecurringAudienceList getRecurringAudienceList(String name) { + GetRecurringAudienceListRequest request = + GetRecurringAudienceListRequest.newBuilder().setName(name).build(); + return getRecurringAudienceList(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets configuration metadata about a specific recurring audience list. This method can be used + * to understand a recurring audience list's state after it has been created. For example, a + * recurring audience list resource will generate audience list instances for each day, and this + * method can be used to get the resource name of the most recent audience list instance. + * + *

This method is introduced at alpha stability with the intention of gathering feedback on + * syntax and capabilities before entering beta. To give your feedback on this API, complete the + * [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + * + *

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()) {
+   *   GetRecurringAudienceListRequest request =
+   *       GetRecurringAudienceListRequest.newBuilder()
+   *           .setName(
+   *               RecurringAudienceListName.of("[PROPERTY]", "[RECURRING_AUDIENCE_LIST]")
+   *                   .toString())
+   *           .build();
+   *   RecurringAudienceList response = alphaAnalyticsDataClient.getRecurringAudienceList(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 RecurringAudienceList getRecurringAudienceList( + GetRecurringAudienceListRequest request) { + return getRecurringAudienceListCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets configuration metadata about a specific recurring audience list. This method can be used + * to understand a recurring audience list's state after it has been created. For example, a + * recurring audience list resource will generate audience list instances for each day, and this + * method can be used to get the resource name of the most recent audience list instance. + * + *

This method is introduced at alpha stability with the intention of gathering feedback on + * syntax and capabilities before entering beta. To give your feedback on this API, complete the + * [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + * + *

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()) {
+   *   GetRecurringAudienceListRequest request =
+   *       GetRecurringAudienceListRequest.newBuilder()
+   *           .setName(
+   *               RecurringAudienceListName.of("[PROPERTY]", "[RECURRING_AUDIENCE_LIST]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       alphaAnalyticsDataClient.getRecurringAudienceListCallable().futureCall(request);
+   *   // Do something.
+   *   RecurringAudienceList response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getRecurringAudienceListCallable() { + return stub.getRecurringAudienceListCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all recurring audience lists for a property. This method can be used for you to find and + * reuse existing recurring audience lists rather than creating unnecessary new recurring audience + * lists. The same audience can have multiple recurring audience lists that represent different + * dimension combinations; for example, just the dimension `deviceId` or both the dimensions + * `deviceId` and `userId`. + * + *

This method is introduced at alpha stability with the intention of gathering feedback on + * syntax and capabilities before entering beta. To give your feedback on this API, complete the + * [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + * + *

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()) {
+   *   PropertyName parent = PropertyName.of("[PROPERTY]");
+   *   for (RecurringAudienceList element :
+   *       alphaAnalyticsDataClient.listRecurringAudienceLists(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. All recurring audience lists for this property will be listed in the + * response. Format: `properties/{property}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListRecurringAudienceListsPagedResponse listRecurringAudienceLists( + PropertyName parent) { + ListRecurringAudienceListsRequest request = + ListRecurringAudienceListsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listRecurringAudienceLists(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all recurring audience lists for a property. This method can be used for you to find and + * reuse existing recurring audience lists rather than creating unnecessary new recurring audience + * lists. The same audience can have multiple recurring audience lists that represent different + * dimension combinations; for example, just the dimension `deviceId` or both the dimensions + * `deviceId` and `userId`. + * + *

This method is introduced at alpha stability with the intention of gathering feedback on + * syntax and capabilities before entering beta. To give your feedback on this API, complete the + * [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + * + *

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()) {
+   *   String parent = PropertyName.of("[PROPERTY]").toString();
+   *   for (RecurringAudienceList element :
+   *       alphaAnalyticsDataClient.listRecurringAudienceLists(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. All recurring audience lists for this property will be listed in the + * response. Format: `properties/{property}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListRecurringAudienceListsPagedResponse listRecurringAudienceLists(String parent) { + ListRecurringAudienceListsRequest request = + ListRecurringAudienceListsRequest.newBuilder().setParent(parent).build(); + return listRecurringAudienceLists(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all recurring audience lists for a property. This method can be used for you to find and + * reuse existing recurring audience lists rather than creating unnecessary new recurring audience + * lists. The same audience can have multiple recurring audience lists that represent different + * dimension combinations; for example, just the dimension `deviceId` or both the dimensions + * `deviceId` and `userId`. + * + *

This method is introduced at alpha stability with the intention of gathering feedback on + * syntax and capabilities before entering beta. To give your feedback on this API, complete the + * [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + * + *

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()) {
+   *   ListRecurringAudienceListsRequest request =
+   *       ListRecurringAudienceListsRequest.newBuilder()
+   *           .setParent(PropertyName.of("[PROPERTY]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (RecurringAudienceList element :
+   *       alphaAnalyticsDataClient.listRecurringAudienceLists(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 ListRecurringAudienceListsPagedResponse listRecurringAudienceLists( + ListRecurringAudienceListsRequest request) { + return listRecurringAudienceListsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all recurring audience lists for a property. This method can be used for you to find and + * reuse existing recurring audience lists rather than creating unnecessary new recurring audience + * lists. The same audience can have multiple recurring audience lists that represent different + * dimension combinations; for example, just the dimension `deviceId` or both the dimensions + * `deviceId` and `userId`. + * + *

This method is introduced at alpha stability with the intention of gathering feedback on + * syntax and capabilities before entering beta. To give your feedback on this API, complete the + * [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + * + *

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()) {
+   *   ListRecurringAudienceListsRequest request =
+   *       ListRecurringAudienceListsRequest.newBuilder()
+   *           .setParent(PropertyName.of("[PROPERTY]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       alphaAnalyticsDataClient.listRecurringAudienceListsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (RecurringAudienceList element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + ListRecurringAudienceListsRequest, ListRecurringAudienceListsPagedResponse> + listRecurringAudienceListsPagedCallable() { + return stub.listRecurringAudienceListsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all recurring audience lists for a property. This method can be used for you to find and + * reuse existing recurring audience lists rather than creating unnecessary new recurring audience + * lists. The same audience can have multiple recurring audience lists that represent different + * dimension combinations; for example, just the dimension `deviceId` or both the dimensions + * `deviceId` and `userId`. + * + *

This method is introduced at alpha stability with the intention of gathering feedback on + * syntax and capabilities before entering beta. To give your feedback on this API, complete the + * [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + * + *

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()) {
+   *   ListRecurringAudienceListsRequest request =
+   *       ListRecurringAudienceListsRequest.newBuilder()
+   *           .setParent(PropertyName.of("[PROPERTY]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListRecurringAudienceListsResponse response =
+   *         alphaAnalyticsDataClient.listRecurringAudienceListsCallable().call(request);
+   *     for (RecurringAudienceList element : response.getRecurringAudienceListsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listRecurringAudienceListsCallable() { + return stub.listRecurringAudienceListsCallable(); + } + @Override public final void close() { stub.close(); @@ -1368,4 +1910,100 @@ protected ListAudienceListsFixedSizeCollection createCollection( return new ListAudienceListsFixedSizeCollection(pages, collectionSize); } } + + public static class ListRecurringAudienceListsPagedResponse + extends AbstractPagedListResponse< + ListRecurringAudienceListsRequest, + ListRecurringAudienceListsResponse, + RecurringAudienceList, + ListRecurringAudienceListsPage, + ListRecurringAudienceListsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + ListRecurringAudienceListsRequest, + ListRecurringAudienceListsResponse, + RecurringAudienceList> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListRecurringAudienceListsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListRecurringAudienceListsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListRecurringAudienceListsPagedResponse(ListRecurringAudienceListsPage page) { + super(page, ListRecurringAudienceListsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListRecurringAudienceListsPage + extends AbstractPage< + ListRecurringAudienceListsRequest, + ListRecurringAudienceListsResponse, + RecurringAudienceList, + ListRecurringAudienceListsPage> { + + private ListRecurringAudienceListsPage( + PageContext< + ListRecurringAudienceListsRequest, + ListRecurringAudienceListsResponse, + RecurringAudienceList> + context, + ListRecurringAudienceListsResponse response) { + super(context, response); + } + + private static ListRecurringAudienceListsPage createEmptyPage() { + return new ListRecurringAudienceListsPage(null, null); + } + + @Override + protected ListRecurringAudienceListsPage createPage( + PageContext< + ListRecurringAudienceListsRequest, + ListRecurringAudienceListsResponse, + RecurringAudienceList> + context, + ListRecurringAudienceListsResponse response) { + return new ListRecurringAudienceListsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + ListRecurringAudienceListsRequest, + ListRecurringAudienceListsResponse, + RecurringAudienceList> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListRecurringAudienceListsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListRecurringAudienceListsRequest, + ListRecurringAudienceListsResponse, + RecurringAudienceList, + ListRecurringAudienceListsPage, + ListRecurringAudienceListsFixedSizeCollection> { + + private ListRecurringAudienceListsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListRecurringAudienceListsFixedSizeCollection createEmptyCollection() { + return new ListRecurringAudienceListsFixedSizeCollection(null, 0); + } + + @Override + protected ListRecurringAudienceListsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListRecurringAudienceListsFixedSizeCollection(pages, collectionSize); + } + } } 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 dbab0fd954fa..7dc347be5c43 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 @@ -17,6 +17,7 @@ package com.google.analytics.data.v1alpha; import static com.google.analytics.data.v1alpha.AlphaAnalyticsDataClient.ListAudienceListsPagedResponse; +import static com.google.analytics.data.v1alpha.AlphaAnalyticsDataClient.ListRecurringAudienceListsPagedResponse; import com.google.analytics.data.v1alpha.stub.AlphaAnalyticsDataStubSettings; import com.google.api.core.ApiFunction; @@ -121,6 +122,29 @@ public UnaryCallSettings getAudienceListSe return ((AlphaAnalyticsDataStubSettings) getStubSettings()).listAudienceListsSettings(); } + /** Returns the object with the settings used for calls to createRecurringAudienceList. */ + public UnaryCallSettings + createRecurringAudienceListSettings() { + return ((AlphaAnalyticsDataStubSettings) getStubSettings()) + .createRecurringAudienceListSettings(); + } + + /** Returns the object with the settings used for calls to getRecurringAudienceList. */ + public UnaryCallSettings + getRecurringAudienceListSettings() { + return ((AlphaAnalyticsDataStubSettings) getStubSettings()).getRecurringAudienceListSettings(); + } + + /** Returns the object with the settings used for calls to listRecurringAudienceLists. */ + public PagedCallSettings< + ListRecurringAudienceListsRequest, + ListRecurringAudienceListsResponse, + ListRecurringAudienceListsPagedResponse> + listRecurringAudienceListsSettings() { + return ((AlphaAnalyticsDataStubSettings) getStubSettings()) + .listRecurringAudienceListsSettings(); + } + public static final AlphaAnalyticsDataSettings create(AlphaAnalyticsDataStubSettings stub) throws IOException { return new AlphaAnalyticsDataSettings.Builder(stub.toBuilder()).build(); @@ -281,6 +305,27 @@ public Builder applyToAllUnaryMethods( return getStubSettingsBuilder().listAudienceListsSettings(); } + /** Returns the builder for the settings used for calls to createRecurringAudienceList. */ + public UnaryCallSettings.Builder + createRecurringAudienceListSettings() { + return getStubSettingsBuilder().createRecurringAudienceListSettings(); + } + + /** Returns the builder for the settings used for calls to getRecurringAudienceList. */ + public UnaryCallSettings.Builder + getRecurringAudienceListSettings() { + return getStubSettingsBuilder().getRecurringAudienceListSettings(); + } + + /** Returns the builder for the settings used for calls to listRecurringAudienceLists. */ + public PagedCallSettings.Builder< + ListRecurringAudienceListsRequest, + ListRecurringAudienceListsResponse, + ListRecurringAudienceListsPagedResponse> + listRecurringAudienceListsSettings() { + return getStubSettingsBuilder().listRecurringAudienceListsSettings(); + } + @Override public AlphaAnalyticsDataSettings build() throws IOException { return new AlphaAnalyticsDataSettings(this); 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 9e7d0380c47d..a14cd99e5aa1 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 @@ -13,12 +13,21 @@ "CreateAudienceList": { "methods": ["createAudienceListAsync", "createAudienceListAsync", "createAudienceListAsync", "createAudienceListOperationCallable", "createAudienceListCallable"] }, + "CreateRecurringAudienceList": { + "methods": ["createRecurringAudienceList", "createRecurringAudienceList", "createRecurringAudienceList", "createRecurringAudienceListCallable"] + }, "GetAudienceList": { "methods": ["getAudienceList", "getAudienceList", "getAudienceList", "getAudienceListCallable"] }, + "GetRecurringAudienceList": { + "methods": ["getRecurringAudienceList", "getRecurringAudienceList", "getRecurringAudienceList", "getRecurringAudienceListCallable"] + }, "ListAudienceLists": { "methods": ["listAudienceLists", "listAudienceLists", "listAudienceLists", "listAudienceListsPagedCallable", "listAudienceListsCallable"] }, + "ListRecurringAudienceLists": { + "methods": ["listRecurringAudienceLists", "listRecurringAudienceLists", "listRecurringAudienceLists", "listRecurringAudienceListsPagedCallable", "listRecurringAudienceListsCallable"] + }, "QueryAudienceList": { "methods": ["queryAudienceList", "queryAudienceList", "queryAudienceListCallable"] }, 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 bff0f4acbb17..737743a67afa 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 @@ -17,15 +17,21 @@ package com.google.analytics.data.v1alpha.stub; import static com.google.analytics.data.v1alpha.AlphaAnalyticsDataClient.ListAudienceListsPagedResponse; +import static com.google.analytics.data.v1alpha.AlphaAnalyticsDataClient.ListRecurringAudienceListsPagedResponse; import com.google.analytics.data.v1alpha.AudienceList; import com.google.analytics.data.v1alpha.AudienceListMetadata; import com.google.analytics.data.v1alpha.CreateAudienceListRequest; +import com.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest; import com.google.analytics.data.v1alpha.GetAudienceListRequest; +import com.google.analytics.data.v1alpha.GetRecurringAudienceListRequest; import com.google.analytics.data.v1alpha.ListAudienceListsRequest; import com.google.analytics.data.v1alpha.ListAudienceListsResponse; +import com.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest; +import com.google.analytics.data.v1alpha.ListRecurringAudienceListsResponse; import com.google.analytics.data.v1alpha.QueryAudienceListRequest; import com.google.analytics.data.v1alpha.QueryAudienceListResponse; +import com.google.analytics.data.v1alpha.RecurringAudienceList; import com.google.analytics.data.v1alpha.RunFunnelReportRequest; import com.google.analytics.data.v1alpha.RunFunnelReportResponse; import com.google.analytics.data.v1alpha.SheetExportAudienceListRequest; @@ -94,6 +100,29 @@ public UnaryCallable getAudienceListCallab throw new UnsupportedOperationException("Not implemented: listAudienceListsCallable()"); } + public UnaryCallable + createRecurringAudienceListCallable() { + throw new UnsupportedOperationException( + "Not implemented: createRecurringAudienceListCallable()"); + } + + public UnaryCallable + getRecurringAudienceListCallable() { + throw new UnsupportedOperationException("Not implemented: getRecurringAudienceListCallable()"); + } + + public UnaryCallable + listRecurringAudienceListsPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listRecurringAudienceListsPagedCallable()"); + } + + public UnaryCallable + listRecurringAudienceListsCallable() { + throw new UnsupportedOperationException( + "Not implemented: listRecurringAudienceListsCallable()"); + } + @Override public abstract void close(); } 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 c591a04de166..38fdb30d43ba 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 @@ -17,15 +17,21 @@ package com.google.analytics.data.v1alpha.stub; import static com.google.analytics.data.v1alpha.AlphaAnalyticsDataClient.ListAudienceListsPagedResponse; +import static com.google.analytics.data.v1alpha.AlphaAnalyticsDataClient.ListRecurringAudienceListsPagedResponse; import com.google.analytics.data.v1alpha.AudienceList; import com.google.analytics.data.v1alpha.AudienceListMetadata; import com.google.analytics.data.v1alpha.CreateAudienceListRequest; +import com.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest; import com.google.analytics.data.v1alpha.GetAudienceListRequest; +import com.google.analytics.data.v1alpha.GetRecurringAudienceListRequest; import com.google.analytics.data.v1alpha.ListAudienceListsRequest; import com.google.analytics.data.v1alpha.ListAudienceListsResponse; +import com.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest; +import com.google.analytics.data.v1alpha.ListRecurringAudienceListsResponse; import com.google.analytics.data.v1alpha.QueryAudienceListRequest; import com.google.analytics.data.v1alpha.QueryAudienceListResponse; +import com.google.analytics.data.v1alpha.RecurringAudienceList; import com.google.analytics.data.v1alpha.RunFunnelReportRequest; import com.google.analytics.data.v1alpha.RunFunnelReportResponse; import com.google.analytics.data.v1alpha.SheetExportAudienceListRequest; @@ -133,6 +139,15 @@ public class AlphaAnalyticsDataStubSettings extends StubSettings listAudienceListsSettings; + private final UnaryCallSettings + createRecurringAudienceListSettings; + private final UnaryCallSettings + getRecurringAudienceListSettings; + private final PagedCallSettings< + ListRecurringAudienceListsRequest, + ListRecurringAudienceListsResponse, + ListRecurringAudienceListsPagedResponse> + listRecurringAudienceListsSettings; private static final PagedListDescriptor< ListAudienceListsRequest, ListAudienceListsResponse, AudienceList> @@ -174,6 +189,55 @@ public Iterable extractResources(ListAudienceListsResponse payload } }; + private static final PagedListDescriptor< + ListRecurringAudienceListsRequest, + ListRecurringAudienceListsResponse, + RecurringAudienceList> + LIST_RECURRING_AUDIENCE_LISTS_PAGE_STR_DESC = + new PagedListDescriptor< + ListRecurringAudienceListsRequest, + ListRecurringAudienceListsResponse, + RecurringAudienceList>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListRecurringAudienceListsRequest injectToken( + ListRecurringAudienceListsRequest payload, String token) { + return ListRecurringAudienceListsRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public ListRecurringAudienceListsRequest injectPageSize( + ListRecurringAudienceListsRequest payload, int pageSize) { + return ListRecurringAudienceListsRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(ListRecurringAudienceListsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListRecurringAudienceListsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListRecurringAudienceListsResponse payload) { + return payload.getRecurringAudienceListsList() == null + ? ImmutableList.of() + : payload.getRecurringAudienceListsList(); + } + }; + private static final PagedListResponseFactory< ListAudienceListsRequest, ListAudienceListsResponse, ListAudienceListsPagedResponse> LIST_AUDIENCE_LISTS_PAGE_STR_FACT = @@ -195,6 +259,34 @@ public ApiFuture getFuturePagedResponse( } }; + private static final PagedListResponseFactory< + ListRecurringAudienceListsRequest, + ListRecurringAudienceListsResponse, + ListRecurringAudienceListsPagedResponse> + LIST_RECURRING_AUDIENCE_LISTS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListRecurringAudienceListsRequest, + ListRecurringAudienceListsResponse, + ListRecurringAudienceListsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable + callable, + ListRecurringAudienceListsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListRecurringAudienceListsRequest, + ListRecurringAudienceListsResponse, + RecurringAudienceList> + pageContext = + PageContext.create( + callable, LIST_RECURRING_AUDIENCE_LISTS_PAGE_STR_DESC, request, context); + return ListRecurringAudienceListsPagedResponse.createAsync( + pageContext, futureResponse); + } + }; + /** Returns the object with the settings used for calls to runFunnelReport. */ public UnaryCallSettings runFunnelReportSettings() { @@ -236,6 +328,27 @@ public UnaryCallSettings getAudienceListSe return listAudienceListsSettings; } + /** Returns the object with the settings used for calls to createRecurringAudienceList. */ + public UnaryCallSettings + createRecurringAudienceListSettings() { + return createRecurringAudienceListSettings; + } + + /** Returns the object with the settings used for calls to getRecurringAudienceList. */ + public UnaryCallSettings + getRecurringAudienceListSettings() { + return getRecurringAudienceListSettings; + } + + /** Returns the object with the settings used for calls to listRecurringAudienceLists. */ + public PagedCallSettings< + ListRecurringAudienceListsRequest, + ListRecurringAudienceListsResponse, + ListRecurringAudienceListsPagedResponse> + listRecurringAudienceListsSettings() { + return listRecurringAudienceListsSettings; + } + public AlphaAnalyticsDataStub createStub() throws IOException { if (getTransportChannelProvider() .getTransportName() @@ -350,6 +463,11 @@ protected AlphaAnalyticsDataStubSettings(Builder settingsBuilder) throws IOExcep sheetExportAudienceListSettings = settingsBuilder.sheetExportAudienceListSettings().build(); getAudienceListSettings = settingsBuilder.getAudienceListSettings().build(); listAudienceListsSettings = settingsBuilder.listAudienceListsSettings().build(); + createRecurringAudienceListSettings = + settingsBuilder.createRecurringAudienceListSettings().build(); + getRecurringAudienceListSettings = settingsBuilder.getRecurringAudienceListSettings().build(); + listRecurringAudienceListsSettings = + settingsBuilder.listRecurringAudienceListsSettings().build(); } /** Builder for AlphaAnalyticsDataStubSettings. */ @@ -373,6 +491,16 @@ public static class Builder private final PagedCallSettings.Builder< ListAudienceListsRequest, ListAudienceListsResponse, ListAudienceListsPagedResponse> listAudienceListsSettings; + private final UnaryCallSettings.Builder< + CreateRecurringAudienceListRequest, RecurringAudienceList> + createRecurringAudienceListSettings; + private final UnaryCallSettings.Builder + getRecurringAudienceListSettings; + private final PagedCallSettings.Builder< + ListRecurringAudienceListsRequest, + ListRecurringAudienceListsResponse, + ListRecurringAudienceListsPagedResponse> + listRecurringAudienceListsSettings; private static final ImmutableMap> RETRYABLE_CODE_DEFINITIONS; @@ -428,6 +556,10 @@ protected Builder(ClientContext clientContext) { sheetExportAudienceListSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); getAudienceListSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); listAudienceListsSettings = PagedCallSettings.newBuilder(LIST_AUDIENCE_LISTS_PAGE_STR_FACT); + createRecurringAudienceListSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getRecurringAudienceListSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listRecurringAudienceListsSettings = + PagedCallSettings.newBuilder(LIST_RECURRING_AUDIENCE_LISTS_PAGE_STR_FACT); unaryMethodSettingsBuilders = ImmutableList.>of( @@ -436,7 +568,10 @@ protected Builder(ClientContext clientContext) { queryAudienceListSettings, sheetExportAudienceListSettings, getAudienceListSettings, - listAudienceListsSettings); + listAudienceListsSettings, + createRecurringAudienceListSettings, + getRecurringAudienceListSettings, + listRecurringAudienceListsSettings); initDefaults(this); } @@ -451,6 +586,10 @@ protected Builder(AlphaAnalyticsDataStubSettings settings) { sheetExportAudienceListSettings = settings.sheetExportAudienceListSettings.toBuilder(); getAudienceListSettings = settings.getAudienceListSettings.toBuilder(); listAudienceListsSettings = settings.listAudienceListsSettings.toBuilder(); + createRecurringAudienceListSettings = + settings.createRecurringAudienceListSettings.toBuilder(); + getRecurringAudienceListSettings = settings.getRecurringAudienceListSettings.toBuilder(); + listRecurringAudienceListsSettings = settings.listRecurringAudienceListsSettings.toBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( @@ -459,7 +598,10 @@ protected Builder(AlphaAnalyticsDataStubSettings settings) { queryAudienceListSettings, sheetExportAudienceListSettings, getAudienceListSettings, - listAudienceListsSettings); + listAudienceListsSettings, + createRecurringAudienceListSettings, + getRecurringAudienceListSettings, + listRecurringAudienceListsSettings); } private static Builder createDefault() { @@ -519,6 +661,21 @@ 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 + .createRecurringAudienceListSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getRecurringAudienceListSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listRecurringAudienceListsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + builder .createAudienceListOperationSettings() .setInitialCallSettings( @@ -608,6 +765,27 @@ public Builder applyToAllUnaryMethods( return listAudienceListsSettings; } + /** Returns the builder for the settings used for calls to createRecurringAudienceList. */ + public UnaryCallSettings.Builder + createRecurringAudienceListSettings() { + return createRecurringAudienceListSettings; + } + + /** Returns the builder for the settings used for calls to getRecurringAudienceList. */ + public UnaryCallSettings.Builder + getRecurringAudienceListSettings() { + return getRecurringAudienceListSettings; + } + + /** Returns the builder for the settings used for calls to listRecurringAudienceLists. */ + public PagedCallSettings.Builder< + ListRecurringAudienceListsRequest, + ListRecurringAudienceListsResponse, + ListRecurringAudienceListsPagedResponse> + listRecurringAudienceListsSettings() { + return listRecurringAudienceListsSettings; + } + @Override public AlphaAnalyticsDataStubSettings build() throws IOException { return new AlphaAnalyticsDataStubSettings(this); 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 b92d67277bd6..6ba8d1917980 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 @@ -17,15 +17,21 @@ package com.google.analytics.data.v1alpha.stub; import static com.google.analytics.data.v1alpha.AlphaAnalyticsDataClient.ListAudienceListsPagedResponse; +import static com.google.analytics.data.v1alpha.AlphaAnalyticsDataClient.ListRecurringAudienceListsPagedResponse; import com.google.analytics.data.v1alpha.AudienceList; import com.google.analytics.data.v1alpha.AudienceListMetadata; import com.google.analytics.data.v1alpha.CreateAudienceListRequest; +import com.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest; import com.google.analytics.data.v1alpha.GetAudienceListRequest; +import com.google.analytics.data.v1alpha.GetRecurringAudienceListRequest; import com.google.analytics.data.v1alpha.ListAudienceListsRequest; import com.google.analytics.data.v1alpha.ListAudienceListsResponse; +import com.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest; +import com.google.analytics.data.v1alpha.ListRecurringAudienceListsResponse; import com.google.analytics.data.v1alpha.QueryAudienceListRequest; import com.google.analytics.data.v1alpha.QueryAudienceListResponse; +import com.google.analytics.data.v1alpha.RecurringAudienceList; import com.google.analytics.data.v1alpha.RunFunnelReportRequest; import com.google.analytics.data.v1alpha.RunFunnelReportResponse; import com.google.analytics.data.v1alpha.SheetExportAudienceListRequest; @@ -126,6 +132,44 @@ public class GrpcAlphaAnalyticsDataStub extends AlphaAnalyticsDataStub { ProtoUtils.marshaller(ListAudienceListsResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor + createRecurringAudienceListMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.analytics.data.v1alpha.AlphaAnalyticsData/CreateRecurringAudienceList") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateRecurringAudienceListRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(RecurringAudienceList.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getRecurringAudienceListMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.analytics.data.v1alpha.AlphaAnalyticsData/GetRecurringAudienceList") + .setRequestMarshaller( + ProtoUtils.marshaller(GetRecurringAudienceListRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(RecurringAudienceList.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + ListRecurringAudienceListsRequest, ListRecurringAudienceListsResponse> + listRecurringAudienceListsMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.analytics.data.v1alpha.AlphaAnalyticsData/ListRecurringAudienceLists") + .setRequestMarshaller( + ProtoUtils.marshaller(ListRecurringAudienceListsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListRecurringAudienceListsResponse.getDefaultInstance())) + .build(); + private final UnaryCallable runFunnelReportCallable; private final UnaryCallable createAudienceListCallable; @@ -140,6 +184,15 @@ public class GrpcAlphaAnalyticsDataStub extends AlphaAnalyticsDataStub { listAudienceListsCallable; private final UnaryCallable listAudienceListsPagedCallable; + private final UnaryCallable + createRecurringAudienceListCallable; + private final UnaryCallable + getRecurringAudienceListCallable; + private final UnaryCallable + listRecurringAudienceListsCallable; + private final UnaryCallable< + ListRecurringAudienceListsRequest, ListRecurringAudienceListsPagedResponse> + listRecurringAudienceListsPagedCallable; private final BackgroundResource backgroundResources; private final GrpcOperationsStub operationsStub; @@ -250,6 +303,40 @@ protected GrpcAlphaAnalyticsDataStub( return builder.build(); }) .build(); + GrpcCallSettings + createRecurringAudienceListTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createRecurringAudienceListMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings + getRecurringAudienceListTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getRecurringAudienceListMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + listRecurringAudienceListsTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(listRecurringAudienceListsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); this.runFunnelReportCallable = callableFactory.createUnaryCallable( @@ -288,6 +375,26 @@ protected GrpcAlphaAnalyticsDataStub( listAudienceListsTransportSettings, settings.listAudienceListsSettings(), clientContext); + this.createRecurringAudienceListCallable = + callableFactory.createUnaryCallable( + createRecurringAudienceListTransportSettings, + settings.createRecurringAudienceListSettings(), + clientContext); + this.getRecurringAudienceListCallable = + callableFactory.createUnaryCallable( + getRecurringAudienceListTransportSettings, + settings.getRecurringAudienceListSettings(), + clientContext); + this.listRecurringAudienceListsCallable = + callableFactory.createUnaryCallable( + listRecurringAudienceListsTransportSettings, + settings.listRecurringAudienceListsSettings(), + clientContext); + this.listRecurringAudienceListsPagedCallable = + callableFactory.createPagedCallable( + listRecurringAudienceListsTransportSettings, + settings.listRecurringAudienceListsSettings(), + clientContext); this.backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); @@ -342,6 +449,30 @@ public UnaryCallable getAudienceListCallab return listAudienceListsPagedCallable; } + @Override + public UnaryCallable + createRecurringAudienceListCallable() { + return createRecurringAudienceListCallable; + } + + @Override + public UnaryCallable + getRecurringAudienceListCallable() { + return getRecurringAudienceListCallable; + } + + @Override + public UnaryCallable + listRecurringAudienceListsCallable() { + return listRecurringAudienceListsCallable; + } + + @Override + public UnaryCallable + listRecurringAudienceListsPagedCallable() { + return listRecurringAudienceListsPagedCallable; + } + @Override public final void close() { try { 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 35912e6812d5..1fe8934c7665 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 @@ -17,15 +17,21 @@ package com.google.analytics.data.v1alpha.stub; import static com.google.analytics.data.v1alpha.AlphaAnalyticsDataClient.ListAudienceListsPagedResponse; +import static com.google.analytics.data.v1alpha.AlphaAnalyticsDataClient.ListRecurringAudienceListsPagedResponse; import com.google.analytics.data.v1alpha.AudienceList; import com.google.analytics.data.v1alpha.AudienceListMetadata; import com.google.analytics.data.v1alpha.CreateAudienceListRequest; +import com.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest; import com.google.analytics.data.v1alpha.GetAudienceListRequest; +import com.google.analytics.data.v1alpha.GetRecurringAudienceListRequest; import com.google.analytics.data.v1alpha.ListAudienceListsRequest; import com.google.analytics.data.v1alpha.ListAudienceListsResponse; +import com.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest; +import com.google.analytics.data.v1alpha.ListRecurringAudienceListsResponse; import com.google.analytics.data.v1alpha.QueryAudienceListRequest; import com.google.analytics.data.v1alpha.QueryAudienceListResponse; +import com.google.analytics.data.v1alpha.RecurringAudienceList; import com.google.analytics.data.v1alpha.RunFunnelReportRequest; import com.google.analytics.data.v1alpha.RunFunnelReportResponse; import com.google.analytics.data.v1alpha.SheetExportAudienceListRequest; @@ -298,6 +304,123 @@ public class HttpJsonAlphaAnalyticsDataStub extends AlphaAnalyticsDataStub { .build()) .build(); + private static final ApiMethodDescriptor< + CreateRecurringAudienceListRequest, RecurringAudienceList> + createRecurringAudienceListMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.analytics.data.v1alpha.AlphaAnalyticsData/CreateRecurringAudienceList") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{parent=properties/*}/recurringAudienceLists", + 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( + "recurringAudienceList", + request.getRecurringAudienceList(), + true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(RecurringAudienceList.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getRecurringAudienceListMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.analytics.data.v1alpha.AlphaAnalyticsData/GetRecurringAudienceList") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{name=properties/*/recurringAudienceLists/*}", + 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(RecurringAudienceList.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + ListRecurringAudienceListsRequest, ListRecurringAudienceListsResponse> + listRecurringAudienceListsMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.analytics.data.v1alpha.AlphaAnalyticsData/ListRecurringAudienceLists") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{parent=properties/*}/recurringAudienceLists", + 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(ListRecurringAudienceListsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + private final UnaryCallable runFunnelReportCallable; private final UnaryCallable createAudienceListCallable; @@ -312,6 +435,15 @@ public class HttpJsonAlphaAnalyticsDataStub extends AlphaAnalyticsDataStub { listAudienceListsCallable; private final UnaryCallable listAudienceListsPagedCallable; + private final UnaryCallable + createRecurringAudienceListCallable; + private final UnaryCallable + getRecurringAudienceListCallable; + private final UnaryCallable + listRecurringAudienceListsCallable; + private final UnaryCallable< + ListRecurringAudienceListsRequest, ListRecurringAudienceListsPagedResponse> + listRecurringAudienceListsPagedCallable; private final BackgroundResource backgroundResources; private final HttpJsonOperationsStub httpJsonOperationsStub; @@ -431,6 +563,45 @@ protected HttpJsonAlphaAnalyticsDataStub( return builder.build(); }) .build(); + HttpJsonCallSettings + createRecurringAudienceListTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(createRecurringAudienceListMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + getRecurringAudienceListTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(getRecurringAudienceListMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listRecurringAudienceListsTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(listRecurringAudienceListsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); this.runFunnelReportCallable = callableFactory.createUnaryCallable( @@ -469,6 +640,26 @@ protected HttpJsonAlphaAnalyticsDataStub( listAudienceListsTransportSettings, settings.listAudienceListsSettings(), clientContext); + this.createRecurringAudienceListCallable = + callableFactory.createUnaryCallable( + createRecurringAudienceListTransportSettings, + settings.createRecurringAudienceListSettings(), + clientContext); + this.getRecurringAudienceListCallable = + callableFactory.createUnaryCallable( + getRecurringAudienceListTransportSettings, + settings.getRecurringAudienceListSettings(), + clientContext); + this.listRecurringAudienceListsCallable = + callableFactory.createUnaryCallable( + listRecurringAudienceListsTransportSettings, + settings.listRecurringAudienceListsSettings(), + clientContext); + this.listRecurringAudienceListsPagedCallable = + callableFactory.createPagedCallable( + listRecurringAudienceListsTransportSettings, + settings.listRecurringAudienceListsSettings(), + clientContext); this.backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); @@ -483,6 +674,9 @@ public static List getMethodDescriptors() { methodDescriptors.add(sheetExportAudienceListMethodDescriptor); methodDescriptors.add(getAudienceListMethodDescriptor); methodDescriptors.add(listAudienceListsMethodDescriptor); + methodDescriptors.add(createRecurringAudienceListMethodDescriptor); + methodDescriptors.add(getRecurringAudienceListMethodDescriptor); + methodDescriptors.add(listRecurringAudienceListsMethodDescriptor); return methodDescriptors; } @@ -535,6 +729,30 @@ public UnaryCallable getAudienceListCallab return listAudienceListsPagedCallable; } + @Override + public UnaryCallable + createRecurringAudienceListCallable() { + return createRecurringAudienceListCallable; + } + + @Override + public UnaryCallable + getRecurringAudienceListCallable() { + return getRecurringAudienceListCallable; + } + + @Override + public UnaryCallable + listRecurringAudienceListsCallable() { + return listRecurringAudienceListsCallable; + } + + @Override + public UnaryCallable + listRecurringAudienceListsPagedCallable() { + return listRecurringAudienceListsPagedCallable; + } + @Override public final void close() { try { 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 e7516c7d72a0..180cda159a43 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 @@ -134,6 +134,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.analytics.data.v1alpha.DateRange", "queryAllDeclaredConstructors": true, @@ -656,6 +674,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.analytics.data.v1alpha.GetRecurringAudienceListRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.analytics.data.v1alpha.GetRecurringAudienceListRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.analytics.data.v1alpha.InListFilter", "queryAllDeclaredConstructors": true, @@ -710,6 +746,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.analytics.data.v1alpha.ListRecurringAudienceListsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.analytics.data.v1alpha.ListRecurringAudienceListsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.analytics.data.v1alpha.MetricHeader", "queryAllDeclaredConstructors": true, @@ -872,6 +944,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.analytics.data.v1alpha.RecurringAudienceList", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.analytics.data.v1alpha.RecurringAudienceList$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.analytics.data.v1alpha.Row", "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 9acfe6ce7a1c..29324f67c439 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 @@ -17,6 +17,7 @@ package com.google.analytics.data.v1alpha; import static com.google.analytics.data.v1alpha.AlphaAnalyticsDataClient.ListAudienceListsPagedResponse; +import static com.google.analytics.data.v1alpha.AlphaAnalyticsDataClient.ListRecurringAudienceListsPagedResponse; import com.google.analytics.data.v1alpha.stub.HttpJsonAlphaAnalyticsDataStub; import com.google.api.gax.core.NoCredentialsProvider; @@ -161,6 +162,8 @@ public void createAudienceListTest() throws Exception { .setCreationQuotaTokensCharged(1232901266) .setRowCount(1340416618) .setErrorMessage("errorMessage1203236063") + .setPercentageCompleted(-1292047642) + .setRecurringAudienceList("recurringAudienceList1055738943") .build(); Operation resultOperation = Operation.newBuilder() @@ -219,6 +222,8 @@ public void createAudienceListTest2() throws Exception { .setCreationQuotaTokensCharged(1232901266) .setRowCount(1340416618) .setErrorMessage("errorMessage1203236063") + .setPercentageCompleted(-1292047642) + .setRecurringAudienceList("recurringAudienceList1055738943") .build(); Operation resultOperation = Operation.newBuilder() @@ -417,6 +422,8 @@ public void getAudienceListTest() throws Exception { .setCreationQuotaTokensCharged(1232901266) .setRowCount(1340416618) .setErrorMessage("errorMessage1203236063") + .setPercentageCompleted(-1292047642) + .setRecurringAudienceList("recurringAudienceList1055738943") .build(); mockService.addResponse(expectedResponse); @@ -468,6 +475,8 @@ public void getAudienceListTest2() throws Exception { .setCreationQuotaTokensCharged(1232901266) .setRowCount(1340416618) .setErrorMessage("errorMessage1203236063") + .setPercentageCompleted(-1292047642) + .setRecurringAudienceList("recurringAudienceList1055738943") .build(); mockService.addResponse(expectedResponse); @@ -606,4 +615,314 @@ public void listAudienceListsExceptionTest2() throws Exception { // Expected exception. } } + + @Test + public void createRecurringAudienceListTest() throws Exception { + RecurringAudienceList expectedResponse = + RecurringAudienceList.newBuilder() + .setName( + RecurringAudienceListName.of("[PROPERTY]", "[RECURRING_AUDIENCE_LIST]").toString()) + .setAudience("audience975628804") + .setAudienceDisplayName("audienceDisplayName1537141193") + .addAllDimensions(new ArrayList()) + .setActiveDaysRemaining(-1427137945) + .addAllAudienceLists(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + PropertyName parent = PropertyName.of("[PROPERTY]"); + RecurringAudienceList recurringAudienceList = RecurringAudienceList.newBuilder().build(); + + RecurringAudienceList actualResponse = + client.createRecurringAudienceList(parent, recurringAudienceList); + 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 createRecurringAudienceListExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PropertyName parent = PropertyName.of("[PROPERTY]"); + RecurringAudienceList recurringAudienceList = RecurringAudienceList.newBuilder().build(); + client.createRecurringAudienceList(parent, recurringAudienceList); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createRecurringAudienceListTest2() throws Exception { + RecurringAudienceList expectedResponse = + RecurringAudienceList.newBuilder() + .setName( + RecurringAudienceListName.of("[PROPERTY]", "[RECURRING_AUDIENCE_LIST]").toString()) + .setAudience("audience975628804") + .setAudienceDisplayName("audienceDisplayName1537141193") + .addAllDimensions(new ArrayList()) + .setActiveDaysRemaining(-1427137945) + .addAllAudienceLists(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "properties/propertie-2024"; + RecurringAudienceList recurringAudienceList = RecurringAudienceList.newBuilder().build(); + + RecurringAudienceList actualResponse = + client.createRecurringAudienceList(parent, recurringAudienceList); + 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 createRecurringAudienceListExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "properties/propertie-2024"; + RecurringAudienceList recurringAudienceList = RecurringAudienceList.newBuilder().build(); + client.createRecurringAudienceList(parent, recurringAudienceList); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getRecurringAudienceListTest() throws Exception { + RecurringAudienceList expectedResponse = + RecurringAudienceList.newBuilder() + .setName( + RecurringAudienceListName.of("[PROPERTY]", "[RECURRING_AUDIENCE_LIST]").toString()) + .setAudience("audience975628804") + .setAudienceDisplayName("audienceDisplayName1537141193") + .addAllDimensions(new ArrayList()) + .setActiveDaysRemaining(-1427137945) + .addAllAudienceLists(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + RecurringAudienceListName name = + RecurringAudienceListName.of("[PROPERTY]", "[RECURRING_AUDIENCE_LIST]"); + + RecurringAudienceList actualResponse = client.getRecurringAudienceList(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 getRecurringAudienceListExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + RecurringAudienceListName name = + RecurringAudienceListName.of("[PROPERTY]", "[RECURRING_AUDIENCE_LIST]"); + client.getRecurringAudienceList(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getRecurringAudienceListTest2() throws Exception { + RecurringAudienceList expectedResponse = + RecurringAudienceList.newBuilder() + .setName( + RecurringAudienceListName.of("[PROPERTY]", "[RECURRING_AUDIENCE_LIST]").toString()) + .setAudience("audience975628804") + .setAudienceDisplayName("audienceDisplayName1537141193") + .addAllDimensions(new ArrayList()) + .setActiveDaysRemaining(-1427137945) + .addAllAudienceLists(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "properties/propertie-8187/recurringAudienceLists/recurringAudienceList-8187"; + + RecurringAudienceList actualResponse = client.getRecurringAudienceList(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 getRecurringAudienceListExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "properties/propertie-8187/recurringAudienceLists/recurringAudienceList-8187"; + client.getRecurringAudienceList(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listRecurringAudienceListsTest() throws Exception { + RecurringAudienceList responsesElement = RecurringAudienceList.newBuilder().build(); + ListRecurringAudienceListsResponse expectedResponse = + ListRecurringAudienceListsResponse.newBuilder() + .setNextPageToken("") + .addAllRecurringAudienceLists(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + PropertyName parent = PropertyName.of("[PROPERTY]"); + + ListRecurringAudienceListsPagedResponse pagedListResponse = + client.listRecurringAudienceLists(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getRecurringAudienceListsList().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 listRecurringAudienceListsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PropertyName parent = PropertyName.of("[PROPERTY]"); + client.listRecurringAudienceLists(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listRecurringAudienceListsTest2() throws Exception { + RecurringAudienceList responsesElement = RecurringAudienceList.newBuilder().build(); + ListRecurringAudienceListsResponse expectedResponse = + ListRecurringAudienceListsResponse.newBuilder() + .setNextPageToken("") + .addAllRecurringAudienceLists(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "properties/propertie-2024"; + + ListRecurringAudienceListsPagedResponse pagedListResponse = + client.listRecurringAudienceLists(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getRecurringAudienceListsList().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 listRecurringAudienceListsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "properties/propertie-2024"; + client.listRecurringAudienceLists(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } } 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 29aadcefe270..5d7f5c723887 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 @@ -17,6 +17,7 @@ package com.google.analytics.data.v1alpha; import static com.google.analytics.data.v1alpha.AlphaAnalyticsDataClient.ListAudienceListsPagedResponse; +import static com.google.analytics.data.v1alpha.AlphaAnalyticsDataClient.ListRecurringAudienceListsPagedResponse; import com.google.api.gax.core.NoCredentialsProvider; import com.google.api.gax.grpc.GaxGrpcProperties; @@ -169,6 +170,8 @@ public void createAudienceListTest() throws Exception { .setCreationQuotaTokensCharged(1232901266) .setRowCount(1340416618) .setErrorMessage("errorMessage1203236063") + .setPercentageCompleted(-1292047642) + .setRecurringAudienceList("recurringAudienceList1055738943") .build(); Operation resultOperation = Operation.newBuilder() @@ -225,6 +228,8 @@ public void createAudienceListTest2() throws Exception { .setCreationQuotaTokensCharged(1232901266) .setRowCount(1340416618) .setErrorMessage("errorMessage1203236063") + .setPercentageCompleted(-1292047642) + .setRecurringAudienceList("recurringAudienceList1055738943") .build(); Operation resultOperation = Operation.newBuilder() @@ -405,6 +410,8 @@ public void getAudienceListTest() throws Exception { .setCreationQuotaTokensCharged(1232901266) .setRowCount(1340416618) .setErrorMessage("errorMessage1203236063") + .setPercentageCompleted(-1292047642) + .setRecurringAudienceList("recurringAudienceList1055738943") .build(); mockAlphaAnalyticsData.addResponse(expectedResponse); @@ -450,6 +457,8 @@ public void getAudienceListTest2() throws Exception { .setCreationQuotaTokensCharged(1232901266) .setRowCount(1340416618) .setErrorMessage("errorMessage1203236063") + .setPercentageCompleted(-1292047642) + .setRecurringAudienceList("recurringAudienceList1055738943") .build(); mockAlphaAnalyticsData.addResponse(expectedResponse); @@ -570,4 +579,286 @@ public void listAudienceListsExceptionTest2() throws Exception { // Expected exception. } } + + @Test + public void createRecurringAudienceListTest() throws Exception { + RecurringAudienceList expectedResponse = + RecurringAudienceList.newBuilder() + .setName( + RecurringAudienceListName.of("[PROPERTY]", "[RECURRING_AUDIENCE_LIST]").toString()) + .setAudience("audience975628804") + .setAudienceDisplayName("audienceDisplayName1537141193") + .addAllDimensions(new ArrayList()) + .setActiveDaysRemaining(-1427137945) + .addAllAudienceLists(new ArrayList()) + .build(); + mockAlphaAnalyticsData.addResponse(expectedResponse); + + PropertyName parent = PropertyName.of("[PROPERTY]"); + RecurringAudienceList recurringAudienceList = RecurringAudienceList.newBuilder().build(); + + RecurringAudienceList actualResponse = + client.createRecurringAudienceList(parent, recurringAudienceList); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAlphaAnalyticsData.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateRecurringAudienceListRequest actualRequest = + ((CreateRecurringAudienceListRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(recurringAudienceList, actualRequest.getRecurringAudienceList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createRecurringAudienceListExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAlphaAnalyticsData.addException(exception); + + try { + PropertyName parent = PropertyName.of("[PROPERTY]"); + RecurringAudienceList recurringAudienceList = RecurringAudienceList.newBuilder().build(); + client.createRecurringAudienceList(parent, recurringAudienceList); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createRecurringAudienceListTest2() throws Exception { + RecurringAudienceList expectedResponse = + RecurringAudienceList.newBuilder() + .setName( + RecurringAudienceListName.of("[PROPERTY]", "[RECURRING_AUDIENCE_LIST]").toString()) + .setAudience("audience975628804") + .setAudienceDisplayName("audienceDisplayName1537141193") + .addAllDimensions(new ArrayList()) + .setActiveDaysRemaining(-1427137945) + .addAllAudienceLists(new ArrayList()) + .build(); + mockAlphaAnalyticsData.addResponse(expectedResponse); + + String parent = "parent-995424086"; + RecurringAudienceList recurringAudienceList = RecurringAudienceList.newBuilder().build(); + + RecurringAudienceList actualResponse = + client.createRecurringAudienceList(parent, recurringAudienceList); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAlphaAnalyticsData.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateRecurringAudienceListRequest actualRequest = + ((CreateRecurringAudienceListRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(recurringAudienceList, actualRequest.getRecurringAudienceList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createRecurringAudienceListExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAlphaAnalyticsData.addException(exception); + + try { + String parent = "parent-995424086"; + RecurringAudienceList recurringAudienceList = RecurringAudienceList.newBuilder().build(); + client.createRecurringAudienceList(parent, recurringAudienceList); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getRecurringAudienceListTest() throws Exception { + RecurringAudienceList expectedResponse = + RecurringAudienceList.newBuilder() + .setName( + RecurringAudienceListName.of("[PROPERTY]", "[RECURRING_AUDIENCE_LIST]").toString()) + .setAudience("audience975628804") + .setAudienceDisplayName("audienceDisplayName1537141193") + .addAllDimensions(new ArrayList()) + .setActiveDaysRemaining(-1427137945) + .addAllAudienceLists(new ArrayList()) + .build(); + mockAlphaAnalyticsData.addResponse(expectedResponse); + + RecurringAudienceListName name = + RecurringAudienceListName.of("[PROPERTY]", "[RECURRING_AUDIENCE_LIST]"); + + RecurringAudienceList actualResponse = client.getRecurringAudienceList(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAlphaAnalyticsData.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetRecurringAudienceListRequest actualRequest = + ((GetRecurringAudienceListRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getRecurringAudienceListExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAlphaAnalyticsData.addException(exception); + + try { + RecurringAudienceListName name = + RecurringAudienceListName.of("[PROPERTY]", "[RECURRING_AUDIENCE_LIST]"); + client.getRecurringAudienceList(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getRecurringAudienceListTest2() throws Exception { + RecurringAudienceList expectedResponse = + RecurringAudienceList.newBuilder() + .setName( + RecurringAudienceListName.of("[PROPERTY]", "[RECURRING_AUDIENCE_LIST]").toString()) + .setAudience("audience975628804") + .setAudienceDisplayName("audienceDisplayName1537141193") + .addAllDimensions(new ArrayList()) + .setActiveDaysRemaining(-1427137945) + .addAllAudienceLists(new ArrayList()) + .build(); + mockAlphaAnalyticsData.addResponse(expectedResponse); + + String name = "name3373707"; + + RecurringAudienceList actualResponse = client.getRecurringAudienceList(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAlphaAnalyticsData.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetRecurringAudienceListRequest actualRequest = + ((GetRecurringAudienceListRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getRecurringAudienceListExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAlphaAnalyticsData.addException(exception); + + try { + String name = "name3373707"; + client.getRecurringAudienceList(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listRecurringAudienceListsTest() throws Exception { + RecurringAudienceList responsesElement = RecurringAudienceList.newBuilder().build(); + ListRecurringAudienceListsResponse expectedResponse = + ListRecurringAudienceListsResponse.newBuilder() + .setNextPageToken("") + .addAllRecurringAudienceLists(Arrays.asList(responsesElement)) + .build(); + mockAlphaAnalyticsData.addResponse(expectedResponse); + + PropertyName parent = PropertyName.of("[PROPERTY]"); + + ListRecurringAudienceListsPagedResponse pagedListResponse = + client.listRecurringAudienceLists(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getRecurringAudienceListsList().get(0), resources.get(0)); + + List actualRequests = mockAlphaAnalyticsData.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListRecurringAudienceListsRequest actualRequest = + ((ListRecurringAudienceListsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listRecurringAudienceListsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAlphaAnalyticsData.addException(exception); + + try { + PropertyName parent = PropertyName.of("[PROPERTY]"); + client.listRecurringAudienceLists(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listRecurringAudienceListsTest2() throws Exception { + RecurringAudienceList responsesElement = RecurringAudienceList.newBuilder().build(); + ListRecurringAudienceListsResponse expectedResponse = + ListRecurringAudienceListsResponse.newBuilder() + .setNextPageToken("") + .addAllRecurringAudienceLists(Arrays.asList(responsesElement)) + .build(); + mockAlphaAnalyticsData.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListRecurringAudienceListsPagedResponse pagedListResponse = + client.listRecurringAudienceLists(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getRecurringAudienceListsList().get(0), resources.get(0)); + + List actualRequests = mockAlphaAnalyticsData.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListRecurringAudienceListsRequest actualRequest = + ((ListRecurringAudienceListsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listRecurringAudienceListsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAlphaAnalyticsData.addException(exception); + + try { + String parent = "parent-995424086"; + client.listRecurringAudienceLists(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } } 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 abb174201041..f341f6c02f74 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 @@ -187,4 +187,70 @@ public void listAudienceLists( Exception.class.getName()))); } } + + @Override + public void createRecurringAudienceList( + CreateRecurringAudienceListRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof RecurringAudienceList) { + requests.add(request); + responseObserver.onNext(((RecurringAudienceList) 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 CreateRecurringAudienceList, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + RecurringAudienceList.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getRecurringAudienceList( + GetRecurringAudienceListRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof RecurringAudienceList) { + requests.add(request); + responseObserver.onNext(((RecurringAudienceList) 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 GetRecurringAudienceList, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + RecurringAudienceList.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listRecurringAudienceLists( + ListRecurringAudienceListsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListRecurringAudienceListsResponse) { + requests.add(request); + responseObserver.onNext(((ListRecurringAudienceListsResponse) 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 ListRecurringAudienceLists, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListRecurringAudienceListsResponse.class.getName(), + Exception.class.getName()))); + } + } } 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 9be8b8af5025..58f82ed2de73 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 @@ -324,6 +324,165 @@ private AlphaAnalyticsDataGrpc() {} return getListAudienceListsMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest, + com.google.analytics.data.v1alpha.RecurringAudienceList> + getCreateRecurringAudienceListMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateRecurringAudienceList", + requestType = com.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest.class, + responseType = com.google.analytics.data.v1alpha.RecurringAudienceList.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest, + com.google.analytics.data.v1alpha.RecurringAudienceList> + getCreateRecurringAudienceListMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest, + com.google.analytics.data.v1alpha.RecurringAudienceList> + getCreateRecurringAudienceListMethod; + if ((getCreateRecurringAudienceListMethod = + AlphaAnalyticsDataGrpc.getCreateRecurringAudienceListMethod) + == null) { + synchronized (AlphaAnalyticsDataGrpc.class) { + if ((getCreateRecurringAudienceListMethod = + AlphaAnalyticsDataGrpc.getCreateRecurringAudienceListMethod) + == null) { + AlphaAnalyticsDataGrpc.getCreateRecurringAudienceListMethod = + getCreateRecurringAudienceListMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateRecurringAudienceList")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.data.v1alpha.RecurringAudienceList + .getDefaultInstance())) + .setSchemaDescriptor( + new AlphaAnalyticsDataMethodDescriptorSupplier( + "CreateRecurringAudienceList")) + .build(); + } + } + } + return getCreateRecurringAudienceListMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.data.v1alpha.GetRecurringAudienceListRequest, + com.google.analytics.data.v1alpha.RecurringAudienceList> + getGetRecurringAudienceListMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetRecurringAudienceList", + requestType = com.google.analytics.data.v1alpha.GetRecurringAudienceListRequest.class, + responseType = com.google.analytics.data.v1alpha.RecurringAudienceList.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.data.v1alpha.GetRecurringAudienceListRequest, + com.google.analytics.data.v1alpha.RecurringAudienceList> + getGetRecurringAudienceListMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.data.v1alpha.GetRecurringAudienceListRequest, + com.google.analytics.data.v1alpha.RecurringAudienceList> + getGetRecurringAudienceListMethod; + if ((getGetRecurringAudienceListMethod = + AlphaAnalyticsDataGrpc.getGetRecurringAudienceListMethod) + == null) { + synchronized (AlphaAnalyticsDataGrpc.class) { + if ((getGetRecurringAudienceListMethod = + AlphaAnalyticsDataGrpc.getGetRecurringAudienceListMethod) + == null) { + AlphaAnalyticsDataGrpc.getGetRecurringAudienceListMethod = + getGetRecurringAudienceListMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetRecurringAudienceList")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.data.v1alpha.GetRecurringAudienceListRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.data.v1alpha.RecurringAudienceList + .getDefaultInstance())) + .setSchemaDescriptor( + new AlphaAnalyticsDataMethodDescriptorSupplier( + "GetRecurringAudienceList")) + .build(); + } + } + } + return getGetRecurringAudienceListMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest, + com.google.analytics.data.v1alpha.ListRecurringAudienceListsResponse> + getListRecurringAudienceListsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListRecurringAudienceLists", + requestType = com.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest.class, + responseType = com.google.analytics.data.v1alpha.ListRecurringAudienceListsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest, + com.google.analytics.data.v1alpha.ListRecurringAudienceListsResponse> + getListRecurringAudienceListsMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest, + com.google.analytics.data.v1alpha.ListRecurringAudienceListsResponse> + getListRecurringAudienceListsMethod; + if ((getListRecurringAudienceListsMethod = + AlphaAnalyticsDataGrpc.getListRecurringAudienceListsMethod) + == null) { + synchronized (AlphaAnalyticsDataGrpc.class) { + if ((getListRecurringAudienceListsMethod = + AlphaAnalyticsDataGrpc.getListRecurringAudienceListsMethod) + == null) { + AlphaAnalyticsDataGrpc.getListRecurringAudienceListsMethod = + getListRecurringAudienceListsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListRecurringAudienceLists")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.data.v1alpha.ListRecurringAudienceListsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new AlphaAnalyticsDataMethodDescriptorSupplier( + "ListRecurringAudienceLists")) + .build(); + } + } + } + return getListRecurringAudienceListsMethod; + } + /** Creates a new async stub that supports all call types for the service */ public static AlphaAnalyticsDataStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = @@ -546,6 +705,86 @@ default void listAudienceLists( io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getListAudienceListsMethod(), responseObserver); } + + /** + * + * + *
+     * Creates a recurring audience list. Recurring audience lists produces new
+     * audience lists each day. Audience lists are users in an audience at the
+     * time of the list's creation.
+     * A recurring audience list ensures that you have audience list based on the
+     * most recent data available for use each day. If you manually create
+     * audience list, you don't know when an audience list based on an additional
+     * day's data is available. This recurring audience list automates the
+     * creation of an audience list when an additional day's data is available.
+     * You will consume fewer quota tokens by using recurring audience list versus
+     * manually creating audience list at various times of day trying to guess
+     * when an additional day's data is ready.
+     * This method is introduced at alpha stability with the intention of
+     * gathering feedback on syntax and capabilities before entering beta. To give
+     * your feedback on this API, complete the
+     * [Google Analytics Audience Export API
+     * Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.
+     * 
+ */ + default void createRecurringAudienceList( + com.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateRecurringAudienceListMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets configuration metadata about a specific recurring audience list. This
+     * method can be used to understand a recurring audience list's state after it
+     * has been created. For example, a recurring audience list resource will
+     * generate audience list instances for each day, and this method can be used
+     * to get the resource name of the most recent audience list instance.
+     * This method is introduced at alpha stability with the intention of
+     * gathering feedback on syntax and capabilities before entering beta. To give
+     * your feedback on this API, complete the
+     * [Google Analytics Audience Export API
+     * Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.
+     * 
+ */ + default void getRecurringAudienceList( + com.google.analytics.data.v1alpha.GetRecurringAudienceListRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetRecurringAudienceListMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists all recurring audience lists for a property. This method can be used
+     * for you to find and reuse existing recurring audience lists rather than
+     * creating unnecessary new recurring audience lists. The same audience can
+     * have multiple recurring audience lists that represent different dimension
+     * combinations; for example, just the dimension `deviceId` or both the
+     * dimensions `deviceId` and `userId`.
+     * This method is introduced at alpha stability with the intention of
+     * gathering feedback on syntax and capabilities before entering beta. To give
+     * your feedback on this API, complete the
+     * [Google Analytics Audience Export API
+     * Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.
+     * 
+ */ + default void listRecurringAudienceLists( + com.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest request, + io.grpc.stub.StreamObserver< + com.google.analytics.data.v1alpha.ListRecurringAudienceListsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListRecurringAudienceListsMethod(), responseObserver); + } } /** @@ -767,6 +1006,92 @@ public void listAudienceLists( request, responseObserver); } + + /** + * + * + *
+     * Creates a recurring audience list. Recurring audience lists produces new
+     * audience lists each day. Audience lists are users in an audience at the
+     * time of the list's creation.
+     * A recurring audience list ensures that you have audience list based on the
+     * most recent data available for use each day. If you manually create
+     * audience list, you don't know when an audience list based on an additional
+     * day's data is available. This recurring audience list automates the
+     * creation of an audience list when an additional day's data is available.
+     * You will consume fewer quota tokens by using recurring audience list versus
+     * manually creating audience list at various times of day trying to guess
+     * when an additional day's data is ready.
+     * This method is introduced at alpha stability with the intention of
+     * gathering feedback on syntax and capabilities before entering beta. To give
+     * your feedback on this API, complete the
+     * [Google Analytics Audience Export API
+     * Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.
+     * 
+ */ + public void createRecurringAudienceList( + com.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateRecurringAudienceListMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets configuration metadata about a specific recurring audience list. This
+     * method can be used to understand a recurring audience list's state after it
+     * has been created. For example, a recurring audience list resource will
+     * generate audience list instances for each day, and this method can be used
+     * to get the resource name of the most recent audience list instance.
+     * This method is introduced at alpha stability with the intention of
+     * gathering feedback on syntax and capabilities before entering beta. To give
+     * your feedback on this API, complete the
+     * [Google Analytics Audience Export API
+     * Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.
+     * 
+ */ + public void getRecurringAudienceList( + com.google.analytics.data.v1alpha.GetRecurringAudienceListRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetRecurringAudienceListMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists all recurring audience lists for a property. This method can be used
+     * for you to find and reuse existing recurring audience lists rather than
+     * creating unnecessary new recurring audience lists. The same audience can
+     * have multiple recurring audience lists that represent different dimension
+     * combinations; for example, just the dimension `deviceId` or both the
+     * dimensions `deviceId` and `userId`.
+     * This method is introduced at alpha stability with the intention of
+     * gathering feedback on syntax and capabilities before entering beta. To give
+     * your feedback on this API, complete the
+     * [Google Analytics Audience Export API
+     * Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.
+     * 
+ */ + public void listRecurringAudienceLists( + com.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest request, + io.grpc.stub.StreamObserver< + com.google.analytics.data.v1alpha.ListRecurringAudienceListsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListRecurringAudienceListsMethod(), getCallOptions()), + request, + responseObserver); + } } /** @@ -950,6 +1275,80 @@ public com.google.analytics.data.v1alpha.ListAudienceListsResponse listAudienceL return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getListAudienceListsMethod(), getCallOptions(), request); } + + /** + * + * + *
+     * Creates a recurring audience list. Recurring audience lists produces new
+     * audience lists each day. Audience lists are users in an audience at the
+     * time of the list's creation.
+     * A recurring audience list ensures that you have audience list based on the
+     * most recent data available for use each day. If you manually create
+     * audience list, you don't know when an audience list based on an additional
+     * day's data is available. This recurring audience list automates the
+     * creation of an audience list when an additional day's data is available.
+     * You will consume fewer quota tokens by using recurring audience list versus
+     * manually creating audience list at various times of day trying to guess
+     * when an additional day's data is ready.
+     * This method is introduced at alpha stability with the intention of
+     * gathering feedback on syntax and capabilities before entering beta. To give
+     * your feedback on this API, complete the
+     * [Google Analytics Audience Export API
+     * Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.
+     * 
+ */ + public com.google.analytics.data.v1alpha.RecurringAudienceList createRecurringAudienceList( + com.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateRecurringAudienceListMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets configuration metadata about a specific recurring audience list. This
+     * method can be used to understand a recurring audience list's state after it
+     * has been created. For example, a recurring audience list resource will
+     * generate audience list instances for each day, and this method can be used
+     * to get the resource name of the most recent audience list instance.
+     * This method is introduced at alpha stability with the intention of
+     * gathering feedback on syntax and capabilities before entering beta. To give
+     * your feedback on this API, complete the
+     * [Google Analytics Audience Export API
+     * Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.
+     * 
+ */ + public com.google.analytics.data.v1alpha.RecurringAudienceList getRecurringAudienceList( + com.google.analytics.data.v1alpha.GetRecurringAudienceListRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetRecurringAudienceListMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists all recurring audience lists for a property. This method can be used
+     * for you to find and reuse existing recurring audience lists rather than
+     * creating unnecessary new recurring audience lists. The same audience can
+     * have multiple recurring audience lists that represent different dimension
+     * combinations; for example, just the dimension `deviceId` or both the
+     * dimensions `deviceId` and `userId`.
+     * This method is introduced at alpha stability with the intention of
+     * gathering feedback on syntax and capabilities before entering beta. To give
+     * your feedback on this API, complete the
+     * [Google Analytics Audience Export API
+     * Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.
+     * 
+ */ + public com.google.analytics.data.v1alpha.ListRecurringAudienceListsResponse + listRecurringAudienceLists( + com.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListRecurringAudienceListsMethod(), getCallOptions(), request); + } } /** @@ -1137,6 +1536,85 @@ protected AlphaAnalyticsDataFutureStub build( return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getListAudienceListsMethod(), getCallOptions()), request); } + + /** + * + * + *
+     * Creates a recurring audience list. Recurring audience lists produces new
+     * audience lists each day. Audience lists are users in an audience at the
+     * time of the list's creation.
+     * A recurring audience list ensures that you have audience list based on the
+     * most recent data available for use each day. If you manually create
+     * audience list, you don't know when an audience list based on an additional
+     * day's data is available. This recurring audience list automates the
+     * creation of an audience list when an additional day's data is available.
+     * You will consume fewer quota tokens by using recurring audience list versus
+     * manually creating audience list at various times of day trying to guess
+     * when an additional day's data is ready.
+     * This method is introduced at alpha stability with the intention of
+     * gathering feedback on syntax and capabilities before entering beta. To give
+     * your feedback on this API, complete the
+     * [Google Analytics Audience Export API
+     * Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.analytics.data.v1alpha.RecurringAudienceList> + createRecurringAudienceList( + com.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateRecurringAudienceListMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets configuration metadata about a specific recurring audience list. This
+     * method can be used to understand a recurring audience list's state after it
+     * has been created. For example, a recurring audience list resource will
+     * generate audience list instances for each day, and this method can be used
+     * to get the resource name of the most recent audience list instance.
+     * This method is introduced at alpha stability with the intention of
+     * gathering feedback on syntax and capabilities before entering beta. To give
+     * your feedback on this API, complete the
+     * [Google Analytics Audience Export API
+     * Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.analytics.data.v1alpha.RecurringAudienceList> + getRecurringAudienceList( + com.google.analytics.data.v1alpha.GetRecurringAudienceListRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetRecurringAudienceListMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists all recurring audience lists for a property. This method can be used
+     * for you to find and reuse existing recurring audience lists rather than
+     * creating unnecessary new recurring audience lists. The same audience can
+     * have multiple recurring audience lists that represent different dimension
+     * combinations; for example, just the dimension `deviceId` or both the
+     * dimensions `deviceId` and `userId`.
+     * This method is introduced at alpha stability with the intention of
+     * gathering feedback on syntax and capabilities before entering beta. To give
+     * your feedback on this API, complete the
+     * [Google Analytics Audience Export API
+     * Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.analytics.data.v1alpha.ListRecurringAudienceListsResponse> + listRecurringAudienceLists( + com.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListRecurringAudienceListsMethod(), getCallOptions()), request); + } } private static final int METHODID_RUN_FUNNEL_REPORT = 0; @@ -1145,6 +1623,9 @@ protected AlphaAnalyticsDataFutureStub build( private static final int METHODID_SHEET_EXPORT_AUDIENCE_LIST = 3; private static final int METHODID_GET_AUDIENCE_LIST = 4; private static final int METHODID_LIST_AUDIENCE_LISTS = 5; + private static final int METHODID_CREATE_RECURRING_AUDIENCE_LIST = 6; + private static final int METHODID_GET_RECURRING_AUDIENCE_LIST = 7; + private static final int METHODID_LIST_RECURRING_AUDIENCE_LISTS = 8; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -1202,6 +1683,25 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv com.google.analytics.data.v1alpha.ListAudienceListsResponse>) responseObserver); break; + case METHODID_CREATE_RECURRING_AUDIENCE_LIST: + serviceImpl.createRecurringAudienceList( + (com.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_RECURRING_AUDIENCE_LIST: + serviceImpl.getRecurringAudienceList( + (com.google.analytics.data.v1alpha.GetRecurringAudienceListRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_RECURRING_AUDIENCE_LISTS: + serviceImpl.listRecurringAudienceLists( + (com.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.analytics.data.v1alpha.ListRecurringAudienceListsResponse>) + responseObserver); + break; default: throw new AssertionError(); } @@ -1261,6 +1761,27 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser com.google.analytics.data.v1alpha.ListAudienceListsRequest, com.google.analytics.data.v1alpha.ListAudienceListsResponse>( service, METHODID_LIST_AUDIENCE_LISTS))) + .addMethod( + getCreateRecurringAudienceListMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest, + com.google.analytics.data.v1alpha.RecurringAudienceList>( + service, METHODID_CREATE_RECURRING_AUDIENCE_LIST))) + .addMethod( + getGetRecurringAudienceListMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.analytics.data.v1alpha.GetRecurringAudienceListRequest, + com.google.analytics.data.v1alpha.RecurringAudienceList>( + service, METHODID_GET_RECURRING_AUDIENCE_LIST))) + .addMethod( + getListRecurringAudienceListsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest, + com.google.analytics.data.v1alpha.ListRecurringAudienceListsResponse>( + service, METHODID_LIST_RECURRING_AUDIENCE_LISTS))) .build(); } @@ -1318,6 +1839,9 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getSheetExportAudienceListMethod()) .addMethod(getGetAudienceListMethod()) .addMethod(getListAudienceListsMethod()) + .addMethod(getCreateRecurringAudienceListMethod()) + .addMethod(getGetRecurringAudienceListMethod()) + .addMethod(getListRecurringAudienceListsMethod()) .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 5992c23e8cce..fbfdf1c8b262 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 @@ -27,6 +27,26 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_data_v1alpha_CreateRecurringAudienceListRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_data_v1alpha_CreateRecurringAudienceListRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_data_v1alpha_RecurringAudienceList_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_data_v1alpha_RecurringAudienceList_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_data_v1alpha_GetRecurringAudienceListRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_data_v1alpha_GetRecurringAudienceListRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_data_v1alpha_ListRecurringAudienceListsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_data_v1alpha_ListRecurringAudienceListsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_data_v1alpha_ListRecurringAudienceListsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_data_v1alpha_ListRecurringAudienceListsResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_analytics_data_v1alpha_GetAudienceListRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -103,132 +123,182 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\027google/api/client.proto\032\037google/api/fie" + "ld_behavior.proto\032\031google/api/resource.p" + "roto\032#google/longrunning/operations.prot" - + "o\032\037google/protobuf/timestamp.proto\"Z\n\026Ge" - + "tAudienceListRequest\022@\n\004name\030\001 \001(\tB2\342A\001\002" - + "\372A+\n)analyticsdata.googleapis.com/Audien" - + "ceList\"\221\001\n\030ListAudienceListsRequest\022B\n\006p" - + "arent\030\001 \001(\tB2\342A\001\002\372A+\022)analyticsdata.goog" - + "leapis.com/AudienceList\022\027\n\tpage_size\030\002 \001" - + "(\005B\004\342A\001\001\022\030\n\npage_token\030\003 \001(\tB\004\342A\001\001\"\222\001\n\031L" - + "istAudienceListsResponse\022C\n\016audience_lis" - + "ts\030\001 \003(\0132+.google.analytics.data.v1alpha" - + ".AudienceList\022\034\n\017next_page_token\030\002 \001(\tH\000" - + "\210\001\001B\022\n\020_next_page_token\"\251\001\n\031CreateAudien" - + "ceListRequest\022B\n\006parent\030\001 \001(\tB2\342A\001\002\372A+\022)" - + "analyticsdata.googleapis.com/AudienceLis" - + "t\022H\n\raudience_list\030\002 \001(\0132+.google.analyt" - + "ics.data.v1alpha.AudienceListB\004\342A\001\002\"\265\005\n\014" - + "AudienceList\022\023\n\004name\030\001 \001(\tB\005\342A\002\010\003\022\026\n\010aud" - + "ience\030\002 \001(\tB\004\342A\001\002\022#\n\025audience_display_na" - + "me\030\003 \001(\tB\004\342A\001\003\022J\n\ndimensions\030\004 \003(\01320.goo" - + "gle.analytics.data.v1alpha.AudienceDimen" - + "sionB\004\342A\001\002\022K\n\005state\030\005 \001(\01621.google.analy" - + "tics.data.v1alpha.AudienceList.StateB\004\342A" - + "\001\003H\000\210\001\001\022B\n\023begin_creating_time\030\006 \001(\0132\032.g" - + "oogle.protobuf.TimestampB\004\342A\001\003H\001\210\001\001\022+\n\035c" - + "reation_quota_tokens_charged\030\007 \001(\005B\004\342A\001\003" - + "\022\034\n\trow_count\030\010 \001(\005B\004\342A\001\003H\002\210\001\001\022 \n\rerror_" - + "message\030\t \001(\tB\004\342A\001\003H\003\210\001\001\"D\n\005State\022\025\n\021STA" - + "TE_UNSPECIFIED\020\000\022\014\n\010CREATING\020\001\022\n\n\006ACTIVE" - + "\020\002\022\n\n\006FAILED\020\003:\200\001\352A}\n)analyticsdata.goog" - + "leapis.com/AudienceList\0223properties/{pro" - + "perty}/audienceLists/{audience_list}*\rau" - + "dienceLists2\014audienceListB\010\n\006_stateB\026\n\024_" - + "begin_creating_timeB\014\n\n_row_countB\020\n\016_er" - + "ror_message\"\026\n\024AudienceListMetadata\"Y\n\030Q" - + "ueryAudienceListRequest\022\022\n\004name\030\001 \001(\tB\004\342" - + "A\001\002\022\024\n\006offset\030\002 \001(\003B\004\342A\001\001\022\023\n\005limit\030\003 \001(\003" - + "B\004\342A\001\001\"\337\001\n\031QueryAudienceListResponse\022G\n\r" - + "audience_list\030\001 \001(\0132+.google.analytics.d" - + "ata.v1alpha.AudienceListH\000\210\001\001\022A\n\raudienc" - + "e_rows\030\002 \003(\0132*.google.analytics.data.v1a" - + "lpha.AudienceRow\022\026\n\trow_count\030\003 \001(\005H\001\210\001\001" - + "B\020\n\016_audience_listB\014\n\n_row_count\"\215\001\n\036She" - + "etExportAudienceListRequest\022@\n\004name\030\001 \001(" - + "\tB2\342A\001\002\372A+\n)analyticsdata.googleapis.com" - + "/AudienceList\022\024\n\006offset\030\002 \001(\003B\004\342A\001\001\022\023\n\005l" - + "imit\030\003 \001(\003B\004\342A\001\001\"\204\002\n\037SheetExportAudience" - + "ListResponse\022\034\n\017spreadsheet_uri\030\001 \001(\tH\000\210" - + "\001\001\022\033\n\016spreadsheet_id\030\002 \001(\tH\001\210\001\001\022\026\n\trow_c" - + "ount\030\003 \001(\005H\002\210\001\001\022G\n\raudience_list\030\004 \001(\0132+" - + ".google.analytics.data.v1alpha.AudienceL" - + "istH\003\210\001\001B\022\n\020_spreadsheet_uriB\021\n\017_spreads" - + "heet_idB\014\n\n_row_countB\020\n\016_audience_list\"" - + "^\n\013AudienceRow\022O\n\020dimension_values\030\001 \003(\013" - + "25.google.analytics.data.v1alpha.Audienc" - + "eDimensionValue\"1\n\021AudienceDimension\022\034\n\016" - + "dimension_name\030\001 \001(\tB\004\342A\001\001\"6\n\026AudienceDi" - + "mensionValue\022\017\n\005value\030\001 \001(\tH\000B\013\n\tone_val" - + "ue\"\207\006\n\026RunFunnelReportRequest\022\026\n\010propert" - + "y\030\001 \001(\tB\004\342A\001\001\022C\n\013date_ranges\030\002 \003(\0132(.goo" - + "gle.analytics.data.v1alpha.DateRangeB\004\342A" - + "\001\001\022;\n\006funnel\030\003 \001(\0132%.google.analytics.da" - + "ta.v1alpha.FunnelB\004\342A\001\001\022N\n\020funnel_breakd" - + "own\030\004 \001(\0132..google.analytics.data.v1alph" - + "a.FunnelBreakdownB\004\342A\001\001\022Q\n\022funnel_next_a" - + "ction\030\005 \001(\0132/.google.analytics.data.v1al" - + "pha.FunnelNextActionB\004\342A\001\001\022v\n\031funnel_vis" - + "ualization_type\030\006 \001(\0162M.google.analytics" - + ".data.v1alpha.RunFunnelReportRequest.Fun" - + "nelVisualizationTypeB\004\342A\001\001\022>\n\010segments\030\007" - + " \003(\0132&.google.analytics.data.v1alpha.Seg" - + "mentB\004\342A\001\001\022\023\n\005limit\030\t \001(\003B\004\342A\001\001\022O\n\020dimen" - + "sion_filter\030\n \001(\0132/.google.analytics.dat" - + "a.v1alpha.FilterExpressionB\004\342A\001\001\022#\n\025retu" - + "rn_property_quota\030\014 \001(\010B\004\342A\001\001\"m\n\027FunnelV" - + "isualizationType\022)\n%FUNNEL_VISUALIZATION" - + "_TYPE_UNSPECIFIED\020\000\022\023\n\017STANDARD_FUNNEL\020\001" - + "\022\022\n\016TRENDED_FUNNEL\020\002\"\201\002\n\027RunFunnelReport" - + "Response\022D\n\014funnel_table\030\001 \001(\0132..google." - + "analytics.data.v1alpha.FunnelSubReport\022L" - + "\n\024funnel_visualization\030\002 \001(\0132..google.an" - + "alytics.data.v1alpha.FunnelSubReport\022D\n\016" - + "property_quota\030\003 \001(\0132,.google.analytics." - + "data.v1alpha.PropertyQuota\022\014\n\004kind\030\004 \001(\t" - + "2\373\013\n\022AlphaAnalyticsData\022\275\001\n\017RunFunnelRep" - + "ort\0225.google.analytics.data.v1alpha.RunF" - + "unnelReportRequest\0326.google.analytics.da" - + "ta.v1alpha.RunFunnelReportResponse\";\202\323\344\223" - + "\0025\"0/v1alpha/{property=properties/*}:run" - + "FunnelReport:\001*\022\361\001\n\022CreateAudienceList\0228" - + ".google.analytics.data.v1alpha.CreateAud" - + "ienceListRequest\032\035.google.longrunning.Op" - + "eration\"\201\001\312A$\n\014AudienceList\022\024AudienceLis" - + "tMetadata\332A\024parent,audience_list\202\323\344\223\002=\"," - + "/v1alpha/{parent=properties/*}/audienceL" - + "ists:\raudience_list\022\314\001\n\021QueryAudienceLis" - + "t\0227.google.analytics.data.v1alpha.QueryA" - + "udienceListRequest\0328.google.analytics.da" - + "ta.v1alpha.QueryAudienceListResponse\"D\332A" - + "\004name\202\323\344\223\0027\"2/v1alpha/{name=properties/*" - + "/audienceLists/*}:query:\001*\022\344\001\n\027SheetExpo" - + "rtAudienceList\022=.google.analytics.data.v" - + "1alpha.SheetExportAudienceListRequest\032>." - + "google.analytics.data.v1alpha.SheetExpor" - + "tAudienceListResponse\"J\332A\004name\202\323\344\223\002=\"8/v" - + "1alpha/{name=properties/*/audienceLists/" - + "*}:exportSheet:\001*\022\262\001\n\017GetAudienceList\0225." - + "google.analytics.data.v1alpha.GetAudienc" - + "eListRequest\032+.google.analytics.data.v1a" - + "lpha.AudienceList\";\332A\004name\202\323\344\223\002.\022,/v1alp" - + "ha/{name=properties/*/audienceLists/*}\022\305" - + "\001\n\021ListAudienceLists\0227.google.analytics." - + "data.v1alpha.ListAudienceListsRequest\0328." - + "google.analytics.data.v1alpha.ListAudien" - + "ceListsResponse\"=\332A\006parent\202\323\344\223\002.\022,/v1alp" - + "ha/{parent=properties/*}/audienceLists\032\375" - + "\001\312A\034analyticsdata.googleapis.com\322A\332\001http" - + "s://www.googleapis.com/auth/analytics,ht" - + "tps://www.googleapis.com/auth/analytics." - + "readonly,https://www.googleapis.com/auth" - + "/drive,https://www.googleapis.com/auth/d" - + "rive.file,https://www.googleapis.com/aut" - + "h/spreadsheetsB\301\001\n!com.google.analytics." - + "data.v1alphaB\025AnalyticsDataApiProtoP\001ZAg" - + "oogle.golang.org/genproto/googleapis/ana" - + "lytics/data/v1alpha;data\352A?\n&analyticsad" - + "min.googleapis.com/Property\022\025properties/" - + "{property}b\006proto3" + + "o\032\037google/protobuf/timestamp.proto\"\316\001\n\"C" + + "reateRecurringAudienceListRequest\022K\n\006par" + + "ent\030\001 \001(\tB;\342A\001\002\372A4\0222analyticsdata.google" + + "apis.com/RecurringAudienceList\022[\n\027recurr" + + "ing_audience_list\030\002 \001(\01324.google.analyti" + + "cs.data.v1alpha.RecurringAudienceListB\004\342" + + "A\001\002\"\311\003\n\025RecurringAudienceList\022\023\n\004name\030\001 " + + "\001(\tB\005\342A\002\010\003\022\026\n\010audience\030\002 \001(\tB\004\342A\001\002\022#\n\025au" + + "dience_display_name\030\003 \001(\tB\004\342A\001\003\022J\n\ndimen" + + "sions\030\004 \003(\01320.google.analytics.data.v1al" + + "pha.AudienceDimensionB\004\342A\001\002\022(\n\025active_da" + + "ys_remaining\030\005 \001(\005B\004\342A\001\001H\000\210\001\001\022\034\n\016audienc" + + "e_lists\030\006 \003(\tB\004\342A\001\003:\257\001\352A\253\001\n2analyticsdat" + + "a.googleapis.com/RecurringAudienceList\022F" + + "properties/{property}/recurringAudienceL" + + "ists/{recurring_audience_list}*\026recurrin" + + "gAudienceLists2\025recurringAudienceListB\030\n" + + "\026_active_days_remaining\"l\n\037GetRecurringA" + + "udienceListRequest\022I\n\004name\030\001 \001(\tB;\342A\001\002\372A" + + "4\n2analyticsdata.googleapis.com/Recurrin" + + "gAudienceList\"\243\001\n!ListRecurringAudienceL" + + "istsRequest\022K\n\006parent\030\001 \001(\tB;\342A\001\002\372A4\0222an" + + "alyticsdata.googleapis.com/RecurringAudi" + + "enceList\022\027\n\tpage_size\030\002 \001(\005B\004\342A\001\001\022\030\n\npag" + + "e_token\030\003 \001(\tB\004\342A\001\001\"\256\001\n\"ListRecurringAud" + + "ienceListsResponse\022V\n\030recurring_audience" + + "_lists\030\001 \003(\01324.google.analytics.data.v1a" + + "lpha.RecurringAudienceList\022\034\n\017next_page_" + + "token\030\002 \001(\tH\000\210\001\001B\022\n\020_next_page_token\"Z\n\026" + + "GetAudienceListRequest\022@\n\004name\030\001 \001(\tB2\342A" + + "\001\002\372A+\n)analyticsdata.googleapis.com/Audi" + + "enceList\"\221\001\n\030ListAudienceListsRequest\022B\n" + + "\006parent\030\001 \001(\tB2\342A\001\002\372A+\022)analyticsdata.go" + + "ogleapis.com/AudienceList\022\027\n\tpage_size\030\002" + + " \001(\005B\004\342A\001\001\022\030\n\npage_token\030\003 \001(\tB\004\342A\001\001\"\222\001\n" + + "\031ListAudienceListsResponse\022C\n\016audience_l" + + "ists\030\001 \003(\0132+.google.analytics.data.v1alp" + + "ha.AudienceList\022\034\n\017next_page_token\030\002 \001(\t" + + "H\000\210\001\001B\022\n\020_next_page_token\"\251\001\n\031CreateAudi" + + "enceListRequest\022B\n\006parent\030\001 \001(\tB2\342A\001\002\372A+" + + "\022)analyticsdata.googleapis.com/AudienceL" + + "ist\022H\n\raudience_list\030\002 \001(\0132+.google.anal" + + "ytics.data.v1alpha.AudienceListB\004\342A\001\002\"\277\006" + + "\n\014AudienceList\022\023\n\004name\030\001 \001(\tB\005\342A\002\010\003\022\026\n\010a" + + "udience\030\002 \001(\tB\004\342A\001\002\022#\n\025audience_display_" + + "name\030\003 \001(\tB\004\342A\001\003\022J\n\ndimensions\030\004 \003(\01320.g" + + "oogle.analytics.data.v1alpha.AudienceDim" + + "ensionB\004\342A\001\002\022K\n\005state\030\005 \001(\01621.google.ana" + + "lytics.data.v1alpha.AudienceList.StateB\004" + + "\342A\001\003H\000\210\001\001\022B\n\023begin_creating_time\030\006 \001(\0132\032" + + ".google.protobuf.TimestampB\004\342A\001\003H\001\210\001\001\022+\n" + + "\035creation_quota_tokens_charged\030\007 \001(\005B\004\342A" + + "\001\003\022\034\n\trow_count\030\010 \001(\005B\004\342A\001\003H\002\210\001\001\022 \n\rerro" + + "r_message\030\t \001(\tB\004\342A\001\003H\003\210\001\001\022\'\n\024percentage" + + "_completed\030\013 \001(\001B\004\342A\001\003H\004\210\001\001\022*\n\027recurring" + + "_audience_list\030\014 \001(\tB\004\342A\001\003H\005\210\001\001\"D\n\005State" + + "\022\025\n\021STATE_UNSPECIFIED\020\000\022\014\n\010CREATING\020\001\022\n\n" + + "\006ACTIVE\020\002\022\n\n\006FAILED\020\003:\200\001\352A}\n)analyticsda" + + "ta.googleapis.com/AudienceList\0223properti" + + "es/{property}/audienceLists/{audience_li" + + "st}*\raudienceLists2\014audienceListB\010\n\006_sta" + + "teB\026\n\024_begin_creating_timeB\014\n\n_row_count" + + "B\020\n\016_error_messageB\027\n\025_percentage_comple" + + "tedB\032\n\030_recurring_audience_list\"\026\n\024Audie" + + "nceListMetadata\"Y\n\030QueryAudienceListRequ" + + "est\022\022\n\004name\030\001 \001(\tB\004\342A\001\002\022\024\n\006offset\030\002 \001(\003B" + + "\004\342A\001\001\022\023\n\005limit\030\003 \001(\003B\004\342A\001\001\"\337\001\n\031QueryAudi" + + "enceListResponse\022G\n\raudience_list\030\001 \001(\0132" + + "+.google.analytics.data.v1alpha.Audience" + + "ListH\000\210\001\001\022A\n\raudience_rows\030\002 \003(\0132*.googl" + + "e.analytics.data.v1alpha.AudienceRow\022\026\n\t" + + "row_count\030\003 \001(\005H\001\210\001\001B\020\n\016_audience_listB\014" + + "\n\n_row_count\"\215\001\n\036SheetExportAudienceList" + + "Request\022@\n\004name\030\001 \001(\tB2\342A\001\002\372A+\n)analytic" + + "sdata.googleapis.com/AudienceList\022\024\n\006off" + + "set\030\002 \001(\003B\004\342A\001\001\022\023\n\005limit\030\003 \001(\003B\004\342A\001\001\"\204\002\n" + + "\037SheetExportAudienceListResponse\022\034\n\017spre" + + "adsheet_uri\030\001 \001(\tH\000\210\001\001\022\033\n\016spreadsheet_id" + + "\030\002 \001(\tH\001\210\001\001\022\026\n\trow_count\030\003 \001(\005H\002\210\001\001\022G\n\ra" + + "udience_list\030\004 \001(\0132+.google.analytics.da" + + "ta.v1alpha.AudienceListH\003\210\001\001B\022\n\020_spreads" + + "heet_uriB\021\n\017_spreadsheet_idB\014\n\n_row_coun" + + "tB\020\n\016_audience_list\"^\n\013AudienceRow\022O\n\020di" + + "mension_values\030\001 \003(\01325.google.analytics." + + "data.v1alpha.AudienceDimensionValue\"1\n\021A" + + "udienceDimension\022\034\n\016dimension_name\030\001 \001(\t" + + "B\004\342A\001\001\"6\n\026AudienceDimensionValue\022\017\n\005valu" + + "e\030\001 \001(\tH\000B\013\n\tone_value\"\207\006\n\026RunFunnelRepo" + + "rtRequest\022\026\n\010property\030\001 \001(\tB\004\342A\001\001\022C\n\013dat" + + "e_ranges\030\002 \003(\0132(.google.analytics.data.v" + + "1alpha.DateRangeB\004\342A\001\001\022;\n\006funnel\030\003 \001(\0132%" + + ".google.analytics.data.v1alpha.FunnelB\004\342" + + "A\001\001\022N\n\020funnel_breakdown\030\004 \001(\0132..google.a" + + "nalytics.data.v1alpha.FunnelBreakdownB\004\342" + + "A\001\001\022Q\n\022funnel_next_action\030\005 \001(\0132/.google" + + ".analytics.data.v1alpha.FunnelNextAction" + + "B\004\342A\001\001\022v\n\031funnel_visualization_type\030\006 \001(" + + "\0162M.google.analytics.data.v1alpha.RunFun" + + "nelReportRequest.FunnelVisualizationType" + + "B\004\342A\001\001\022>\n\010segments\030\007 \003(\0132&.google.analyt" + + "ics.data.v1alpha.SegmentB\004\342A\001\001\022\023\n\005limit\030" + + "\t \001(\003B\004\342A\001\001\022O\n\020dimension_filter\030\n \001(\0132/." + + "google.analytics.data.v1alpha.FilterExpr" + + "essionB\004\342A\001\001\022#\n\025return_property_quota\030\014 " + + "\001(\010B\004\342A\001\001\"m\n\027FunnelVisualizationType\022)\n%" + + "FUNNEL_VISUALIZATION_TYPE_UNSPECIFIED\020\000\022" + + "\023\n\017STANDARD_FUNNEL\020\001\022\022\n\016TRENDED_FUNNEL\020\002" + + "\"\201\002\n\027RunFunnelReportResponse\022D\n\014funnel_t" + + "able\030\001 \001(\0132..google.analytics.data.v1alp" + + "ha.FunnelSubReport\022L\n\024funnel_visualizati" + + "on\030\002 \001(\0132..google.analytics.data.v1alpha" + + ".FunnelSubReport\022D\n\016property_quota\030\003 \001(\013" + + "2,.google.analytics.data.v1alpha.Propert" + + "yQuota\022\014\n\004kind\030\004 \001(\t2\322\021\n\022AlphaAnalyticsD" + + "ata\022\275\001\n\017RunFunnelReport\0225.google.analyti" + + "cs.data.v1alpha.RunFunnelReportRequest\0326" + + ".google.analytics.data.v1alpha.RunFunnel" + + "ReportResponse\";\202\323\344\223\0025\"0/v1alpha/{proper" + + "ty=properties/*}:runFunnelReport:\001*\022\361\001\n\022" + + "CreateAudienceList\0228.google.analytics.da" + + "ta.v1alpha.CreateAudienceListRequest\032\035.g" + + "oogle.longrunning.Operation\"\201\001\312A$\n\014Audie" + + "nceList\022\024AudienceListMetadata\332A\024parent,a" + + "udience_list\202\323\344\223\002=\",/v1alpha/{parent=pro" + + "perties/*}/audienceLists:\raudience_list\022" + + "\314\001\n\021QueryAudienceList\0227.google.analytics" + + ".data.v1alpha.QueryAudienceListRequest\0328" + + ".google.analytics.data.v1alpha.QueryAudi" + + "enceListResponse\"D\332A\004name\202\323\344\223\0027\"2/v1alph" + + "a/{name=properties/*/audienceLists/*}:qu" + + "ery:\001*\022\344\001\n\027SheetExportAudienceList\022=.goo" + + "gle.analytics.data.v1alpha.SheetExportAu" + + "dienceListRequest\032>.google.analytics.dat" + + "a.v1alpha.SheetExportAudienceListRespons" + + "e\"J\332A\004name\202\323\344\223\002=\"8/v1alpha/{name=propert" + + "ies/*/audienceLists/*}:exportSheet:\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=propertie" + + "s/*}/audienceLists\022\217\002\n\033CreateRecurringAu" + + "dienceList\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_a" + + "udience_list\022\326\001\n\030GetRecurringAudienceLis" + + "t\022>.google.analytics.data.v1alpha.GetRec" + + "urringAudienceListRequest\0324.google.analy" + + "tics.data.v1alpha.RecurringAudienceList\"" + + "D\332A\004name\202\323\344\223\0027\0225/v1alpha/{name=propertie" + + "s/*/recurringAudienceLists/*}\022\351\001\n\032ListRe" + + "curringAudienceLists\022@.google.analytics." + + "data.v1alpha.ListRecurringAudienceListsR" + + "equest\032A.google.analytics.data.v1alpha.L" + + "istRecurringAudienceListsResponse\"F\332A\006pa" + + "rent\202\323\344\223\0027\0225/v1alpha/{parent=properties/" + + "*}/recurringAudienceLists\032\375\001\312A\034analytics" + + "data.googleapis.com\322A\332\001https://www.googl" + + "eapis.com/auth/analytics,https://www.goo" + + "gleapis.com/auth/analytics.readonly,http" + + "s://www.googleapis.com/auth/drive,https:" + + "//www.googleapis.com/auth/drive.file,htt" + + "ps://www.googleapis.com/auth/spreadsheet" + + "sB\301\001\n!com.google.analytics.data.v1alphaB" + + "\025AnalyticsDataApiProtoP\001ZAgoogle.golang." + + "org/genproto/googleapis/analytics/data/v" + + "1alpha;data\352A?\n&analyticsadmin.googleapi" + + "s.com/Property\022\025properties/{property}b\006p" + + "roto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -242,8 +312,54 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.longrunning.OperationsProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), }); - internal_static_google_analytics_data_v1alpha_GetAudienceListRequest_descriptor = + internal_static_google_analytics_data_v1alpha_CreateRecurringAudienceListRequest_descriptor = getDescriptor().getMessageTypes().get(0); + internal_static_google_analytics_data_v1alpha_CreateRecurringAudienceListRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_data_v1alpha_CreateRecurringAudienceListRequest_descriptor, + new java.lang.String[] { + "Parent", "RecurringAudienceList", + }); + internal_static_google_analytics_data_v1alpha_RecurringAudienceList_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_analytics_data_v1alpha_RecurringAudienceList_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_data_v1alpha_RecurringAudienceList_descriptor, + new java.lang.String[] { + "Name", + "Audience", + "AudienceDisplayName", + "Dimensions", + "ActiveDaysRemaining", + "AudienceLists", + "ActiveDaysRemaining", + }); + internal_static_google_analytics_data_v1alpha_GetRecurringAudienceListRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_analytics_data_v1alpha_GetRecurringAudienceListRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_data_v1alpha_GetRecurringAudienceListRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_analytics_data_v1alpha_ListRecurringAudienceListsRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_analytics_data_v1alpha_ListRecurringAudienceListsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_data_v1alpha_ListRecurringAudienceListsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_analytics_data_v1alpha_ListRecurringAudienceListsResponse_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_analytics_data_v1alpha_ListRecurringAudienceListsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_data_v1alpha_ListRecurringAudienceListsResponse_descriptor, + new java.lang.String[] { + "RecurringAudienceLists", "NextPageToken", "NextPageToken", + }); + internal_static_google_analytics_data_v1alpha_GetAudienceListRequest_descriptor = + getDescriptor().getMessageTypes().get(5); internal_static_google_analytics_data_v1alpha_GetAudienceListRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_data_v1alpha_GetAudienceListRequest_descriptor, @@ -251,7 +367,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_analytics_data_v1alpha_ListAudienceListsRequest_descriptor = - getDescriptor().getMessageTypes().get(1); + getDescriptor().getMessageTypes().get(6); internal_static_google_analytics_data_v1alpha_ListAudienceListsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_data_v1alpha_ListAudienceListsRequest_descriptor, @@ -259,7 +375,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageSize", "PageToken", }); internal_static_google_analytics_data_v1alpha_ListAudienceListsResponse_descriptor = - getDescriptor().getMessageTypes().get(2); + getDescriptor().getMessageTypes().get(7); internal_static_google_analytics_data_v1alpha_ListAudienceListsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_data_v1alpha_ListAudienceListsResponse_descriptor, @@ -267,7 +383,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "AudienceLists", "NextPageToken", "NextPageToken", }); internal_static_google_analytics_data_v1alpha_CreateAudienceListRequest_descriptor = - getDescriptor().getMessageTypes().get(3); + getDescriptor().getMessageTypes().get(8); internal_static_google_analytics_data_v1alpha_CreateAudienceListRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_data_v1alpha_CreateAudienceListRequest_descriptor, @@ -275,7 +391,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "AudienceList", }); internal_static_google_analytics_data_v1alpha_AudienceList_descriptor = - getDescriptor().getMessageTypes().get(4); + getDescriptor().getMessageTypes().get(9); internal_static_google_analytics_data_v1alpha_AudienceList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_data_v1alpha_AudienceList_descriptor, @@ -289,19 +405,23 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "CreationQuotaTokensCharged", "RowCount", "ErrorMessage", + "PercentageCompleted", + "RecurringAudienceList", "State", "BeginCreatingTime", "RowCount", "ErrorMessage", + "PercentageCompleted", + "RecurringAudienceList", }); internal_static_google_analytics_data_v1alpha_AudienceListMetadata_descriptor = - getDescriptor().getMessageTypes().get(5); + getDescriptor().getMessageTypes().get(10); internal_static_google_analytics_data_v1alpha_AudienceListMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_data_v1alpha_AudienceListMetadata_descriptor, new java.lang.String[] {}); internal_static_google_analytics_data_v1alpha_QueryAudienceListRequest_descriptor = - getDescriptor().getMessageTypes().get(6); + getDescriptor().getMessageTypes().get(11); internal_static_google_analytics_data_v1alpha_QueryAudienceListRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_data_v1alpha_QueryAudienceListRequest_descriptor, @@ -309,7 +429,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "Offset", "Limit", }); internal_static_google_analytics_data_v1alpha_QueryAudienceListResponse_descriptor = - getDescriptor().getMessageTypes().get(7); + getDescriptor().getMessageTypes().get(12); internal_static_google_analytics_data_v1alpha_QueryAudienceListResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_data_v1alpha_QueryAudienceListResponse_descriptor, @@ -317,7 +437,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "AudienceList", "AudienceRows", "RowCount", "AudienceList", "RowCount", }); internal_static_google_analytics_data_v1alpha_SheetExportAudienceListRequest_descriptor = - getDescriptor().getMessageTypes().get(8); + getDescriptor().getMessageTypes().get(13); internal_static_google_analytics_data_v1alpha_SheetExportAudienceListRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_data_v1alpha_SheetExportAudienceListRequest_descriptor, @@ -325,7 +445,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "Offset", "Limit", }); internal_static_google_analytics_data_v1alpha_SheetExportAudienceListResponse_descriptor = - getDescriptor().getMessageTypes().get(9); + getDescriptor().getMessageTypes().get(14); internal_static_google_analytics_data_v1alpha_SheetExportAudienceListResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_data_v1alpha_SheetExportAudienceListResponse_descriptor, @@ -340,7 +460,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "AudienceList", }); internal_static_google_analytics_data_v1alpha_AudienceRow_descriptor = - getDescriptor().getMessageTypes().get(10); + getDescriptor().getMessageTypes().get(15); internal_static_google_analytics_data_v1alpha_AudienceRow_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_data_v1alpha_AudienceRow_descriptor, @@ -348,7 +468,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "DimensionValues", }); internal_static_google_analytics_data_v1alpha_AudienceDimension_descriptor = - getDescriptor().getMessageTypes().get(11); + getDescriptor().getMessageTypes().get(16); internal_static_google_analytics_data_v1alpha_AudienceDimension_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_data_v1alpha_AudienceDimension_descriptor, @@ -356,7 +476,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "DimensionName", }); internal_static_google_analytics_data_v1alpha_AudienceDimensionValue_descriptor = - getDescriptor().getMessageTypes().get(12); + getDescriptor().getMessageTypes().get(17); internal_static_google_analytics_data_v1alpha_AudienceDimensionValue_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_data_v1alpha_AudienceDimensionValue_descriptor, @@ -364,7 +484,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Value", "OneValue", }); internal_static_google_analytics_data_v1alpha_RunFunnelReportRequest_descriptor = - getDescriptor().getMessageTypes().get(13); + getDescriptor().getMessageTypes().get(18); internal_static_google_analytics_data_v1alpha_RunFunnelReportRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_data_v1alpha_RunFunnelReportRequest_descriptor, @@ -381,7 +501,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ReturnPropertyQuota", }); internal_static_google_analytics_data_v1alpha_RunFunnelReportResponse_descriptor = - getDescriptor().getMessageTypes().get(14); + getDescriptor().getMessageTypes().get(19); internal_static_google_analytics_data_v1alpha_RunFunnelReportResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_data_v1alpha_RunFunnelReportResponse_descriptor, diff --git a/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/AudienceList.java b/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/AudienceList.java index 99e1fba9f995..9a63a615e04c 100644 --- a/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/AudienceList.java +++ b/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/AudienceList.java @@ -46,6 +46,7 @@ private AudienceList() { dimensions_ = java.util.Collections.emptyList(); state_ = 0; errorMessage_ = ""; + recurringAudienceList_ = ""; } @java.lang.Override @@ -438,7 +439,7 @@ public com.google.protobuf.ByteString getAudienceDisplayNameBytes() { * * *
-   * Required. The dimensions requested and displayed in the report response.
+   * Required. The dimensions requested and displayed in the query response.
    * 
* * @@ -453,7 +454,7 @@ public java.util.List getDi * * *
-   * Required. The dimensions requested and displayed in the report response.
+   * Required. The dimensions requested and displayed in the query response.
    * 
* * @@ -469,7 +470,7 @@ public java.util.List getDi * * *
-   * Required. The dimensions requested and displayed in the report response.
+   * Required. The dimensions requested and displayed in the query response.
    * 
* * @@ -484,7 +485,7 @@ public int getDimensionsCount() { * * *
-   * Required. The dimensions requested and displayed in the report response.
+   * Required. The dimensions requested and displayed in the query response.
    * 
* * @@ -499,7 +500,7 @@ public com.google.analytics.data.v1alpha.AudienceDimension getDimensions(int ind * * *
-   * Required. The dimensions requested and displayed in the report response.
+   * Required. The dimensions requested and displayed in the query response.
    * 
* * @@ -753,6 +754,127 @@ public com.google.protobuf.ByteString getErrorMessageBytes() { } } + public static final int PERCENTAGE_COMPLETED_FIELD_NUMBER = 11; + private double percentageCompleted_ = 0D; + /** + * + * + *
+   * Output only. The percentage completed for this audience export ranging
+   * between 0 to 100.
+   * 
+ * + * optional double percentage_completed = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the percentageCompleted field is set. + */ + @java.lang.Override + public boolean hasPercentageCompleted() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+   * Output only. The percentage completed for this audience export ranging
+   * between 0 to 100.
+   * 
+ * + * optional double percentage_completed = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The percentageCompleted. + */ + @java.lang.Override + public double getPercentageCompleted() { + return percentageCompleted_; + } + + public static final int RECURRING_AUDIENCE_LIST_FIELD_NUMBER = 12; + + @SuppressWarnings("serial") + private volatile java.lang.Object recurringAudienceList_ = ""; + /** + * + * + *
+   * Output only. The recurring audience list that created this audience list.
+   * Recurring audience lists create audience lists daily.
+   *
+   * If audience lists are created directly, they will have no associated
+   * recurring audience list, and this field will be blank.
+   * 
+ * + * + * optional string recurring_audience_list = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the recurringAudienceList field is set. + */ + @java.lang.Override + public boolean hasRecurringAudienceList() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+   * Output only. The recurring audience list that created this audience list.
+   * Recurring audience lists create audience lists daily.
+   *
+   * If audience lists are created directly, they will have no associated
+   * recurring audience list, and this field will be blank.
+   * 
+ * + * + * optional string recurring_audience_list = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The recurringAudienceList. + */ + @java.lang.Override + public java.lang.String getRecurringAudienceList() { + java.lang.Object ref = recurringAudienceList_; + 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(); + recurringAudienceList_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The recurring audience list that created this audience list.
+   * Recurring audience lists create audience lists daily.
+   *
+   * If audience lists are created directly, they will have no associated
+   * recurring audience list, and this field will be blank.
+   * 
+ * + * + * optional string recurring_audience_list = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for recurringAudienceList. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRecurringAudienceListBytes() { + java.lang.Object ref = recurringAudienceList_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + recurringAudienceList_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -794,6 +916,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 9, errorMessage_); } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeDouble(11, percentageCompleted_); + } + if (((bitField0_ & 0x00000020) != 0)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 12, recurringAudienceList_); + } getUnknownFields().writeTo(output); } @@ -831,6 +959,12 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, errorMessage_); } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(11, percentageCompleted_); + } + if (((bitField0_ & 0x00000020) != 0)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, recurringAudienceList_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -868,6 +1002,15 @@ public boolean equals(final java.lang.Object obj) { if (hasErrorMessage()) { if (!getErrorMessage().equals(other.getErrorMessage())) return false; } + if (hasPercentageCompleted() != other.hasPercentageCompleted()) return false; + if (hasPercentageCompleted()) { + if (java.lang.Double.doubleToLongBits(getPercentageCompleted()) + != java.lang.Double.doubleToLongBits(other.getPercentageCompleted())) return false; + } + if (hasRecurringAudienceList() != other.hasRecurringAudienceList()) return false; + if (hasRecurringAudienceList()) { + if (!getRecurringAudienceList().equals(other.getRecurringAudienceList())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -907,6 +1050,17 @@ public int hashCode() { hash = (37 * hash) + ERROR_MESSAGE_FIELD_NUMBER; hash = (53 * hash) + getErrorMessage().hashCode(); } + if (hasPercentageCompleted()) { + hash = (37 * hash) + PERCENTAGE_COMPLETED_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getPercentageCompleted())); + } + if (hasRecurringAudienceList()) { + hash = (37 * hash) + RECURRING_AUDIENCE_LIST_FIELD_NUMBER; + hash = (53 * hash) + getRecurringAudienceList().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -1077,6 +1231,8 @@ public Builder clear() { creationQuotaTokensCharged_ = 0; rowCount_ = 0; errorMessage_ = ""; + percentageCompleted_ = 0D; + recurringAudienceList_ = ""; return this; } @@ -1158,6 +1314,14 @@ private void buildPartial0(com.google.analytics.data.v1alpha.AudienceList result result.errorMessage_ = errorMessage_; to_bitField0_ |= 0x00000008; } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.percentageCompleted_ = percentageCompleted_; + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.recurringAudienceList_ = recurringAudienceList_; + to_bitField0_ |= 0x00000020; + } result.bitField0_ |= to_bitField0_; } @@ -1265,6 +1429,14 @@ public Builder mergeFrom(com.google.analytics.data.v1alpha.AudienceList other) { bitField0_ |= 0x00000100; onChanged(); } + if (other.hasPercentageCompleted()) { + setPercentageCompleted(other.getPercentageCompleted()); + } + if (other.hasRecurringAudienceList()) { + recurringAudienceList_ = other.recurringAudienceList_; + bitField0_ |= 0x00000400; + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1354,6 +1526,18 @@ public Builder mergeFrom( bitField0_ |= 0x00000100; break; } // case 74 + case 89: + { + percentageCompleted_ = input.readDouble(); + bitField0_ |= 0x00000200; + break; + } // case 89 + case 98: + { + recurringAudienceList_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 98 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1763,7 +1947,7 @@ private void ensureDimensionsIsMutable() { * * *
-     * Required. The dimensions requested and displayed in the report response.
+     * Required. The dimensions requested and displayed in the query response.
      * 
* * @@ -1781,7 +1965,7 @@ public java.util.List getDi * * *
-     * Required. The dimensions requested and displayed in the report response.
+     * Required. The dimensions requested and displayed in the query response.
      * 
* * @@ -1799,7 +1983,7 @@ public int getDimensionsCount() { * * *
-     * Required. The dimensions requested and displayed in the report response.
+     * Required. The dimensions requested and displayed in the query response.
      * 
* * @@ -1817,7 +2001,7 @@ public com.google.analytics.data.v1alpha.AudienceDimension getDimensions(int ind * * *
-     * Required. The dimensions requested and displayed in the report response.
+     * Required. The dimensions requested and displayed in the query response.
      * 
* * @@ -1842,7 +2026,7 @@ public Builder setDimensions( * * *
-     * Required. The dimensions requested and displayed in the report response.
+     * Required. The dimensions requested and displayed in the query response.
      * 
* * @@ -1864,7 +2048,7 @@ public Builder setDimensions( * * *
-     * Required. The dimensions requested and displayed in the report response.
+     * Required. The dimensions requested and displayed in the query response.
      * 
* * @@ -1888,7 +2072,7 @@ public Builder addDimensions(com.google.analytics.data.v1alpha.AudienceDimension * * *
-     * Required. The dimensions requested and displayed in the report response.
+     * Required. The dimensions requested and displayed in the query response.
      * 
* * @@ -1913,7 +2097,7 @@ public Builder addDimensions( * * *
-     * Required. The dimensions requested and displayed in the report response.
+     * Required. The dimensions requested and displayed in the query response.
      * 
* * @@ -1935,7 +2119,7 @@ public Builder addDimensions( * * *
-     * Required. The dimensions requested and displayed in the report response.
+     * Required. The dimensions requested and displayed in the query response.
      * 
* * @@ -1957,7 +2141,7 @@ public Builder addDimensions( * * *
-     * Required. The dimensions requested and displayed in the report response.
+     * Required. The dimensions requested and displayed in the query response.
      * 
* * @@ -1979,7 +2163,7 @@ public Builder addAllDimensions( * * *
-     * Required. The dimensions requested and displayed in the report response.
+     * Required. The dimensions requested and displayed in the query response.
      * 
* * @@ -2000,7 +2184,7 @@ public Builder clearDimensions() { * * *
-     * Required. The dimensions requested and displayed in the report response.
+     * Required. The dimensions requested and displayed in the query response.
      * 
* * @@ -2021,7 +2205,7 @@ public Builder removeDimensions(int index) { * * *
-     * Required. The dimensions requested and displayed in the report response.
+     * Required. The dimensions requested and displayed in the query response.
      * 
* * @@ -2036,7 +2220,7 @@ public com.google.analytics.data.v1alpha.AudienceDimension.Builder getDimensions * * *
-     * Required. The dimensions requested and displayed in the report response.
+     * Required. The dimensions requested and displayed in the query response.
      * 
* * @@ -2055,7 +2239,7 @@ public com.google.analytics.data.v1alpha.AudienceDimensionOrBuilder getDimension * * *
-     * Required. The dimensions requested and displayed in the report response.
+     * Required. The dimensions requested and displayed in the query response.
      * 
* * @@ -2074,7 +2258,7 @@ public com.google.analytics.data.v1alpha.AudienceDimensionOrBuilder getDimension * * *
-     * Required. The dimensions requested and displayed in the report response.
+     * Required. The dimensions requested and displayed in the query response.
      * 
* * @@ -2089,7 +2273,7 @@ public com.google.analytics.data.v1alpha.AudienceDimension.Builder addDimensions * * *
-     * Required. The dimensions requested and displayed in the report response.
+     * Required. The dimensions requested and displayed in the query response.
      * 
* * @@ -2106,7 +2290,7 @@ public com.google.analytics.data.v1alpha.AudienceDimension.Builder addDimensions * * *
-     * Required. The dimensions requested and displayed in the report response.
+     * Required. The dimensions requested and displayed in the query response.
      * 
* * @@ -2723,6 +2907,238 @@ public Builder setErrorMessageBytes(com.google.protobuf.ByteString value) { return this; } + private double percentageCompleted_; + /** + * + * + *
+     * Output only. The percentage completed for this audience export ranging
+     * between 0 to 100.
+     * 
+ * + * optional double percentage_completed = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the percentageCompleted field is set. + */ + @java.lang.Override + public boolean hasPercentageCompleted() { + return ((bitField0_ & 0x00000200) != 0); + } + /** + * + * + *
+     * Output only. The percentage completed for this audience export ranging
+     * between 0 to 100.
+     * 
+ * + * optional double percentage_completed = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The percentageCompleted. + */ + @java.lang.Override + public double getPercentageCompleted() { + return percentageCompleted_; + } + /** + * + * + *
+     * Output only. The percentage completed for this audience export ranging
+     * between 0 to 100.
+     * 
+ * + * optional double percentage_completed = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The percentageCompleted to set. + * @return This builder for chaining. + */ + public Builder setPercentageCompleted(double value) { + + percentageCompleted_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The percentage completed for this audience export ranging
+     * between 0 to 100.
+     * 
+ * + * optional double percentage_completed = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearPercentageCompleted() { + bitField0_ = (bitField0_ & ~0x00000200); + percentageCompleted_ = 0D; + onChanged(); + return this; + } + + private java.lang.Object recurringAudienceList_ = ""; + /** + * + * + *
+     * Output only. The recurring audience list that created this audience list.
+     * Recurring audience lists create audience lists daily.
+     *
+     * If audience lists are created directly, they will have no associated
+     * recurring audience list, and this field will be blank.
+     * 
+ * + * + * optional string recurring_audience_list = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the recurringAudienceList field is set. + */ + public boolean hasRecurringAudienceList() { + return ((bitField0_ & 0x00000400) != 0); + } + /** + * + * + *
+     * Output only. The recurring audience list that created this audience list.
+     * Recurring audience lists create audience lists daily.
+     *
+     * If audience lists are created directly, they will have no associated
+     * recurring audience list, and this field will be blank.
+     * 
+ * + * + * optional string recurring_audience_list = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The recurringAudienceList. + */ + public java.lang.String getRecurringAudienceList() { + java.lang.Object ref = recurringAudienceList_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + recurringAudienceList_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The recurring audience list that created this audience list.
+     * Recurring audience lists create audience lists daily.
+     *
+     * If audience lists are created directly, they will have no associated
+     * recurring audience list, and this field will be blank.
+     * 
+ * + * + * optional string recurring_audience_list = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for recurringAudienceList. + */ + public com.google.protobuf.ByteString getRecurringAudienceListBytes() { + java.lang.Object ref = recurringAudienceList_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + recurringAudienceList_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The recurring audience list that created this audience list.
+     * Recurring audience lists create audience lists daily.
+     *
+     * If audience lists are created directly, they will have no associated
+     * recurring audience list, and this field will be blank.
+     * 
+ * + * + * optional string recurring_audience_list = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The recurringAudienceList to set. + * @return This builder for chaining. + */ + public Builder setRecurringAudienceList(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + recurringAudienceList_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The recurring audience list that created this audience list.
+     * Recurring audience lists create audience lists daily.
+     *
+     * If audience lists are created directly, they will have no associated
+     * recurring audience list, and this field will be blank.
+     * 
+ * + * + * optional string recurring_audience_list = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearRecurringAudienceList() { + recurringAudienceList_ = getDefaultInstance().getRecurringAudienceList(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The recurring audience list that created this audience list.
+     * Recurring audience lists create audience lists daily.
+     *
+     * If audience lists are created directly, they will have no associated
+     * recurring audience list, and this field will be blank.
+     * 
+ * + * + * optional string recurring_audience_list = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes for recurringAudienceList to set. + * @return This builder for chaining. + */ + public Builder setRecurringAudienceListBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + recurringAudienceList_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/AudienceListOrBuilder.java b/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/AudienceListOrBuilder.java index 3d0ca7d6ed50..ab3251ccceab 100644 --- a/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/AudienceListOrBuilder.java +++ b/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/AudienceListOrBuilder.java @@ -122,7 +122,7 @@ public interface AudienceListOrBuilder * * *
-   * Required. The dimensions requested and displayed in the report response.
+   * Required. The dimensions requested and displayed in the query response.
    * 
* * @@ -134,7 +134,7 @@ public interface AudienceListOrBuilder * * *
-   * Required. The dimensions requested and displayed in the report response.
+   * Required. The dimensions requested and displayed in the query response.
    * 
* * @@ -146,7 +146,7 @@ public interface AudienceListOrBuilder * * *
-   * Required. The dimensions requested and displayed in the report response.
+   * Required. The dimensions requested and displayed in the query response.
    * 
* * @@ -158,7 +158,7 @@ public interface AudienceListOrBuilder * * *
-   * Required. The dimensions requested and displayed in the report response.
+   * Required. The dimensions requested and displayed in the query response.
    * 
* * @@ -171,7 +171,7 @@ public interface AudienceListOrBuilder * * *
-   * Required. The dimensions requested and displayed in the report response.
+   * Required. The dimensions requested and displayed in the query response.
    * 
* * @@ -348,4 +348,88 @@ public interface AudienceListOrBuilder * @return The bytes for errorMessage. */ com.google.protobuf.ByteString getErrorMessageBytes(); + + /** + * + * + *
+   * Output only. The percentage completed for this audience export ranging
+   * between 0 to 100.
+   * 
+ * + * optional double percentage_completed = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the percentageCompleted field is set. + */ + boolean hasPercentageCompleted(); + /** + * + * + *
+   * Output only. The percentage completed for this audience export ranging
+   * between 0 to 100.
+   * 
+ * + * optional double percentage_completed = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The percentageCompleted. + */ + double getPercentageCompleted(); + + /** + * + * + *
+   * Output only. The recurring audience list that created this audience list.
+   * Recurring audience lists create audience lists daily.
+   *
+   * If audience lists are created directly, they will have no associated
+   * recurring audience list, and this field will be blank.
+   * 
+ * + * + * optional string recurring_audience_list = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the recurringAudienceList field is set. + */ + boolean hasRecurringAudienceList(); + /** + * + * + *
+   * Output only. The recurring audience list that created this audience list.
+   * Recurring audience lists create audience lists daily.
+   *
+   * If audience lists are created directly, they will have no associated
+   * recurring audience list, and this field will be blank.
+   * 
+ * + * + * optional string recurring_audience_list = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The recurringAudienceList. + */ + java.lang.String getRecurringAudienceList(); + /** + * + * + *
+   * Output only. The recurring audience list that created this audience list.
+   * Recurring audience lists create audience lists daily.
+   *
+   * If audience lists are created directly, they will have no associated
+   * recurring audience list, and this field will be blank.
+   * 
+ * + * + * optional string recurring_audience_list = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for recurringAudienceList. + */ + com.google.protobuf.ByteString getRecurringAudienceListBytes(); } diff --git a/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/CreateRecurringAudienceListRequest.java b/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/CreateRecurringAudienceListRequest.java new file mode 100644 index 000000000000..094b2831d008 --- /dev/null +++ b/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/CreateRecurringAudienceListRequest.java @@ -0,0 +1,958 @@ +/* + * Copyright 2023 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! +// source: google/analytics/data/v1alpha/analytics_data_api.proto + +package com.google.analytics.data.v1alpha; + +/** + * + * + *
+ * A request to create a new recurring audience list.
+ * 
+ * + * Protobuf type {@code google.analytics.data.v1alpha.CreateRecurringAudienceListRequest} + */ +public final class CreateRecurringAudienceListRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.data.v1alpha.CreateRecurringAudienceListRequest) + CreateRecurringAudienceListRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateRecurringAudienceListRequest.newBuilder() to construct. + private CreateRecurringAudienceListRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateRecurringAudienceListRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateRecurringAudienceListRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1alpha.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1alpha_CreateRecurringAudienceListRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1alpha.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1alpha_CreateRecurringAudienceListRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest.class, + com.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The parent resource where this recurring audience list will be
+   * created. Format: `properties/{property}`
+   * 
+ * + * + * 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 recurring audience list will be
+   * created. Format: `properties/{property}`
+   * 
+ * + * + * 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 RECURRING_AUDIENCE_LIST_FIELD_NUMBER = 2; + private com.google.analytics.data.v1alpha.RecurringAudienceList recurringAudienceList_; + /** + * + * + *
+   * Required. The recurring audience list to create.
+   * 
+ * + * + * .google.analytics.data.v1alpha.RecurringAudienceList recurring_audience_list = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the recurringAudienceList field is set. + */ + @java.lang.Override + public boolean hasRecurringAudienceList() { + return recurringAudienceList_ != null; + } + /** + * + * + *
+   * Required. The recurring audience list to create.
+   * 
+ * + * + * .google.analytics.data.v1alpha.RecurringAudienceList recurring_audience_list = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The recurringAudienceList. + */ + @java.lang.Override + public com.google.analytics.data.v1alpha.RecurringAudienceList getRecurringAudienceList() { + return recurringAudienceList_ == null + ? com.google.analytics.data.v1alpha.RecurringAudienceList.getDefaultInstance() + : recurringAudienceList_; + } + /** + * + * + *
+   * Required. The recurring audience list to create.
+   * 
+ * + * + * .google.analytics.data.v1alpha.RecurringAudienceList recurring_audience_list = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.analytics.data.v1alpha.RecurringAudienceListOrBuilder + getRecurringAudienceListOrBuilder() { + return recurringAudienceList_ == null + ? com.google.analytics.data.v1alpha.RecurringAudienceList.getDefaultInstance() + : recurringAudienceList_; + } + + 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.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (recurringAudienceList_ != null) { + output.writeMessage(2, getRecurringAudienceList()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (recurringAudienceList_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, getRecurringAudienceList()); + } + 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.CreateRecurringAudienceListRequest)) { + return super.equals(obj); + } + com.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest other = + (com.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasRecurringAudienceList() != other.hasRecurringAudienceList()) return false; + if (hasRecurringAudienceList()) { + if (!getRecurringAudienceList().equals(other.getRecurringAudienceList())) 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 (hasRecurringAudienceList()) { + hash = (37 * hash) + RECURRING_AUDIENCE_LIST_FIELD_NUMBER; + hash = (53 * hash) + getRecurringAudienceList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest 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.CreateRecurringAudienceListRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest 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.CreateRecurringAudienceListRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest 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.CreateRecurringAudienceListRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.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.CreateRecurringAudienceListRequest 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to create a new recurring audience list.
+   * 
+ * + * Protobuf type {@code google.analytics.data.v1alpha.CreateRecurringAudienceListRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.data.v1alpha.CreateRecurringAudienceListRequest) + com.google.analytics.data.v1alpha.CreateRecurringAudienceListRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1alpha.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1alpha_CreateRecurringAudienceListRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1alpha.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1alpha_CreateRecurringAudienceListRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest.class, + com.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest.Builder.class); + } + + // Construct using + // com.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + recurringAudienceList_ = null; + if (recurringAudienceListBuilder_ != null) { + recurringAudienceListBuilder_.dispose(); + recurringAudienceListBuilder_ = 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_CreateRecurringAudienceListRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest + getDefaultInstanceForType() { + return com.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest build() { + com.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest buildPartial() { + com.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest result = + new com.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.recurringAudienceList_ = + recurringAudienceListBuilder_ == null + ? recurringAudienceList_ + : recurringAudienceListBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest) { + return mergeFrom( + (com.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest other) { + if (other + == com.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasRecurringAudienceList()) { + mergeRecurringAudienceList(other.getRecurringAudienceList()); + } + 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( + getRecurringAudienceListFieldBuilder().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 recurring audience list will be
+     * created. Format: `properties/{property}`
+     * 
+ * + * + * 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 recurring audience list will be
+     * created. Format: `properties/{property}`
+     * 
+ * + * + * 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 recurring audience list will be
+     * created. Format: `properties/{property}`
+     * 
+ * + * + * 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 recurring audience list will be
+     * created. Format: `properties/{property}`
+     * 
+ * + * + * 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 recurring audience list will be
+     * created. Format: `properties/{property}`
+     * 
+ * + * + * 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.analytics.data.v1alpha.RecurringAudienceList recurringAudienceList_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1alpha.RecurringAudienceList, + com.google.analytics.data.v1alpha.RecurringAudienceList.Builder, + com.google.analytics.data.v1alpha.RecurringAudienceListOrBuilder> + recurringAudienceListBuilder_; + /** + * + * + *
+     * Required. The recurring audience list to create.
+     * 
+ * + * + * .google.analytics.data.v1alpha.RecurringAudienceList recurring_audience_list = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the recurringAudienceList field is set. + */ + public boolean hasRecurringAudienceList() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. The recurring audience list to create.
+     * 
+ * + * + * .google.analytics.data.v1alpha.RecurringAudienceList recurring_audience_list = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The recurringAudienceList. + */ + public com.google.analytics.data.v1alpha.RecurringAudienceList getRecurringAudienceList() { + if (recurringAudienceListBuilder_ == null) { + return recurringAudienceList_ == null + ? com.google.analytics.data.v1alpha.RecurringAudienceList.getDefaultInstance() + : recurringAudienceList_; + } else { + return recurringAudienceListBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The recurring audience list to create.
+     * 
+ * + * + * .google.analytics.data.v1alpha.RecurringAudienceList recurring_audience_list = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRecurringAudienceList( + com.google.analytics.data.v1alpha.RecurringAudienceList value) { + if (recurringAudienceListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + recurringAudienceList_ = value; + } else { + recurringAudienceListBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The recurring audience list to create.
+     * 
+ * + * + * .google.analytics.data.v1alpha.RecurringAudienceList recurring_audience_list = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRecurringAudienceList( + com.google.analytics.data.v1alpha.RecurringAudienceList.Builder builderForValue) { + if (recurringAudienceListBuilder_ == null) { + recurringAudienceList_ = builderForValue.build(); + } else { + recurringAudienceListBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The recurring audience list to create.
+     * 
+ * + * + * .google.analytics.data.v1alpha.RecurringAudienceList recurring_audience_list = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeRecurringAudienceList( + com.google.analytics.data.v1alpha.RecurringAudienceList value) { + if (recurringAudienceListBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && recurringAudienceList_ != null + && recurringAudienceList_ + != com.google.analytics.data.v1alpha.RecurringAudienceList.getDefaultInstance()) { + getRecurringAudienceListBuilder().mergeFrom(value); + } else { + recurringAudienceList_ = value; + } + } else { + recurringAudienceListBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The recurring audience list to create.
+     * 
+ * + * + * .google.analytics.data.v1alpha.RecurringAudienceList recurring_audience_list = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearRecurringAudienceList() { + bitField0_ = (bitField0_ & ~0x00000002); + recurringAudienceList_ = null; + if (recurringAudienceListBuilder_ != null) { + recurringAudienceListBuilder_.dispose(); + recurringAudienceListBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The recurring audience list to create.
+     * 
+ * + * + * .google.analytics.data.v1alpha.RecurringAudienceList recurring_audience_list = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.analytics.data.v1alpha.RecurringAudienceList.Builder + getRecurringAudienceListBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getRecurringAudienceListFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The recurring audience list to create.
+     * 
+ * + * + * .google.analytics.data.v1alpha.RecurringAudienceList recurring_audience_list = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.analytics.data.v1alpha.RecurringAudienceListOrBuilder + getRecurringAudienceListOrBuilder() { + if (recurringAudienceListBuilder_ != null) { + return recurringAudienceListBuilder_.getMessageOrBuilder(); + } else { + return recurringAudienceList_ == null + ? com.google.analytics.data.v1alpha.RecurringAudienceList.getDefaultInstance() + : recurringAudienceList_; + } + } + /** + * + * + *
+     * Required. The recurring audience list to create.
+     * 
+ * + * + * .google.analytics.data.v1alpha.RecurringAudienceList recurring_audience_list = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1alpha.RecurringAudienceList, + com.google.analytics.data.v1alpha.RecurringAudienceList.Builder, + com.google.analytics.data.v1alpha.RecurringAudienceListOrBuilder> + getRecurringAudienceListFieldBuilder() { + if (recurringAudienceListBuilder_ == null) { + recurringAudienceListBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1alpha.RecurringAudienceList, + com.google.analytics.data.v1alpha.RecurringAudienceList.Builder, + com.google.analytics.data.v1alpha.RecurringAudienceListOrBuilder>( + getRecurringAudienceList(), getParentForChildren(), isClean()); + recurringAudienceList_ = null; + } + return recurringAudienceListBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.data.v1alpha.CreateRecurringAudienceListRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.data.v1alpha.CreateRecurringAudienceListRequest) + private static final com.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest(); + } + + public static com.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateRecurringAudienceListRequest 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.CreateRecurringAudienceListRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/CreateRecurringAudienceListRequestOrBuilder.java b/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/CreateRecurringAudienceListRequestOrBuilder.java new file mode 100644 index 000000000000..700a05abdcb1 --- /dev/null +++ b/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/CreateRecurringAudienceListRequestOrBuilder.java @@ -0,0 +1,98 @@ +/* + * Copyright 2023 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! +// source: google/analytics/data/v1alpha/analytics_data_api.proto + +package com.google.analytics.data.v1alpha; + +public interface CreateRecurringAudienceListRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.data.v1alpha.CreateRecurringAudienceListRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource where this recurring audience list will be
+   * created. Format: `properties/{property}`
+   * 
+ * + * + * 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 recurring audience list will be
+   * created. Format: `properties/{property}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The recurring audience list to create.
+   * 
+ * + * + * .google.analytics.data.v1alpha.RecurringAudienceList recurring_audience_list = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the recurringAudienceList field is set. + */ + boolean hasRecurringAudienceList(); + /** + * + * + *
+   * Required. The recurring audience list to create.
+   * 
+ * + * + * .google.analytics.data.v1alpha.RecurringAudienceList recurring_audience_list = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The recurringAudienceList. + */ + com.google.analytics.data.v1alpha.RecurringAudienceList getRecurringAudienceList(); + /** + * + * + *
+   * Required. The recurring audience list to create.
+   * 
+ * + * + * .google.analytics.data.v1alpha.RecurringAudienceList recurring_audience_list = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.analytics.data.v1alpha.RecurringAudienceListOrBuilder + getRecurringAudienceListOrBuilder(); +} diff --git a/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/GetRecurringAudienceListRequest.java b/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/GetRecurringAudienceListRequest.java new file mode 100644 index 000000000000..1bc53df95181 --- /dev/null +++ b/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/GetRecurringAudienceListRequest.java @@ -0,0 +1,665 @@ +/* + * Copyright 2023 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! +// source: google/analytics/data/v1alpha/analytics_data_api.proto + +package com.google.analytics.data.v1alpha; + +/** + * + * + *
+ * A request to retrieve configuration metadata about a specific recurring
+ * audience list.
+ * 
+ * + * Protobuf type {@code google.analytics.data.v1alpha.GetRecurringAudienceListRequest} + */ +public final class GetRecurringAudienceListRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.data.v1alpha.GetRecurringAudienceListRequest) + GetRecurringAudienceListRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetRecurringAudienceListRequest.newBuilder() to construct. + private GetRecurringAudienceListRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetRecurringAudienceListRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetRecurringAudienceListRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1alpha.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1alpha_GetRecurringAudienceListRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1alpha.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1alpha_GetRecurringAudienceListRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1alpha.GetRecurringAudienceListRequest.class, + com.google.analytics.data.v1alpha.GetRecurringAudienceListRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The recurring audience list resource name.
+   * Format:
+   * `properties/{property}/recurringAudienceLists/{recurring_audience_list}`
+   * 
+ * + * + * 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 recurring audience list resource name.
+   * Format:
+   * `properties/{property}/recurringAudienceLists/{recurring_audience_list}`
+   * 
+ * + * + * 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.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.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.analytics.data.v1alpha.GetRecurringAudienceListRequest)) { + return super.equals(obj); + } + com.google.analytics.data.v1alpha.GetRecurringAudienceListRequest other = + (com.google.analytics.data.v1alpha.GetRecurringAudienceListRequest) 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.analytics.data.v1alpha.GetRecurringAudienceListRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1alpha.GetRecurringAudienceListRequest 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.GetRecurringAudienceListRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1alpha.GetRecurringAudienceListRequest 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.GetRecurringAudienceListRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1alpha.GetRecurringAudienceListRequest 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.GetRecurringAudienceListRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1alpha.GetRecurringAudienceListRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1alpha.GetRecurringAudienceListRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1alpha.GetRecurringAudienceListRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1alpha.GetRecurringAudienceListRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1alpha.GetRecurringAudienceListRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.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.GetRecurringAudienceListRequest 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to retrieve configuration metadata about a specific recurring
+   * audience list.
+   * 
+ * + * Protobuf type {@code google.analytics.data.v1alpha.GetRecurringAudienceListRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.data.v1alpha.GetRecurringAudienceListRequest) + com.google.analytics.data.v1alpha.GetRecurringAudienceListRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1alpha.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1alpha_GetRecurringAudienceListRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1alpha.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1alpha_GetRecurringAudienceListRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1alpha.GetRecurringAudienceListRequest.class, + com.google.analytics.data.v1alpha.GetRecurringAudienceListRequest.Builder.class); + } + + // Construct using + // com.google.analytics.data.v1alpha.GetRecurringAudienceListRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.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.analytics.data.v1alpha.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1alpha_GetRecurringAudienceListRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.data.v1alpha.GetRecurringAudienceListRequest + getDefaultInstanceForType() { + return com.google.analytics.data.v1alpha.GetRecurringAudienceListRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.data.v1alpha.GetRecurringAudienceListRequest build() { + com.google.analytics.data.v1alpha.GetRecurringAudienceListRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.data.v1alpha.GetRecurringAudienceListRequest buildPartial() { + com.google.analytics.data.v1alpha.GetRecurringAudienceListRequest result = + new com.google.analytics.data.v1alpha.GetRecurringAudienceListRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.analytics.data.v1alpha.GetRecurringAudienceListRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.data.v1alpha.GetRecurringAudienceListRequest) { + return mergeFrom((com.google.analytics.data.v1alpha.GetRecurringAudienceListRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.analytics.data.v1alpha.GetRecurringAudienceListRequest other) { + if (other + == com.google.analytics.data.v1alpha.GetRecurringAudienceListRequest.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 recurring audience list resource name.
+     * Format:
+     * `properties/{property}/recurringAudienceLists/{recurring_audience_list}`
+     * 
+ * + * + * 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 recurring audience list resource name.
+     * Format:
+     * `properties/{property}/recurringAudienceLists/{recurring_audience_list}`
+     * 
+ * + * + * 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 recurring audience list resource name.
+     * Format:
+     * `properties/{property}/recurringAudienceLists/{recurring_audience_list}`
+     * 
+ * + * + * 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 recurring audience list resource name.
+     * Format:
+     * `properties/{property}/recurringAudienceLists/{recurring_audience_list}`
+     * 
+ * + * + * 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 recurring audience list resource name.
+     * Format:
+     * `properties/{property}/recurringAudienceLists/{recurring_audience_list}`
+     * 
+ * + * + * 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; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.data.v1alpha.GetRecurringAudienceListRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.data.v1alpha.GetRecurringAudienceListRequest) + private static final com.google.analytics.data.v1alpha.GetRecurringAudienceListRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.data.v1alpha.GetRecurringAudienceListRequest(); + } + + public static com.google.analytics.data.v1alpha.GetRecurringAudienceListRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetRecurringAudienceListRequest 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.GetRecurringAudienceListRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/GetRecurringAudienceListRequestOrBuilder.java b/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/GetRecurringAudienceListRequestOrBuilder.java new file mode 100644 index 000000000000..21d4af0b529d --- /dev/null +++ b/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/GetRecurringAudienceListRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2023 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! +// source: google/analytics/data/v1alpha/analytics_data_api.proto + +package com.google.analytics.data.v1alpha; + +public interface GetRecurringAudienceListRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.data.v1alpha.GetRecurringAudienceListRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The recurring audience list resource name.
+   * Format:
+   * `properties/{property}/recurringAudienceLists/{recurring_audience_list}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The recurring audience list resource name.
+   * Format:
+   * `properties/{property}/recurringAudienceLists/{recurring_audience_list}`
+   * 
+ * + * + * 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-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/ListRecurringAudienceListsRequest.java b/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/ListRecurringAudienceListsRequest.java new file mode 100644 index 000000000000..bd15d664871a --- /dev/null +++ b/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/ListRecurringAudienceListsRequest.java @@ -0,0 +1,987 @@ +/* + * Copyright 2023 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! +// source: google/analytics/data/v1alpha/analytics_data_api.proto + +package com.google.analytics.data.v1alpha; + +/** + * + * + *
+ * A request to list all recurring audience lists for a property.
+ * 
+ * + * Protobuf type {@code google.analytics.data.v1alpha.ListRecurringAudienceListsRequest} + */ +public final class ListRecurringAudienceListsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.data.v1alpha.ListRecurringAudienceListsRequest) + ListRecurringAudienceListsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListRecurringAudienceListsRequest.newBuilder() to construct. + private ListRecurringAudienceListsRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListRecurringAudienceListsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListRecurringAudienceListsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1alpha.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1alpha_ListRecurringAudienceListsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1alpha.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1alpha_ListRecurringAudienceListsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest.class, + com.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. All recurring audience lists for this property will be listed in
+   * the response. Format: `properties/{property}`
+   * 
+ * + * + * 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. All recurring audience lists for this property will be listed in
+   * the response. Format: `properties/{property}`
+   * 
+ * + * + * 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 recurring audience lists to return. The
+   * service may return fewer than this value. If unspecified, at most 200
+   * recurring audience lists will be returned. The maximum value is 1000
+   * (higher values will be coerced to the maximum).
+   * 
+ * + * 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
+   * `ListRecurringAudienceLists` call. Provide this to retrieve the subsequent
+   * page.
+   *
+   * When paginating, all other parameters provided to
+   * `ListRecurringAudienceLists` 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
+   * `ListRecurringAudienceLists` call. Provide this to retrieve the subsequent
+   * page.
+   *
+   * When paginating, all other parameters provided to
+   * `ListRecurringAudienceLists` 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.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.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.analytics.data.v1alpha.ListRecurringAudienceListsRequest)) { + return super.equals(obj); + } + com.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest other = + (com.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest) 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.analytics.data.v1alpha.ListRecurringAudienceListsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest 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.ListRecurringAudienceListsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest 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.ListRecurringAudienceListsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest 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.ListRecurringAudienceListsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.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.ListRecurringAudienceListsRequest 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to list all recurring audience lists for a property.
+   * 
+ * + * Protobuf type {@code google.analytics.data.v1alpha.ListRecurringAudienceListsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.data.v1alpha.ListRecurringAudienceListsRequest) + com.google.analytics.data.v1alpha.ListRecurringAudienceListsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1alpha.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1alpha_ListRecurringAudienceListsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1alpha.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1alpha_ListRecurringAudienceListsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest.class, + com.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest.Builder.class); + } + + // Construct using + // com.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.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.analytics.data.v1alpha.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1alpha_ListRecurringAudienceListsRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest + getDefaultInstanceForType() { + return com.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest build() { + com.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest buildPartial() { + com.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest result = + new com.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest 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 clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest) { + return mergeFrom( + (com.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest other) { + if (other + == com.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest + .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. All recurring audience lists for this property will be listed in
+     * the response. Format: `properties/{property}`
+     * 
+ * + * + * 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. All recurring audience lists for this property will be listed in
+     * the response. Format: `properties/{property}`
+     * 
+ * + * + * 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. All recurring audience lists for this property will be listed in
+     * the response. Format: `properties/{property}`
+     * 
+ * + * + * 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. All recurring audience lists for this property will be listed in
+     * the response. Format: `properties/{property}`
+     * 
+ * + * + * 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. All recurring audience lists for this property will be listed in
+     * the response. Format: `properties/{property}`
+     * 
+ * + * + * 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 recurring audience lists to return. The
+     * service may return fewer than this value. If unspecified, at most 200
+     * recurring audience lists will be returned. The maximum value is 1000
+     * (higher values will be coerced to the maximum).
+     * 
+ * + * 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 recurring audience lists to return. The
+     * service may return fewer than this value. If unspecified, at most 200
+     * recurring audience lists will be returned. The maximum value is 1000
+     * (higher values will be coerced to the maximum).
+     * 
+ * + * 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 recurring audience lists to return. The
+     * service may return fewer than this value. If unspecified, at most 200
+     * recurring audience lists will be returned. The maximum value is 1000
+     * (higher values will be coerced to the maximum).
+     * 
+ * + * 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
+     * `ListRecurringAudienceLists` call. Provide this to retrieve the subsequent
+     * page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListRecurringAudienceLists` 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
+     * `ListRecurringAudienceLists` call. Provide this to retrieve the subsequent
+     * page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListRecurringAudienceLists` 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
+     * `ListRecurringAudienceLists` call. Provide this to retrieve the subsequent
+     * page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListRecurringAudienceLists` 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
+     * `ListRecurringAudienceLists` call. Provide this to retrieve the subsequent
+     * page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListRecurringAudienceLists` 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
+     * `ListRecurringAudienceLists` call. Provide this to retrieve the subsequent
+     * page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListRecurringAudienceLists` 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; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.data.v1alpha.ListRecurringAudienceListsRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.data.v1alpha.ListRecurringAudienceListsRequest) + private static final com.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest(); + } + + public static com.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListRecurringAudienceListsRequest 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.ListRecurringAudienceListsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/ListRecurringAudienceListsRequestOrBuilder.java b/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/ListRecurringAudienceListsRequestOrBuilder.java new file mode 100644 index 000000000000..397a0b66fb71 --- /dev/null +++ b/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/ListRecurringAudienceListsRequestOrBuilder.java @@ -0,0 +1,109 @@ +/* + * Copyright 2023 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! +// source: google/analytics/data/v1alpha/analytics_data_api.proto + +package com.google.analytics.data.v1alpha; + +public interface ListRecurringAudienceListsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.data.v1alpha.ListRecurringAudienceListsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. All recurring audience lists for this property will be listed in
+   * the response. Format: `properties/{property}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. All recurring audience lists for this property will be listed in
+   * the response. Format: `properties/{property}`
+   * 
+ * + * + * 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 recurring audience lists to return. The
+   * service may return fewer than this value. If unspecified, at most 200
+   * recurring audience lists will be returned. The maximum value is 1000
+   * (higher values will be coerced to the maximum).
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `ListRecurringAudienceLists` call. Provide this to retrieve the subsequent
+   * page.
+   *
+   * When paginating, all other parameters provided to
+   * `ListRecurringAudienceLists` 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
+   * `ListRecurringAudienceLists` call. Provide this to retrieve the subsequent
+   * page.
+   *
+   * When paginating, all other parameters provided to
+   * `ListRecurringAudienceLists` 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-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/ListRecurringAudienceListsResponse.java b/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/ListRecurringAudienceListsResponse.java new file mode 100644 index 000000000000..11c9cb9f0978 --- /dev/null +++ b/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/ListRecurringAudienceListsResponse.java @@ -0,0 +1,1251 @@ +/* + * Copyright 2023 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! +// source: google/analytics/data/v1alpha/analytics_data_api.proto + +package com.google.analytics.data.v1alpha; + +/** + * + * + *
+ * A list of all recurring audience lists for a property.
+ * 
+ * + * Protobuf type {@code google.analytics.data.v1alpha.ListRecurringAudienceListsResponse} + */ +public final class ListRecurringAudienceListsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.data.v1alpha.ListRecurringAudienceListsResponse) + ListRecurringAudienceListsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListRecurringAudienceListsResponse.newBuilder() to construct. + private ListRecurringAudienceListsResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListRecurringAudienceListsResponse() { + recurringAudienceLists_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListRecurringAudienceListsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1alpha.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1alpha_ListRecurringAudienceListsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1alpha.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1alpha_ListRecurringAudienceListsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1alpha.ListRecurringAudienceListsResponse.class, + com.google.analytics.data.v1alpha.ListRecurringAudienceListsResponse.Builder.class); + } + + private int bitField0_; + public static final int RECURRING_AUDIENCE_LISTS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List + recurringAudienceLists_; + /** + * + * + *
+   * Each recurring audience list for a property.
+   * 
+ * + * + * repeated .google.analytics.data.v1alpha.RecurringAudienceList recurring_audience_lists = 1; + * + */ + @java.lang.Override + public java.util.List + getRecurringAudienceListsList() { + return recurringAudienceLists_; + } + /** + * + * + *
+   * Each recurring audience list for a property.
+   * 
+ * + * + * repeated .google.analytics.data.v1alpha.RecurringAudienceList recurring_audience_lists = 1; + * + */ + @java.lang.Override + public java.util.List + getRecurringAudienceListsOrBuilderList() { + return recurringAudienceLists_; + } + /** + * + * + *
+   * Each recurring audience list for a property.
+   * 
+ * + * + * repeated .google.analytics.data.v1alpha.RecurringAudienceList recurring_audience_lists = 1; + * + */ + @java.lang.Override + public int getRecurringAudienceListsCount() { + return recurringAudienceLists_.size(); + } + /** + * + * + *
+   * Each recurring audience list for a property.
+   * 
+ * + * + * repeated .google.analytics.data.v1alpha.RecurringAudienceList recurring_audience_lists = 1; + * + */ + @java.lang.Override + public com.google.analytics.data.v1alpha.RecurringAudienceList getRecurringAudienceLists( + int index) { + return recurringAudienceLists_.get(index); + } + /** + * + * + *
+   * Each recurring audience list for a property.
+   * 
+ * + * + * repeated .google.analytics.data.v1alpha.RecurringAudienceList recurring_audience_lists = 1; + * + */ + @java.lang.Override + public com.google.analytics.data.v1alpha.RecurringAudienceListOrBuilder + getRecurringAudienceListsOrBuilder(int index) { + return recurringAudienceLists_.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.
+   * 
+ * + * optional string next_page_token = 2; + * + * @return Whether the nextPageToken field is set. + */ + @java.lang.Override + public boolean hasNextPageToken() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * optional 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.
+   * 
+ * + * optional 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 < recurringAudienceLists_.size(); i++) { + output.writeMessage(1, recurringAudienceLists_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + com.google.protobuf.GeneratedMessageV3.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 < recurringAudienceLists_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, recurringAudienceLists_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.GeneratedMessageV3.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.analytics.data.v1alpha.ListRecurringAudienceListsResponse)) { + return super.equals(obj); + } + com.google.analytics.data.v1alpha.ListRecurringAudienceListsResponse other = + (com.google.analytics.data.v1alpha.ListRecurringAudienceListsResponse) obj; + + if (!getRecurringAudienceListsList().equals(other.getRecurringAudienceListsList())) + return false; + if (hasNextPageToken() != other.hasNextPageToken()) return false; + if (hasNextPageToken()) { + 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 (getRecurringAudienceListsCount() > 0) { + hash = (37 * hash) + RECURRING_AUDIENCE_LISTS_FIELD_NUMBER; + hash = (53 * hash) + getRecurringAudienceListsList().hashCode(); + } + if (hasNextPageToken()) { + 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.analytics.data.v1alpha.ListRecurringAudienceListsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1alpha.ListRecurringAudienceListsResponse 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.ListRecurringAudienceListsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1alpha.ListRecurringAudienceListsResponse 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.ListRecurringAudienceListsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1alpha.ListRecurringAudienceListsResponse 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.ListRecurringAudienceListsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1alpha.ListRecurringAudienceListsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1alpha.ListRecurringAudienceListsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1alpha.ListRecurringAudienceListsResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1alpha.ListRecurringAudienceListsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1alpha.ListRecurringAudienceListsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.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.ListRecurringAudienceListsResponse 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A list of all recurring audience lists for a property.
+   * 
+ * + * Protobuf type {@code google.analytics.data.v1alpha.ListRecurringAudienceListsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.data.v1alpha.ListRecurringAudienceListsResponse) + com.google.analytics.data.v1alpha.ListRecurringAudienceListsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1alpha.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1alpha_ListRecurringAudienceListsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1alpha.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1alpha_ListRecurringAudienceListsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1alpha.ListRecurringAudienceListsResponse.class, + com.google.analytics.data.v1alpha.ListRecurringAudienceListsResponse.Builder.class); + } + + // Construct using + // com.google.analytics.data.v1alpha.ListRecurringAudienceListsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (recurringAudienceListsBuilder_ == null) { + recurringAudienceLists_ = java.util.Collections.emptyList(); + } else { + recurringAudienceLists_ = null; + recurringAudienceListsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + 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_ListRecurringAudienceListsResponse_descriptor; + } + + @java.lang.Override + public com.google.analytics.data.v1alpha.ListRecurringAudienceListsResponse + getDefaultInstanceForType() { + return com.google.analytics.data.v1alpha.ListRecurringAudienceListsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.data.v1alpha.ListRecurringAudienceListsResponse build() { + com.google.analytics.data.v1alpha.ListRecurringAudienceListsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.data.v1alpha.ListRecurringAudienceListsResponse buildPartial() { + com.google.analytics.data.v1alpha.ListRecurringAudienceListsResponse result = + new com.google.analytics.data.v1alpha.ListRecurringAudienceListsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.analytics.data.v1alpha.ListRecurringAudienceListsResponse result) { + if (recurringAudienceListsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + recurringAudienceLists_ = java.util.Collections.unmodifiableList(recurringAudienceLists_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.recurringAudienceLists_ = recurringAudienceLists_; + } else { + result.recurringAudienceLists_ = recurringAudienceListsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.analytics.data.v1alpha.ListRecurringAudienceListsResponse result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.data.v1alpha.ListRecurringAudienceListsResponse) { + return mergeFrom( + (com.google.analytics.data.v1alpha.ListRecurringAudienceListsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.analytics.data.v1alpha.ListRecurringAudienceListsResponse other) { + if (other + == com.google.analytics.data.v1alpha.ListRecurringAudienceListsResponse + .getDefaultInstance()) return this; + if (recurringAudienceListsBuilder_ == null) { + if (!other.recurringAudienceLists_.isEmpty()) { + if (recurringAudienceLists_.isEmpty()) { + recurringAudienceLists_ = other.recurringAudienceLists_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRecurringAudienceListsIsMutable(); + recurringAudienceLists_.addAll(other.recurringAudienceLists_); + } + onChanged(); + } + } else { + if (!other.recurringAudienceLists_.isEmpty()) { + if (recurringAudienceListsBuilder_.isEmpty()) { + recurringAudienceListsBuilder_.dispose(); + recurringAudienceListsBuilder_ = null; + recurringAudienceLists_ = other.recurringAudienceLists_; + bitField0_ = (bitField0_ & ~0x00000001); + recurringAudienceListsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRecurringAudienceListsFieldBuilder() + : null; + } else { + recurringAudienceListsBuilder_.addAllMessages(other.recurringAudienceLists_); + } + } + } + if (other.hasNextPageToken()) { + 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.analytics.data.v1alpha.RecurringAudienceList m = + input.readMessage( + com.google.analytics.data.v1alpha.RecurringAudienceList.parser(), + extensionRegistry); + if (recurringAudienceListsBuilder_ == null) { + ensureRecurringAudienceListsIsMutable(); + recurringAudienceLists_.add(m); + } else { + recurringAudienceListsBuilder_.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 + recurringAudienceLists_ = java.util.Collections.emptyList(); + + private void ensureRecurringAudienceListsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + recurringAudienceLists_ = + new java.util.ArrayList( + recurringAudienceLists_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1alpha.RecurringAudienceList, + com.google.analytics.data.v1alpha.RecurringAudienceList.Builder, + com.google.analytics.data.v1alpha.RecurringAudienceListOrBuilder> + recurringAudienceListsBuilder_; + + /** + * + * + *
+     * Each recurring audience list for a property.
+     * 
+ * + * + * repeated .google.analytics.data.v1alpha.RecurringAudienceList recurring_audience_lists = 1; + * + */ + public java.util.List + getRecurringAudienceListsList() { + if (recurringAudienceListsBuilder_ == null) { + return java.util.Collections.unmodifiableList(recurringAudienceLists_); + } else { + return recurringAudienceListsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Each recurring audience list for a property.
+     * 
+ * + * + * repeated .google.analytics.data.v1alpha.RecurringAudienceList recurring_audience_lists = 1; + * + */ + public int getRecurringAudienceListsCount() { + if (recurringAudienceListsBuilder_ == null) { + return recurringAudienceLists_.size(); + } else { + return recurringAudienceListsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Each recurring audience list for a property.
+     * 
+ * + * + * repeated .google.analytics.data.v1alpha.RecurringAudienceList recurring_audience_lists = 1; + * + */ + public com.google.analytics.data.v1alpha.RecurringAudienceList getRecurringAudienceLists( + int index) { + if (recurringAudienceListsBuilder_ == null) { + return recurringAudienceLists_.get(index); + } else { + return recurringAudienceListsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Each recurring audience list for a property.
+     * 
+ * + * + * repeated .google.analytics.data.v1alpha.RecurringAudienceList recurring_audience_lists = 1; + * + */ + public Builder setRecurringAudienceLists( + int index, com.google.analytics.data.v1alpha.RecurringAudienceList value) { + if (recurringAudienceListsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRecurringAudienceListsIsMutable(); + recurringAudienceLists_.set(index, value); + onChanged(); + } else { + recurringAudienceListsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Each recurring audience list for a property.
+     * 
+ * + * + * repeated .google.analytics.data.v1alpha.RecurringAudienceList recurring_audience_lists = 1; + * + */ + public Builder setRecurringAudienceLists( + int index, + com.google.analytics.data.v1alpha.RecurringAudienceList.Builder builderForValue) { + if (recurringAudienceListsBuilder_ == null) { + ensureRecurringAudienceListsIsMutable(); + recurringAudienceLists_.set(index, builderForValue.build()); + onChanged(); + } else { + recurringAudienceListsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Each recurring audience list for a property.
+     * 
+ * + * + * repeated .google.analytics.data.v1alpha.RecurringAudienceList recurring_audience_lists = 1; + * + */ + public Builder addRecurringAudienceLists( + com.google.analytics.data.v1alpha.RecurringAudienceList value) { + if (recurringAudienceListsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRecurringAudienceListsIsMutable(); + recurringAudienceLists_.add(value); + onChanged(); + } else { + recurringAudienceListsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Each recurring audience list for a property.
+     * 
+ * + * + * repeated .google.analytics.data.v1alpha.RecurringAudienceList recurring_audience_lists = 1; + * + */ + public Builder addRecurringAudienceLists( + int index, com.google.analytics.data.v1alpha.RecurringAudienceList value) { + if (recurringAudienceListsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRecurringAudienceListsIsMutable(); + recurringAudienceLists_.add(index, value); + onChanged(); + } else { + recurringAudienceListsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Each recurring audience list for a property.
+     * 
+ * + * + * repeated .google.analytics.data.v1alpha.RecurringAudienceList recurring_audience_lists = 1; + * + */ + public Builder addRecurringAudienceLists( + com.google.analytics.data.v1alpha.RecurringAudienceList.Builder builderForValue) { + if (recurringAudienceListsBuilder_ == null) { + ensureRecurringAudienceListsIsMutable(); + recurringAudienceLists_.add(builderForValue.build()); + onChanged(); + } else { + recurringAudienceListsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Each recurring audience list for a property.
+     * 
+ * + * + * repeated .google.analytics.data.v1alpha.RecurringAudienceList recurring_audience_lists = 1; + * + */ + public Builder addRecurringAudienceLists( + int index, + com.google.analytics.data.v1alpha.RecurringAudienceList.Builder builderForValue) { + if (recurringAudienceListsBuilder_ == null) { + ensureRecurringAudienceListsIsMutable(); + recurringAudienceLists_.add(index, builderForValue.build()); + onChanged(); + } else { + recurringAudienceListsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Each recurring audience list for a property.
+     * 
+ * + * + * repeated .google.analytics.data.v1alpha.RecurringAudienceList recurring_audience_lists = 1; + * + */ + public Builder addAllRecurringAudienceLists( + java.lang.Iterable + values) { + if (recurringAudienceListsBuilder_ == null) { + ensureRecurringAudienceListsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, recurringAudienceLists_); + onChanged(); + } else { + recurringAudienceListsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Each recurring audience list for a property.
+     * 
+ * + * + * repeated .google.analytics.data.v1alpha.RecurringAudienceList recurring_audience_lists = 1; + * + */ + public Builder clearRecurringAudienceLists() { + if (recurringAudienceListsBuilder_ == null) { + recurringAudienceLists_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + recurringAudienceListsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Each recurring audience list for a property.
+     * 
+ * + * + * repeated .google.analytics.data.v1alpha.RecurringAudienceList recurring_audience_lists = 1; + * + */ + public Builder removeRecurringAudienceLists(int index) { + if (recurringAudienceListsBuilder_ == null) { + ensureRecurringAudienceListsIsMutable(); + recurringAudienceLists_.remove(index); + onChanged(); + } else { + recurringAudienceListsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Each recurring audience list for a property.
+     * 
+ * + * + * repeated .google.analytics.data.v1alpha.RecurringAudienceList recurring_audience_lists = 1; + * + */ + public com.google.analytics.data.v1alpha.RecurringAudienceList.Builder + getRecurringAudienceListsBuilder(int index) { + return getRecurringAudienceListsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Each recurring audience list for a property.
+     * 
+ * + * + * repeated .google.analytics.data.v1alpha.RecurringAudienceList recurring_audience_lists = 1; + * + */ + public com.google.analytics.data.v1alpha.RecurringAudienceListOrBuilder + getRecurringAudienceListsOrBuilder(int index) { + if (recurringAudienceListsBuilder_ == null) { + return recurringAudienceLists_.get(index); + } else { + return recurringAudienceListsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Each recurring audience list for a property.
+     * 
+ * + * + * repeated .google.analytics.data.v1alpha.RecurringAudienceList recurring_audience_lists = 1; + * + */ + public java.util.List< + ? extends com.google.analytics.data.v1alpha.RecurringAudienceListOrBuilder> + getRecurringAudienceListsOrBuilderList() { + if (recurringAudienceListsBuilder_ != null) { + return recurringAudienceListsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(recurringAudienceLists_); + } + } + /** + * + * + *
+     * Each recurring audience list for a property.
+     * 
+ * + * + * repeated .google.analytics.data.v1alpha.RecurringAudienceList recurring_audience_lists = 1; + * + */ + public com.google.analytics.data.v1alpha.RecurringAudienceList.Builder + addRecurringAudienceListsBuilder() { + return getRecurringAudienceListsFieldBuilder() + .addBuilder(com.google.analytics.data.v1alpha.RecurringAudienceList.getDefaultInstance()); + } + /** + * + * + *
+     * Each recurring audience list for a property.
+     * 
+ * + * + * repeated .google.analytics.data.v1alpha.RecurringAudienceList recurring_audience_lists = 1; + * + */ + public com.google.analytics.data.v1alpha.RecurringAudienceList.Builder + addRecurringAudienceListsBuilder(int index) { + return getRecurringAudienceListsFieldBuilder() + .addBuilder( + index, com.google.analytics.data.v1alpha.RecurringAudienceList.getDefaultInstance()); + } + /** + * + * + *
+     * Each recurring audience list for a property.
+     * 
+ * + * + * repeated .google.analytics.data.v1alpha.RecurringAudienceList recurring_audience_lists = 1; + * + */ + public java.util.List + getRecurringAudienceListsBuilderList() { + return getRecurringAudienceListsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1alpha.RecurringAudienceList, + com.google.analytics.data.v1alpha.RecurringAudienceList.Builder, + com.google.analytics.data.v1alpha.RecurringAudienceListOrBuilder> + getRecurringAudienceListsFieldBuilder() { + if (recurringAudienceListsBuilder_ == null) { + recurringAudienceListsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1alpha.RecurringAudienceList, + com.google.analytics.data.v1alpha.RecurringAudienceList.Builder, + com.google.analytics.data.v1alpha.RecurringAudienceListOrBuilder>( + recurringAudienceLists_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + recurringAudienceLists_ = null; + } + return recurringAudienceListsBuilder_; + } + + 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.
+     * 
+ * + * optional string next_page_token = 2; + * + * @return Whether the nextPageToken field is set. + */ + public boolean hasNextPageToken() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * optional 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.
+     * 
+ * + * optional 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.
+     * 
+ * + * optional 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.
+     * 
+ * + * optional 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.
+     * 
+ * + * optional 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; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.data.v1alpha.ListRecurringAudienceListsResponse) + } + + // @@protoc_insertion_point(class_scope:google.analytics.data.v1alpha.ListRecurringAudienceListsResponse) + private static final com.google.analytics.data.v1alpha.ListRecurringAudienceListsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.data.v1alpha.ListRecurringAudienceListsResponse(); + } + + public static com.google.analytics.data.v1alpha.ListRecurringAudienceListsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListRecurringAudienceListsResponse 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.ListRecurringAudienceListsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/ListRecurringAudienceListsResponseOrBuilder.java b/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/ListRecurringAudienceListsResponseOrBuilder.java new file mode 100644 index 000000000000..2440b155675f --- /dev/null +++ b/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/ListRecurringAudienceListsResponseOrBuilder.java @@ -0,0 +1,129 @@ +/* + * Copyright 2023 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! +// source: google/analytics/data/v1alpha/analytics_data_api.proto + +package com.google.analytics.data.v1alpha; + +public interface ListRecurringAudienceListsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.data.v1alpha.ListRecurringAudienceListsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Each recurring audience list for a property.
+   * 
+ * + * + * repeated .google.analytics.data.v1alpha.RecurringAudienceList recurring_audience_lists = 1; + * + */ + java.util.List + getRecurringAudienceListsList(); + /** + * + * + *
+   * Each recurring audience list for a property.
+   * 
+ * + * + * repeated .google.analytics.data.v1alpha.RecurringAudienceList recurring_audience_lists = 1; + * + */ + com.google.analytics.data.v1alpha.RecurringAudienceList getRecurringAudienceLists(int index); + /** + * + * + *
+   * Each recurring audience list for a property.
+   * 
+ * + * + * repeated .google.analytics.data.v1alpha.RecurringAudienceList recurring_audience_lists = 1; + * + */ + int getRecurringAudienceListsCount(); + /** + * + * + *
+   * Each recurring audience list for a property.
+   * 
+ * + * + * repeated .google.analytics.data.v1alpha.RecurringAudienceList recurring_audience_lists = 1; + * + */ + java.util.List + getRecurringAudienceListsOrBuilderList(); + /** + * + * + *
+   * Each recurring audience list for a property.
+   * 
+ * + * + * repeated .google.analytics.data.v1alpha.RecurringAudienceList recurring_audience_lists = 1; + * + */ + com.google.analytics.data.v1alpha.RecurringAudienceListOrBuilder + getRecurringAudienceListsOrBuilder(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.
+   * 
+ * + * optional string next_page_token = 2; + * + * @return Whether the nextPageToken field is set. + */ + boolean hasNextPageToken(); + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * optional 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.
+   * 
+ * + * optional string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/RecurringAudienceList.java b/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/RecurringAudienceList.java new file mode 100644 index 000000000000..3aa1c49f4213 --- /dev/null +++ b/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/RecurringAudienceList.java @@ -0,0 +1,2173 @@ +/* + * Copyright 2023 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! +// source: google/analytics/data/v1alpha/analytics_data_api.proto + +package com.google.analytics.data.v1alpha; + +/** + * + * + *
+ * A recurring audience list produces new audience lists each day. Audience
+ * lists are users in an audience at the time of the list's creation. A
+ * recurring audience list ensures that you have audience list based on the most
+ * recent data available for use each day.
+ * 
+ * + * Protobuf type {@code google.analytics.data.v1alpha.RecurringAudienceList} + */ +public final class RecurringAudienceList extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.data.v1alpha.RecurringAudienceList) + RecurringAudienceListOrBuilder { + private static final long serialVersionUID = 0L; + // Use RecurringAudienceList.newBuilder() to construct. + private RecurringAudienceList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RecurringAudienceList() { + name_ = ""; + audience_ = ""; + audienceDisplayName_ = ""; + dimensions_ = java.util.Collections.emptyList(); + audienceLists_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RecurringAudienceList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1alpha.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1alpha_RecurringAudienceList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1alpha.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1alpha_RecurringAudienceList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1alpha.RecurringAudienceList.class, + com.google.analytics.data.v1alpha.RecurringAudienceList.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Output only. Identifier. The recurring audience list resource name assigned
+   * during creation. This resource name identifies this
+   * `RecurringAudienceList`.
+   *
+   * Format:
+   * `properties/{property}/recurringAudienceLists/{recurring_audience_list}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @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; + } + } + /** + * + * + *
+   * Output only. Identifier. The recurring audience list resource name assigned
+   * during creation. This resource name identifies this
+   * `RecurringAudienceList`.
+   *
+   * Format:
+   * `properties/{property}/recurringAudienceLists/{recurring_audience_list}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @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 AUDIENCE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object audience_ = ""; + /** + * + * + *
+   * Required. The audience resource name. This resource name identifies the
+   * audience being listed and is shared between the Analytics Data & Admin
+   * APIs.
+   *
+   * Format: `properties/{property}/audiences/{audience}`
+   * 
+ * + * string audience = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The audience. + */ + @java.lang.Override + public java.lang.String getAudience() { + java.lang.Object ref = audience_; + 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(); + audience_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The audience resource name. This resource name identifies the
+   * audience being listed and is shared between the Analytics Data & Admin
+   * APIs.
+   *
+   * Format: `properties/{property}/audiences/{audience}`
+   * 
+ * + * string audience = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for audience. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAudienceBytes() { + java.lang.Object ref = audience_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + audience_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AUDIENCE_DISPLAY_NAME_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object audienceDisplayName_ = ""; + /** + * + * + *
+   * Output only. The descriptive display name for this audience. For example,
+   * "Purchasers".
+   * 
+ * + * string audience_display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The audienceDisplayName. + */ + @java.lang.Override + public java.lang.String getAudienceDisplayName() { + java.lang.Object ref = audienceDisplayName_; + 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(); + audienceDisplayName_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The descriptive display name for this audience. For example,
+   * "Purchasers".
+   * 
+ * + * string audience_display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for audienceDisplayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAudienceDisplayNameBytes() { + java.lang.Object ref = audienceDisplayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + audienceDisplayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DIMENSIONS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List dimensions_; + /** + * + * + *
+   * Required. The dimensions requested and displayed in the audience list
+   * response.
+   * 
+ * + * + * repeated .google.analytics.data.v1alpha.AudienceDimension dimensions = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List getDimensionsList() { + return dimensions_; + } + /** + * + * + *
+   * Required. The dimensions requested and displayed in the audience list
+   * response.
+   * 
+ * + * + * repeated .google.analytics.data.v1alpha.AudienceDimension dimensions = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getDimensionsOrBuilderList() { + return dimensions_; + } + /** + * + * + *
+   * Required. The dimensions requested and displayed in the audience list
+   * response.
+   * 
+ * + * + * repeated .google.analytics.data.v1alpha.AudienceDimension dimensions = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getDimensionsCount() { + return dimensions_.size(); + } + /** + * + * + *
+   * Required. The dimensions requested and displayed in the audience list
+   * response.
+   * 
+ * + * + * repeated .google.analytics.data.v1alpha.AudienceDimension dimensions = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.analytics.data.v1alpha.AudienceDimension getDimensions(int index) { + return dimensions_.get(index); + } + /** + * + * + *
+   * Required. The dimensions requested and displayed in the audience list
+   * response.
+   * 
+ * + * + * repeated .google.analytics.data.v1alpha.AudienceDimension dimensions = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.analytics.data.v1alpha.AudienceDimensionOrBuilder getDimensionsOrBuilder( + int index) { + return dimensions_.get(index); + } + + public static final int ACTIVE_DAYS_REMAINING_FIELD_NUMBER = 5; + private int activeDaysRemaining_ = 0; + /** + * + * + *
+   * Optional. The number of remaining days that a recurring audience export
+   * will produce an audience list instance. This counter decreases by one each
+   * day, and when it reaches zero, no new audience lists will be created.
+   *
+   * Recurring audience list request for Analytics 360 properties default to 180
+   * days and have a maximum of 365 days. Requests for standard Analytics
+   * properties default to 14 days and have a maximum of 30 days.
+   *
+   * The minimum value allowed during creation is 1. Requests above their
+   * respective maximum will be coerced to their maximum.
+   * 
+ * + * optional int32 active_days_remaining = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the activeDaysRemaining field is set. + */ + @java.lang.Override + public boolean hasActiveDaysRemaining() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Optional. The number of remaining days that a recurring audience export
+   * will produce an audience list instance. This counter decreases by one each
+   * day, and when it reaches zero, no new audience lists will be created.
+   *
+   * Recurring audience list request for Analytics 360 properties default to 180
+   * days and have a maximum of 365 days. Requests for standard Analytics
+   * properties default to 14 days and have a maximum of 30 days.
+   *
+   * The minimum value allowed during creation is 1. Requests above their
+   * respective maximum will be coerced to their maximum.
+   * 
+ * + * optional int32 active_days_remaining = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The activeDaysRemaining. + */ + @java.lang.Override + public int getActiveDaysRemaining() { + return activeDaysRemaining_; + } + + public static final int AUDIENCE_LISTS_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList audienceLists_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Output only. Audience list resource names for audience list instances
+   * created for this recurring audience list. One audience list is created for
+   * each day, and the audience list will be listed here.
+   *
+   * This list is ordered with the most recently created audience list first.
+   * 
+ * + * repeated string audience_lists = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return A list containing the audienceLists. + */ + public com.google.protobuf.ProtocolStringList getAudienceListsList() { + return audienceLists_; + } + /** + * + * + *
+   * Output only. Audience list resource names for audience list instances
+   * created for this recurring audience list. One audience list is created for
+   * each day, and the audience list will be listed here.
+   *
+   * This list is ordered with the most recently created audience list first.
+   * 
+ * + * repeated string audience_lists = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count of audienceLists. + */ + public int getAudienceListsCount() { + return audienceLists_.size(); + } + /** + * + * + *
+   * Output only. Audience list resource names for audience list instances
+   * created for this recurring audience list. One audience list is created for
+   * each day, and the audience list will be listed here.
+   *
+   * This list is ordered with the most recently created audience list first.
+   * 
+ * + * repeated string audience_lists = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the element to return. + * @return The audienceLists at the given index. + */ + public java.lang.String getAudienceLists(int index) { + return audienceLists_.get(index); + } + /** + * + * + *
+   * Output only. Audience list resource names for audience list instances
+   * created for this recurring audience list. One audience list is created for
+   * each day, and the audience list will be listed here.
+   *
+   * This list is ordered with the most recently created audience list first.
+   * 
+ * + * repeated string audience_lists = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the value to return. + * @return The bytes of the audienceLists at the given index. + */ + public com.google.protobuf.ByteString getAudienceListsBytes(int index) { + return audienceLists_.getByteString(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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(audience_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, audience_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(audienceDisplayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, audienceDisplayName_); + } + for (int i = 0; i < dimensions_.size(); i++) { + output.writeMessage(4, dimensions_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeInt32(5, activeDaysRemaining_); + } + for (int i = 0; i < audienceLists_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, audienceLists_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(audience_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, audience_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(audienceDisplayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, audienceDisplayName_); + } + for (int i = 0; i < dimensions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, dimensions_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, activeDaysRemaining_); + } + { + int dataSize = 0; + for (int i = 0; i < audienceLists_.size(); i++) { + dataSize += computeStringSizeNoTag(audienceLists_.getRaw(i)); + } + size += dataSize; + size += 1 * getAudienceListsList().size(); + } + 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.RecurringAudienceList)) { + return super.equals(obj); + } + com.google.analytics.data.v1alpha.RecurringAudienceList other = + (com.google.analytics.data.v1alpha.RecurringAudienceList) obj; + + if (!getName().equals(other.getName())) return false; + if (!getAudience().equals(other.getAudience())) return false; + if (!getAudienceDisplayName().equals(other.getAudienceDisplayName())) return false; + if (!getDimensionsList().equals(other.getDimensionsList())) return false; + if (hasActiveDaysRemaining() != other.hasActiveDaysRemaining()) return false; + if (hasActiveDaysRemaining()) { + if (getActiveDaysRemaining() != other.getActiveDaysRemaining()) return false; + } + if (!getAudienceListsList().equals(other.getAudienceListsList())) 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) + AUDIENCE_FIELD_NUMBER; + hash = (53 * hash) + getAudience().hashCode(); + hash = (37 * hash) + AUDIENCE_DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getAudienceDisplayName().hashCode(); + if (getDimensionsCount() > 0) { + hash = (37 * hash) + DIMENSIONS_FIELD_NUMBER; + hash = (53 * hash) + getDimensionsList().hashCode(); + } + if (hasActiveDaysRemaining()) { + hash = (37 * hash) + ACTIVE_DAYS_REMAINING_FIELD_NUMBER; + hash = (53 * hash) + getActiveDaysRemaining(); + } + if (getAudienceListsCount() > 0) { + hash = (37 * hash) + AUDIENCE_LISTS_FIELD_NUMBER; + hash = (53 * hash) + getAudienceListsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.data.v1alpha.RecurringAudienceList parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1alpha.RecurringAudienceList 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.RecurringAudienceList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1alpha.RecurringAudienceList 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.RecurringAudienceList parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1alpha.RecurringAudienceList 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.RecurringAudienceList parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1alpha.RecurringAudienceList parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1alpha.RecurringAudienceList parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1alpha.RecurringAudienceList parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1alpha.RecurringAudienceList parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1alpha.RecurringAudienceList parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.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.RecurringAudienceList 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A recurring audience list produces new audience lists each day. Audience
+   * lists are users in an audience at the time of the list's creation. A
+   * recurring audience list ensures that you have audience list based on the most
+   * recent data available for use each day.
+   * 
+ * + * Protobuf type {@code google.analytics.data.v1alpha.RecurringAudienceList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.data.v1alpha.RecurringAudienceList) + com.google.analytics.data.v1alpha.RecurringAudienceListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1alpha.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1alpha_RecurringAudienceList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1alpha.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1alpha_RecurringAudienceList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1alpha.RecurringAudienceList.class, + com.google.analytics.data.v1alpha.RecurringAudienceList.Builder.class); + } + + // Construct using com.google.analytics.data.v1alpha.RecurringAudienceList.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + audience_ = ""; + audienceDisplayName_ = ""; + if (dimensionsBuilder_ == null) { + dimensions_ = java.util.Collections.emptyList(); + } else { + dimensions_ = null; + dimensionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + activeDaysRemaining_ = 0; + audienceLists_ = com.google.protobuf.LazyStringArrayList.emptyList(); + 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_RecurringAudienceList_descriptor; + } + + @java.lang.Override + public com.google.analytics.data.v1alpha.RecurringAudienceList getDefaultInstanceForType() { + return com.google.analytics.data.v1alpha.RecurringAudienceList.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.data.v1alpha.RecurringAudienceList build() { + com.google.analytics.data.v1alpha.RecurringAudienceList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.data.v1alpha.RecurringAudienceList buildPartial() { + com.google.analytics.data.v1alpha.RecurringAudienceList result = + new com.google.analytics.data.v1alpha.RecurringAudienceList(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.analytics.data.v1alpha.RecurringAudienceList result) { + if (dimensionsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + dimensions_ = java.util.Collections.unmodifiableList(dimensions_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.dimensions_ = dimensions_; + } else { + result.dimensions_ = dimensionsBuilder_.build(); + } + } + + private void buildPartial0(com.google.analytics.data.v1alpha.RecurringAudienceList result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.audience_ = audience_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.audienceDisplayName_ = audienceDisplayName_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.activeDaysRemaining_ = activeDaysRemaining_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + audienceLists_.makeImmutable(); + result.audienceLists_ = audienceLists_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.data.v1alpha.RecurringAudienceList) { + return mergeFrom((com.google.analytics.data.v1alpha.RecurringAudienceList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.data.v1alpha.RecurringAudienceList other) { + if (other == com.google.analytics.data.v1alpha.RecurringAudienceList.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getAudience().isEmpty()) { + audience_ = other.audience_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getAudienceDisplayName().isEmpty()) { + audienceDisplayName_ = other.audienceDisplayName_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (dimensionsBuilder_ == null) { + if (!other.dimensions_.isEmpty()) { + if (dimensions_.isEmpty()) { + dimensions_ = other.dimensions_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureDimensionsIsMutable(); + dimensions_.addAll(other.dimensions_); + } + onChanged(); + } + } else { + if (!other.dimensions_.isEmpty()) { + if (dimensionsBuilder_.isEmpty()) { + dimensionsBuilder_.dispose(); + dimensionsBuilder_ = null; + dimensions_ = other.dimensions_; + bitField0_ = (bitField0_ & ~0x00000008); + dimensionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDimensionsFieldBuilder() + : null; + } else { + dimensionsBuilder_.addAllMessages(other.dimensions_); + } + } + } + if (other.hasActiveDaysRemaining()) { + setActiveDaysRemaining(other.getActiveDaysRemaining()); + } + if (!other.audienceLists_.isEmpty()) { + if (audienceLists_.isEmpty()) { + audienceLists_ = other.audienceLists_; + bitField0_ |= 0x00000020; + } else { + ensureAudienceListsIsMutable(); + audienceLists_.addAll(other.audienceLists_); + } + 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: + { + audience_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + audienceDisplayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + com.google.analytics.data.v1alpha.AudienceDimension m = + input.readMessage( + com.google.analytics.data.v1alpha.AudienceDimension.parser(), + extensionRegistry); + if (dimensionsBuilder_ == null) { + ensureDimensionsIsMutable(); + dimensions_.add(m); + } else { + dimensionsBuilder_.addMessage(m); + } + break; + } // case 34 + case 40: + { + activeDaysRemaining_ = input.readInt32(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAudienceListsIsMutable(); + audienceLists_.add(s); + break; + } // case 50 + 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_ = ""; + /** + * + * + *
+     * Output only. Identifier. The recurring audience list resource name assigned
+     * during creation. This resource name identifies this
+     * `RecurringAudienceList`.
+     *
+     * Format:
+     * `properties/{property}/recurringAudienceLists/{recurring_audience_list}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @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; + } + } + /** + * + * + *
+     * Output only. Identifier. The recurring audience list resource name assigned
+     * during creation. This resource name identifies this
+     * `RecurringAudienceList`.
+     *
+     * Format:
+     * `properties/{property}/recurringAudienceLists/{recurring_audience_list}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @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; + } + } + /** + * + * + *
+     * Output only. Identifier. The recurring audience list resource name assigned
+     * during creation. This resource name identifies this
+     * `RecurringAudienceList`.
+     *
+     * Format:
+     * `properties/{property}/recurringAudienceLists/{recurring_audience_list}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @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; + } + /** + * + * + *
+     * Output only. Identifier. The recurring audience list resource name assigned
+     * during creation. This resource name identifies this
+     * `RecurringAudienceList`.
+     *
+     * Format:
+     * `properties/{property}/recurringAudienceLists/{recurring_audience_list}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Identifier. The recurring audience list resource name assigned
+     * during creation. This resource name identifies this
+     * `RecurringAudienceList`.
+     *
+     * Format:
+     * `properties/{property}/recurringAudienceLists/{recurring_audience_list}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @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 audience_ = ""; + /** + * + * + *
+     * Required. The audience resource name. This resource name identifies the
+     * audience being listed and is shared between the Analytics Data & Admin
+     * APIs.
+     *
+     * Format: `properties/{property}/audiences/{audience}`
+     * 
+ * + * string audience = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The audience. + */ + public java.lang.String getAudience() { + java.lang.Object ref = audience_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + audience_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The audience resource name. This resource name identifies the
+     * audience being listed and is shared between the Analytics Data & Admin
+     * APIs.
+     *
+     * Format: `properties/{property}/audiences/{audience}`
+     * 
+ * + * string audience = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for audience. + */ + public com.google.protobuf.ByteString getAudienceBytes() { + java.lang.Object ref = audience_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + audience_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The audience resource name. This resource name identifies the
+     * audience being listed and is shared between the Analytics Data & Admin
+     * APIs.
+     *
+     * Format: `properties/{property}/audiences/{audience}`
+     * 
+ * + * string audience = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The audience to set. + * @return This builder for chaining. + */ + public Builder setAudience(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + audience_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The audience resource name. This resource name identifies the
+     * audience being listed and is shared between the Analytics Data & Admin
+     * APIs.
+     *
+     * Format: `properties/{property}/audiences/{audience}`
+     * 
+ * + * string audience = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearAudience() { + audience_ = getDefaultInstance().getAudience(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The audience resource name. This resource name identifies the
+     * audience being listed and is shared between the Analytics Data & Admin
+     * APIs.
+     *
+     * Format: `properties/{property}/audiences/{audience}`
+     * 
+ * + * string audience = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for audience to set. + * @return This builder for chaining. + */ + public Builder setAudienceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + audience_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object audienceDisplayName_ = ""; + /** + * + * + *
+     * Output only. The descriptive display name for this audience. For example,
+     * "Purchasers".
+     * 
+ * + * string audience_display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The audienceDisplayName. + */ + public java.lang.String getAudienceDisplayName() { + java.lang.Object ref = audienceDisplayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + audienceDisplayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The descriptive display name for this audience. For example,
+     * "Purchasers".
+     * 
+ * + * string audience_display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for audienceDisplayName. + */ + public com.google.protobuf.ByteString getAudienceDisplayNameBytes() { + java.lang.Object ref = audienceDisplayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + audienceDisplayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The descriptive display name for this audience. For example,
+     * "Purchasers".
+     * 
+ * + * string audience_display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The audienceDisplayName to set. + * @return This builder for chaining. + */ + public Builder setAudienceDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + audienceDisplayName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The descriptive display name for this audience. For example,
+     * "Purchasers".
+     * 
+ * + * string audience_display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearAudienceDisplayName() { + audienceDisplayName_ = getDefaultInstance().getAudienceDisplayName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The descriptive display name for this audience. For example,
+     * "Purchasers".
+     * 
+ * + * string audience_display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for audienceDisplayName to set. + * @return This builder for chaining. + */ + public Builder setAudienceDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + audienceDisplayName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.util.List dimensions_ = + java.util.Collections.emptyList(); + + private void ensureDimensionsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + dimensions_ = + new java.util.ArrayList( + dimensions_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1alpha.AudienceDimension, + com.google.analytics.data.v1alpha.AudienceDimension.Builder, + com.google.analytics.data.v1alpha.AudienceDimensionOrBuilder> + dimensionsBuilder_; + + /** + * + * + *
+     * Required. The dimensions requested and displayed in the audience list
+     * response.
+     * 
+ * + * + * repeated .google.analytics.data.v1alpha.AudienceDimension dimensions = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List getDimensionsList() { + if (dimensionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(dimensions_); + } else { + return dimensionsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Required. The dimensions requested and displayed in the audience list
+     * response.
+     * 
+ * + * + * repeated .google.analytics.data.v1alpha.AudienceDimension dimensions = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getDimensionsCount() { + if (dimensionsBuilder_ == null) { + return dimensions_.size(); + } else { + return dimensionsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Required. The dimensions requested and displayed in the audience list
+     * response.
+     * 
+ * + * + * repeated .google.analytics.data.v1alpha.AudienceDimension dimensions = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.analytics.data.v1alpha.AudienceDimension getDimensions(int index) { + if (dimensionsBuilder_ == null) { + return dimensions_.get(index); + } else { + return dimensionsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Required. The dimensions requested and displayed in the audience list
+     * response.
+     * 
+ * + * + * repeated .google.analytics.data.v1alpha.AudienceDimension dimensions = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDimensions( + int index, com.google.analytics.data.v1alpha.AudienceDimension value) { + if (dimensionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDimensionsIsMutable(); + dimensions_.set(index, value); + onChanged(); + } else { + dimensionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. The dimensions requested and displayed in the audience list
+     * response.
+     * 
+ * + * + * repeated .google.analytics.data.v1alpha.AudienceDimension dimensions = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDimensions( + int index, com.google.analytics.data.v1alpha.AudienceDimension.Builder builderForValue) { + if (dimensionsBuilder_ == null) { + ensureDimensionsIsMutable(); + dimensions_.set(index, builderForValue.build()); + onChanged(); + } else { + dimensionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The dimensions requested and displayed in the audience list
+     * response.
+     * 
+ * + * + * repeated .google.analytics.data.v1alpha.AudienceDimension dimensions = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addDimensions(com.google.analytics.data.v1alpha.AudienceDimension value) { + if (dimensionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDimensionsIsMutable(); + dimensions_.add(value); + onChanged(); + } else { + dimensionsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Required. The dimensions requested and displayed in the audience list
+     * response.
+     * 
+ * + * + * repeated .google.analytics.data.v1alpha.AudienceDimension dimensions = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addDimensions( + int index, com.google.analytics.data.v1alpha.AudienceDimension value) { + if (dimensionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDimensionsIsMutable(); + dimensions_.add(index, value); + onChanged(); + } else { + dimensionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. The dimensions requested and displayed in the audience list
+     * response.
+     * 
+ * + * + * repeated .google.analytics.data.v1alpha.AudienceDimension dimensions = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addDimensions( + com.google.analytics.data.v1alpha.AudienceDimension.Builder builderForValue) { + if (dimensionsBuilder_ == null) { + ensureDimensionsIsMutable(); + dimensions_.add(builderForValue.build()); + onChanged(); + } else { + dimensionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The dimensions requested and displayed in the audience list
+     * response.
+     * 
+ * + * + * repeated .google.analytics.data.v1alpha.AudienceDimension dimensions = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addDimensions( + int index, com.google.analytics.data.v1alpha.AudienceDimension.Builder builderForValue) { + if (dimensionsBuilder_ == null) { + ensureDimensionsIsMutable(); + dimensions_.add(index, builderForValue.build()); + onChanged(); + } else { + dimensionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The dimensions requested and displayed in the audience list
+     * response.
+     * 
+ * + * + * repeated .google.analytics.data.v1alpha.AudienceDimension dimensions = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllDimensions( + java.lang.Iterable values) { + if (dimensionsBuilder_ == null) { + ensureDimensionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dimensions_); + onChanged(); + } else { + dimensionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Required. The dimensions requested and displayed in the audience list
+     * response.
+     * 
+ * + * + * repeated .google.analytics.data.v1alpha.AudienceDimension dimensions = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearDimensions() { + if (dimensionsBuilder_ == null) { + dimensions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + dimensionsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Required. The dimensions requested and displayed in the audience list
+     * response.
+     * 
+ * + * + * repeated .google.analytics.data.v1alpha.AudienceDimension dimensions = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeDimensions(int index) { + if (dimensionsBuilder_ == null) { + ensureDimensionsIsMutable(); + dimensions_.remove(index); + onChanged(); + } else { + dimensionsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Required. The dimensions requested and displayed in the audience list
+     * response.
+     * 
+ * + * + * repeated .google.analytics.data.v1alpha.AudienceDimension dimensions = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.analytics.data.v1alpha.AudienceDimension.Builder getDimensionsBuilder( + int index) { + return getDimensionsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Required. The dimensions requested and displayed in the audience list
+     * response.
+     * 
+ * + * + * repeated .google.analytics.data.v1alpha.AudienceDimension dimensions = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.analytics.data.v1alpha.AudienceDimensionOrBuilder getDimensionsOrBuilder( + int index) { + if (dimensionsBuilder_ == null) { + return dimensions_.get(index); + } else { + return dimensionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Required. The dimensions requested and displayed in the audience list
+     * response.
+     * 
+ * + * + * repeated .google.analytics.data.v1alpha.AudienceDimension dimensions = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getDimensionsOrBuilderList() { + if (dimensionsBuilder_ != null) { + return dimensionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(dimensions_); + } + } + /** + * + * + *
+     * Required. The dimensions requested and displayed in the audience list
+     * response.
+     * 
+ * + * + * repeated .google.analytics.data.v1alpha.AudienceDimension dimensions = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.analytics.data.v1alpha.AudienceDimension.Builder addDimensionsBuilder() { + return getDimensionsFieldBuilder() + .addBuilder(com.google.analytics.data.v1alpha.AudienceDimension.getDefaultInstance()); + } + /** + * + * + *
+     * Required. The dimensions requested and displayed in the audience list
+     * response.
+     * 
+ * + * + * repeated .google.analytics.data.v1alpha.AudienceDimension dimensions = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.analytics.data.v1alpha.AudienceDimension.Builder addDimensionsBuilder( + int index) { + return getDimensionsFieldBuilder() + .addBuilder( + index, com.google.analytics.data.v1alpha.AudienceDimension.getDefaultInstance()); + } + /** + * + * + *
+     * Required. The dimensions requested and displayed in the audience list
+     * response.
+     * 
+ * + * + * repeated .google.analytics.data.v1alpha.AudienceDimension dimensions = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getDimensionsBuilderList() { + return getDimensionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1alpha.AudienceDimension, + com.google.analytics.data.v1alpha.AudienceDimension.Builder, + com.google.analytics.data.v1alpha.AudienceDimensionOrBuilder> + getDimensionsFieldBuilder() { + if (dimensionsBuilder_ == null) { + dimensionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1alpha.AudienceDimension, + com.google.analytics.data.v1alpha.AudienceDimension.Builder, + com.google.analytics.data.v1alpha.AudienceDimensionOrBuilder>( + dimensions_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); + dimensions_ = null; + } + return dimensionsBuilder_; + } + + private int activeDaysRemaining_; + /** + * + * + *
+     * Optional. The number of remaining days that a recurring audience export
+     * will produce an audience list instance. This counter decreases by one each
+     * day, and when it reaches zero, no new audience lists will be created.
+     *
+     * Recurring audience list request for Analytics 360 properties default to 180
+     * days and have a maximum of 365 days. Requests for standard Analytics
+     * properties default to 14 days and have a maximum of 30 days.
+     *
+     * The minimum value allowed during creation is 1. Requests above their
+     * respective maximum will be coerced to their maximum.
+     * 
+ * + * optional int32 active_days_remaining = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the activeDaysRemaining field is set. + */ + @java.lang.Override + public boolean hasActiveDaysRemaining() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Optional. The number of remaining days that a recurring audience export
+     * will produce an audience list instance. This counter decreases by one each
+     * day, and when it reaches zero, no new audience lists will be created.
+     *
+     * Recurring audience list request for Analytics 360 properties default to 180
+     * days and have a maximum of 365 days. Requests for standard Analytics
+     * properties default to 14 days and have a maximum of 30 days.
+     *
+     * The minimum value allowed during creation is 1. Requests above their
+     * respective maximum will be coerced to their maximum.
+     * 
+ * + * optional int32 active_days_remaining = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The activeDaysRemaining. + */ + @java.lang.Override + public int getActiveDaysRemaining() { + return activeDaysRemaining_; + } + /** + * + * + *
+     * Optional. The number of remaining days that a recurring audience export
+     * will produce an audience list instance. This counter decreases by one each
+     * day, and when it reaches zero, no new audience lists will be created.
+     *
+     * Recurring audience list request for Analytics 360 properties default to 180
+     * days and have a maximum of 365 days. Requests for standard Analytics
+     * properties default to 14 days and have a maximum of 30 days.
+     *
+     * The minimum value allowed during creation is 1. Requests above their
+     * respective maximum will be coerced to their maximum.
+     * 
+ * + * optional int32 active_days_remaining = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The activeDaysRemaining to set. + * @return This builder for chaining. + */ + public Builder setActiveDaysRemaining(int value) { + + activeDaysRemaining_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The number of remaining days that a recurring audience export
+     * will produce an audience list instance. This counter decreases by one each
+     * day, and when it reaches zero, no new audience lists will be created.
+     *
+     * Recurring audience list request for Analytics 360 properties default to 180
+     * days and have a maximum of 365 days. Requests for standard Analytics
+     * properties default to 14 days and have a maximum of 30 days.
+     *
+     * The minimum value allowed during creation is 1. Requests above their
+     * respective maximum will be coerced to their maximum.
+     * 
+ * + * optional int32 active_days_remaining = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearActiveDaysRemaining() { + bitField0_ = (bitField0_ & ~0x00000010); + activeDaysRemaining_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList audienceLists_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureAudienceListsIsMutable() { + if (!audienceLists_.isModifiable()) { + audienceLists_ = new com.google.protobuf.LazyStringArrayList(audienceLists_); + } + bitField0_ |= 0x00000020; + } + /** + * + * + *
+     * Output only. Audience list resource names for audience list instances
+     * created for this recurring audience list. One audience list is created for
+     * each day, and the audience list will be listed here.
+     *
+     * This list is ordered with the most recently created audience list first.
+     * 
+ * + * repeated string audience_lists = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return A list containing the audienceLists. + */ + public com.google.protobuf.ProtocolStringList getAudienceListsList() { + audienceLists_.makeImmutable(); + return audienceLists_; + } + /** + * + * + *
+     * Output only. Audience list resource names for audience list instances
+     * created for this recurring audience list. One audience list is created for
+     * each day, and the audience list will be listed here.
+     *
+     * This list is ordered with the most recently created audience list first.
+     * 
+ * + * repeated string audience_lists = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count of audienceLists. + */ + public int getAudienceListsCount() { + return audienceLists_.size(); + } + /** + * + * + *
+     * Output only. Audience list resource names for audience list instances
+     * created for this recurring audience list. One audience list is created for
+     * each day, and the audience list will be listed here.
+     *
+     * This list is ordered with the most recently created audience list first.
+     * 
+ * + * repeated string audience_lists = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the element to return. + * @return The audienceLists at the given index. + */ + public java.lang.String getAudienceLists(int index) { + return audienceLists_.get(index); + } + /** + * + * + *
+     * Output only. Audience list resource names for audience list instances
+     * created for this recurring audience list. One audience list is created for
+     * each day, and the audience list will be listed here.
+     *
+     * This list is ordered with the most recently created audience list first.
+     * 
+ * + * repeated string audience_lists = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the value to return. + * @return The bytes of the audienceLists at the given index. + */ + public com.google.protobuf.ByteString getAudienceListsBytes(int index) { + return audienceLists_.getByteString(index); + } + /** + * + * + *
+     * Output only. Audience list resource names for audience list instances
+     * created for this recurring audience list. One audience list is created for
+     * each day, and the audience list will be listed here.
+     *
+     * This list is ordered with the most recently created audience list first.
+     * 
+ * + * repeated string audience_lists = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index to set the value at. + * @param value The audienceLists to set. + * @return This builder for chaining. + */ + public Builder setAudienceLists(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAudienceListsIsMutable(); + audienceLists_.set(index, value); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Audience list resource names for audience list instances
+     * created for this recurring audience list. One audience list is created for
+     * each day, and the audience list will be listed here.
+     *
+     * This list is ordered with the most recently created audience list first.
+     * 
+ * + * repeated string audience_lists = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The audienceLists to add. + * @return This builder for chaining. + */ + public Builder addAudienceLists(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAudienceListsIsMutable(); + audienceLists_.add(value); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Audience list resource names for audience list instances
+     * created for this recurring audience list. One audience list is created for
+     * each day, and the audience list will be listed here.
+     *
+     * This list is ordered with the most recently created audience list first.
+     * 
+ * + * repeated string audience_lists = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param values The audienceLists to add. + * @return This builder for chaining. + */ + public Builder addAllAudienceLists(java.lang.Iterable values) { + ensureAudienceListsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, audienceLists_); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Audience list resource names for audience list instances
+     * created for this recurring audience list. One audience list is created for
+     * each day, and the audience list will be listed here.
+     *
+     * This list is ordered with the most recently created audience list first.
+     * 
+ * + * repeated string audience_lists = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearAudienceLists() { + audienceLists_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Audience list resource names for audience list instances
+     * created for this recurring audience list. One audience list is created for
+     * each day, and the audience list will be listed here.
+     *
+     * This list is ordered with the most recently created audience list first.
+     * 
+ * + * repeated string audience_lists = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes of the audienceLists to add. + * @return This builder for chaining. + */ + public Builder addAudienceListsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAudienceListsIsMutable(); + audienceLists_.add(value); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.data.v1alpha.RecurringAudienceList) + } + + // @@protoc_insertion_point(class_scope:google.analytics.data.v1alpha.RecurringAudienceList) + private static final com.google.analytics.data.v1alpha.RecurringAudienceList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.data.v1alpha.RecurringAudienceList(); + } + + public static com.google.analytics.data.v1alpha.RecurringAudienceList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RecurringAudienceList 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.RecurringAudienceList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/RecurringAudienceListName.java b/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/RecurringAudienceListName.java new file mode 100644 index 000000000000..9445c1e6186c --- /dev/null +++ b/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/RecurringAudienceListName.java @@ -0,0 +1,202 @@ +/* + * Copyright 2023 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; + +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; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class RecurringAudienceListName implements ResourceName { + private static final PathTemplate PROPERTY_RECURRING_AUDIENCE_LIST = + PathTemplate.createWithoutUrlEncoding( + "properties/{property}/recurringAudienceLists/{recurring_audience_list}"); + private volatile Map fieldValuesMap; + private final String property; + private final String recurringAudienceList; + + @Deprecated + protected RecurringAudienceListName() { + property = null; + recurringAudienceList = null; + } + + private RecurringAudienceListName(Builder builder) { + property = Preconditions.checkNotNull(builder.getProperty()); + recurringAudienceList = Preconditions.checkNotNull(builder.getRecurringAudienceList()); + } + + public String getProperty() { + return property; + } + + public String getRecurringAudienceList() { + return recurringAudienceList; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static RecurringAudienceListName of(String property, String recurringAudienceList) { + return newBuilder() + .setProperty(property) + .setRecurringAudienceList(recurringAudienceList) + .build(); + } + + public static String format(String property, String recurringAudienceList) { + return newBuilder() + .setProperty(property) + .setRecurringAudienceList(recurringAudienceList) + .build() + .toString(); + } + + public static RecurringAudienceListName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROPERTY_RECURRING_AUDIENCE_LIST.validatedMatch( + formattedString, + "RecurringAudienceListName.parse: formattedString not in valid format"); + return of(matchMap.get("property"), matchMap.get("recurring_audience_list")); + } + + 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 values) { + List list = new ArrayList<>(values.size()); + for (RecurringAudienceListName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROPERTY_RECURRING_AUDIENCE_LIST.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (property != null) { + fieldMapBuilder.put("property", property); + } + if (recurringAudienceList != null) { + fieldMapBuilder.put("recurring_audience_list", recurringAudienceList); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROPERTY_RECURRING_AUDIENCE_LIST.instantiate( + "property", property, "recurring_audience_list", recurringAudienceList); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + RecurringAudienceListName that = ((RecurringAudienceListName) o); + return Objects.equals(this.property, that.property) + && Objects.equals(this.recurringAudienceList, that.recurringAudienceList); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(property); + h *= 1000003; + h ^= Objects.hashCode(recurringAudienceList); + return h; + } + + /** Builder for properties/{property}/recurringAudienceLists/{recurring_audience_list}. */ + public static class Builder { + private String property; + private String recurringAudienceList; + + protected Builder() {} + + public String getProperty() { + return property; + } + + public String getRecurringAudienceList() { + return recurringAudienceList; + } + + public Builder setProperty(String property) { + this.property = property; + return this; + } + + public Builder setRecurringAudienceList(String recurringAudienceList) { + this.recurringAudienceList = recurringAudienceList; + return this; + } + + private Builder(RecurringAudienceListName recurringAudienceListName) { + this.property = recurringAudienceListName.property; + this.recurringAudienceList = recurringAudienceListName.recurringAudienceList; + } + + public RecurringAudienceListName build() { + return new RecurringAudienceListName(this); + } + } +} diff --git a/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/RecurringAudienceListOrBuilder.java b/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/RecurringAudienceListOrBuilder.java new file mode 100644 index 000000000000..fe822503c0c9 --- /dev/null +++ b/java-analytics-data/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/RecurringAudienceListOrBuilder.java @@ -0,0 +1,303 @@ +/* + * Copyright 2023 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! +// source: google/analytics/data/v1alpha/analytics_data_api.proto + +package com.google.analytics.data.v1alpha; + +public interface RecurringAudienceListOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.data.v1alpha.RecurringAudienceList) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Identifier. The recurring audience list resource name assigned
+   * during creation. This resource name identifies this
+   * `RecurringAudienceList`.
+   *
+   * Format:
+   * `properties/{property}/recurringAudienceLists/{recurring_audience_list}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. Identifier. The recurring audience list resource name assigned
+   * during creation. This resource name identifies this
+   * `RecurringAudienceList`.
+   *
+   * Format:
+   * `properties/{property}/recurringAudienceLists/{recurring_audience_list}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The audience resource name. This resource name identifies the
+   * audience being listed and is shared between the Analytics Data & Admin
+   * APIs.
+   *
+   * Format: `properties/{property}/audiences/{audience}`
+   * 
+ * + * string audience = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The audience. + */ + java.lang.String getAudience(); + /** + * + * + *
+   * Required. The audience resource name. This resource name identifies the
+   * audience being listed and is shared between the Analytics Data & Admin
+   * APIs.
+   *
+   * Format: `properties/{property}/audiences/{audience}`
+   * 
+ * + * string audience = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for audience. + */ + com.google.protobuf.ByteString getAudienceBytes(); + + /** + * + * + *
+   * Output only. The descriptive display name for this audience. For example,
+   * "Purchasers".
+   * 
+ * + * string audience_display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The audienceDisplayName. + */ + java.lang.String getAudienceDisplayName(); + /** + * + * + *
+   * Output only. The descriptive display name for this audience. For example,
+   * "Purchasers".
+   * 
+ * + * string audience_display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for audienceDisplayName. + */ + com.google.protobuf.ByteString getAudienceDisplayNameBytes(); + + /** + * + * + *
+   * Required. The dimensions requested and displayed in the audience list
+   * response.
+   * 
+ * + * + * repeated .google.analytics.data.v1alpha.AudienceDimension dimensions = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getDimensionsList(); + /** + * + * + *
+   * Required. The dimensions requested and displayed in the audience list
+   * response.
+   * 
+ * + * + * repeated .google.analytics.data.v1alpha.AudienceDimension dimensions = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.analytics.data.v1alpha.AudienceDimension getDimensions(int index); + /** + * + * + *
+   * Required. The dimensions requested and displayed in the audience list
+   * response.
+   * 
+ * + * + * repeated .google.analytics.data.v1alpha.AudienceDimension dimensions = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getDimensionsCount(); + /** + * + * + *
+   * Required. The dimensions requested and displayed in the audience list
+   * response.
+   * 
+ * + * + * repeated .google.analytics.data.v1alpha.AudienceDimension dimensions = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getDimensionsOrBuilderList(); + /** + * + * + *
+   * Required. The dimensions requested and displayed in the audience list
+   * response.
+   * 
+ * + * + * repeated .google.analytics.data.v1alpha.AudienceDimension dimensions = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.analytics.data.v1alpha.AudienceDimensionOrBuilder getDimensionsOrBuilder(int index); + + /** + * + * + *
+   * Optional. The number of remaining days that a recurring audience export
+   * will produce an audience list instance. This counter decreases by one each
+   * day, and when it reaches zero, no new audience lists will be created.
+   *
+   * Recurring audience list request for Analytics 360 properties default to 180
+   * days and have a maximum of 365 days. Requests for standard Analytics
+   * properties default to 14 days and have a maximum of 30 days.
+   *
+   * The minimum value allowed during creation is 1. Requests above their
+   * respective maximum will be coerced to their maximum.
+   * 
+ * + * optional int32 active_days_remaining = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the activeDaysRemaining field is set. + */ + boolean hasActiveDaysRemaining(); + /** + * + * + *
+   * Optional. The number of remaining days that a recurring audience export
+   * will produce an audience list instance. This counter decreases by one each
+   * day, and when it reaches zero, no new audience lists will be created.
+   *
+   * Recurring audience list request for Analytics 360 properties default to 180
+   * days and have a maximum of 365 days. Requests for standard Analytics
+   * properties default to 14 days and have a maximum of 30 days.
+   *
+   * The minimum value allowed during creation is 1. Requests above their
+   * respective maximum will be coerced to their maximum.
+   * 
+ * + * optional int32 active_days_remaining = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The activeDaysRemaining. + */ + int getActiveDaysRemaining(); + + /** + * + * + *
+   * Output only. Audience list resource names for audience list instances
+   * created for this recurring audience list. One audience list is created for
+   * each day, and the audience list will be listed here.
+   *
+   * This list is ordered with the most recently created audience list first.
+   * 
+ * + * repeated string audience_lists = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return A list containing the audienceLists. + */ + java.util.List getAudienceListsList(); + /** + * + * + *
+   * Output only. Audience list resource names for audience list instances
+   * created for this recurring audience list. One audience list is created for
+   * each day, and the audience list will be listed here.
+   *
+   * This list is ordered with the most recently created audience list first.
+   * 
+ * + * repeated string audience_lists = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count of audienceLists. + */ + int getAudienceListsCount(); + /** + * + * + *
+   * Output only. Audience list resource names for audience list instances
+   * created for this recurring audience list. One audience list is created for
+   * each day, and the audience list will be listed here.
+   *
+   * This list is ordered with the most recently created audience list first.
+   * 
+ * + * repeated string audience_lists = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the element to return. + * @return The audienceLists at the given index. + */ + java.lang.String getAudienceLists(int index); + /** + * + * + *
+   * Output only. Audience list resource names for audience list instances
+   * created for this recurring audience list. One audience list is created for
+   * each day, and the audience list will be listed here.
+   *
+   * This list is ordered with the most recently created audience list first.
+   * 
+ * + * repeated string audience_lists = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the value to return. + * @return The bytes of the audienceLists at the given index. + */ + com.google.protobuf.ByteString getAudienceListsBytes(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 9faf7f9bcbb2..4e4bde0d18e8 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 @@ -201,6 +201,200 @@ service AlphaAnalyticsData { }; option (google.api.method_signature) = "parent"; } + + // Creates a recurring audience list. Recurring audience lists produces new + // audience lists each day. Audience lists are users in an audience at the + // time of the list's creation. + // + // A recurring audience list ensures that you have audience list based on the + // most recent data available for use each day. If you manually create + // audience list, you don't know when an audience list based on an additional + // day's data is available. This recurring audience list automates the + // creation of an audience list when an additional day's data is available. + // You will consume fewer quota tokens by using recurring audience list versus + // manually creating audience list at various times of day trying to guess + // when an additional day's data is ready. + // + // This method is introduced at alpha stability with the intention of + // gathering feedback on syntax and capabilities before entering beta. To give + // your feedback on this API, complete the + // [Google Analytics Audience Export API + // Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + rpc CreateRecurringAudienceList(CreateRecurringAudienceListRequest) + returns (RecurringAudienceList) { + option (google.api.http) = { + post: "/v1alpha/{parent=properties/*}/recurringAudienceLists" + body: "recurring_audience_list" + }; + option (google.api.method_signature) = "parent,recurring_audience_list"; + } + + // Gets configuration metadata about a specific recurring audience list. This + // method can be used to understand a recurring audience list's state after it + // has been created. For example, a recurring audience list resource will + // generate audience list instances for each day, and this method can be used + // to get the resource name of the most recent audience list instance. + // + // This method is introduced at alpha stability with the intention of + // gathering feedback on syntax and capabilities before entering beta. To give + // your feedback on this API, complete the + // [Google Analytics Audience Export API + // Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + rpc GetRecurringAudienceList(GetRecurringAudienceListRequest) + returns (RecurringAudienceList) { + option (google.api.http) = { + get: "/v1alpha/{name=properties/*/recurringAudienceLists/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists all recurring audience lists for a property. This method can be used + // for you to find and reuse existing recurring audience lists rather than + // creating unnecessary new recurring audience lists. The same audience can + // have multiple recurring audience lists that represent different dimension + // combinations; for example, just the dimension `deviceId` or both the + // dimensions `deviceId` and `userId`. + // + // This method is introduced at alpha stability with the intention of + // gathering feedback on syntax and capabilities before entering beta. To give + // your feedback on this API, complete the + // [Google Analytics Audience Export API + // Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + rpc ListRecurringAudienceLists(ListRecurringAudienceListsRequest) + returns (ListRecurringAudienceListsResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=properties/*}/recurringAudienceLists" + }; + option (google.api.method_signature) = "parent"; + } +} + +// A request to create a new recurring audience list. +message CreateRecurringAudienceListRequest { + // Required. The parent resource where this recurring audience list will be + // created. Format: `properties/{property}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsdata.googleapis.com/RecurringAudienceList" + } + ]; + + // Required. The recurring audience list to create. + RecurringAudienceList recurring_audience_list = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// A recurring audience list produces new audience lists each day. Audience +// lists are users in an audience at the time of the list's creation. A +// recurring audience list ensures that you have audience list based on the most +// recent data available for use each day. +message RecurringAudienceList { + option (google.api.resource) = { + type: "analyticsdata.googleapis.com/RecurringAudienceList" + pattern: "properties/{property}/recurringAudienceLists/{recurring_audience_list}" + plural: "recurringAudienceLists" + singular: "recurringAudienceList" + }; + + // Output only. Identifier. The recurring audience list resource name assigned + // during creation. This resource name identifies this + // `RecurringAudienceList`. + // + // Format: + // `properties/{property}/recurringAudienceLists/{recurring_audience_list}` + string name = 1 [ + (google.api.field_behavior) = IDENTIFIER, + (google.api.field_behavior) = OUTPUT_ONLY + ]; + + // Required. The audience resource name. This resource name identifies the + // audience being listed and is shared between the Analytics Data & Admin + // APIs. + // + // Format: `properties/{property}/audiences/{audience}` + string audience = 2 [(google.api.field_behavior) = REQUIRED]; + + // Output only. The descriptive display name for this audience. For example, + // "Purchasers". + string audience_display_name = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The dimensions requested and displayed in the audience list + // response. + repeated AudienceDimension dimensions = 4 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. The number of remaining days that a recurring audience export + // will produce an audience list instance. This counter decreases by one each + // day, and when it reaches zero, no new audience lists will be created. + // + // Recurring audience list request for Analytics 360 properties default to 180 + // days and have a maximum of 365 days. Requests for standard Analytics + // properties default to 14 days and have a maximum of 30 days. + // + // The minimum value allowed during creation is 1. Requests above their + // respective maximum will be coerced to their maximum. + optional int32 active_days_remaining = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Audience list resource names for audience list instances + // created for this recurring audience list. One audience list is created for + // each day, and the audience list will be listed here. + // + // This list is ordered with the most recently created audience list first. + repeated string audience_lists = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A request to retrieve configuration metadata about a specific recurring +// audience list. +message GetRecurringAudienceListRequest { + // Required. The recurring audience list resource name. + // Format: + // `properties/{property}/recurringAudienceLists/{recurring_audience_list}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsdata.googleapis.com/RecurringAudienceList" + } + ]; +} + +// A request to list all recurring audience lists for a property. +message ListRecurringAudienceListsRequest { + // Required. All recurring audience lists for this property will be listed in + // the response. Format: `properties/{property}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsdata.googleapis.com/RecurringAudienceList" + } + ]; + + // Optional. The maximum number of recurring audience lists to return. The + // service may return fewer than this value. If unspecified, at most 200 + // recurring audience lists will be returned. The maximum value is 1000 + // (higher values will be coerced to the maximum). + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous + // `ListRecurringAudienceLists` call. Provide this to retrieve the subsequent + // page. + // + // When paginating, all other parameters provided to + // `ListRecurringAudienceLists` must match the call that provided the page + // token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// A list of all recurring audience lists for a property. +message ListRecurringAudienceListsResponse { + // Each recurring audience list for a property. + repeated RecurringAudienceList recurring_audience_lists = 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. + optional string next_page_token = 2; } // A request to retrieve configuration metadata about a specific audience list. @@ -315,7 +509,7 @@ message AudienceList { // "Purchasers". string audience_display_name = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Required. The dimensions requested and displayed in the report response. + // Required. The dimensions requested and displayed in the query response. repeated AudienceDimension dimensions = 4 [(google.api.field_behavior) = REQUIRED]; @@ -340,6 +534,19 @@ message AudienceList { // Output only. Error message is populated when an audience list fails during // creation. A common reason for such a failure is quota exhaustion. optional string error_message = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The percentage completed for this audience export ranging + // between 0 to 100. + optional double percentage_completed = 11 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The recurring audience list that created this audience list. + // Recurring audience lists create audience lists daily. + // + // If audience lists are created directly, they will have no associated + // recurring audience list, and this field will be blank. + optional string recurring_audience_list = 12 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // This metadata is currently blank. diff --git a/java-analytics-data/samples/snippets/generated/com/google/analytics/data/v1alpha/alphaanalyticsdata/createrecurringaudiencelist/AsyncCreateRecurringAudienceList.java b/java-analytics-data/samples/snippets/generated/com/google/analytics/data/v1alpha/alphaanalyticsdata/createrecurringaudiencelist/AsyncCreateRecurringAudienceList.java new file mode 100644 index 000000000000..d72ba82148fa --- /dev/null +++ b/java-analytics-data/samples/snippets/generated/com/google/analytics/data/v1alpha/alphaanalyticsdata/createrecurringaudiencelist/AsyncCreateRecurringAudienceList.java @@ -0,0 +1,51 @@ +/* + * Copyright 2023 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_CreateRecurringAudienceList_async] +import com.google.analytics.data.v1alpha.AlphaAnalyticsDataClient; +import com.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest; +import com.google.analytics.data.v1alpha.PropertyName; +import com.google.analytics.data.v1alpha.RecurringAudienceList; +import com.google.api.core.ApiFuture; + +public class AsyncCreateRecurringAudienceList { + + public static void main(String[] args) throws Exception { + asyncCreateRecurringAudienceList(); + } + + public static void asyncCreateRecurringAudienceList() 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()) { + CreateRecurringAudienceListRequest request = + CreateRecurringAudienceListRequest.newBuilder() + .setParent(PropertyName.of("[PROPERTY]").toString()) + .setRecurringAudienceList(RecurringAudienceList.newBuilder().build()) + .build(); + ApiFuture future = + alphaAnalyticsDataClient.createRecurringAudienceListCallable().futureCall(request); + // Do something. + RecurringAudienceList response = future.get(); + } + } +} +// [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateRecurringAudienceList_async] diff --git a/java-analytics-data/samples/snippets/generated/com/google/analytics/data/v1alpha/alphaanalyticsdata/createrecurringaudiencelist/SyncCreateRecurringAudienceList.java b/java-analytics-data/samples/snippets/generated/com/google/analytics/data/v1alpha/alphaanalyticsdata/createrecurringaudiencelist/SyncCreateRecurringAudienceList.java new file mode 100644 index 000000000000..182b81ccf1be --- /dev/null +++ b/java-analytics-data/samples/snippets/generated/com/google/analytics/data/v1alpha/alphaanalyticsdata/createrecurringaudiencelist/SyncCreateRecurringAudienceList.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 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_CreateRecurringAudienceList_sync] +import com.google.analytics.data.v1alpha.AlphaAnalyticsDataClient; +import com.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest; +import com.google.analytics.data.v1alpha.PropertyName; +import com.google.analytics.data.v1alpha.RecurringAudienceList; + +public class SyncCreateRecurringAudienceList { + + public static void main(String[] args) throws Exception { + syncCreateRecurringAudienceList(); + } + + public static void syncCreateRecurringAudienceList() 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()) { + CreateRecurringAudienceListRequest request = + CreateRecurringAudienceListRequest.newBuilder() + .setParent(PropertyName.of("[PROPERTY]").toString()) + .setRecurringAudienceList(RecurringAudienceList.newBuilder().build()) + .build(); + RecurringAudienceList response = + alphaAnalyticsDataClient.createRecurringAudienceList(request); + } + } +} +// [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateRecurringAudienceList_sync] diff --git a/java-analytics-data/samples/snippets/generated/com/google/analytics/data/v1alpha/alphaanalyticsdata/createrecurringaudiencelist/SyncCreateRecurringAudienceListPropertynameRecurringaudiencelist.java b/java-analytics-data/samples/snippets/generated/com/google/analytics/data/v1alpha/alphaanalyticsdata/createrecurringaudiencelist/SyncCreateRecurringAudienceListPropertynameRecurringaudiencelist.java new file mode 100644 index 000000000000..b16e9f4074b3 --- /dev/null +++ b/java-analytics-data/samples/snippets/generated/com/google/analytics/data/v1alpha/alphaanalyticsdata/createrecurringaudiencelist/SyncCreateRecurringAudienceListPropertynameRecurringaudiencelist.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 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_CreateRecurringAudienceList_PropertynameRecurringaudiencelist_sync] +import com.google.analytics.data.v1alpha.AlphaAnalyticsDataClient; +import com.google.analytics.data.v1alpha.PropertyName; +import com.google.analytics.data.v1alpha.RecurringAudienceList; + +public class SyncCreateRecurringAudienceListPropertynameRecurringaudiencelist { + + public static void main(String[] args) throws Exception { + syncCreateRecurringAudienceListPropertynameRecurringaudiencelist(); + } + + public static void syncCreateRecurringAudienceListPropertynameRecurringaudiencelist() + 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()) { + PropertyName parent = PropertyName.of("[PROPERTY]"); + RecurringAudienceList recurringAudienceList = RecurringAudienceList.newBuilder().build(); + RecurringAudienceList response = + alphaAnalyticsDataClient.createRecurringAudienceList(parent, recurringAudienceList); + } + } +} +// [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateRecurringAudienceList_PropertynameRecurringaudiencelist_sync] diff --git a/java-analytics-data/samples/snippets/generated/com/google/analytics/data/v1alpha/alphaanalyticsdata/createrecurringaudiencelist/SyncCreateRecurringAudienceListStringRecurringaudiencelist.java b/java-analytics-data/samples/snippets/generated/com/google/analytics/data/v1alpha/alphaanalyticsdata/createrecurringaudiencelist/SyncCreateRecurringAudienceListStringRecurringaudiencelist.java new file mode 100644 index 000000000000..70abdbc2b182 --- /dev/null +++ b/java-analytics-data/samples/snippets/generated/com/google/analytics/data/v1alpha/alphaanalyticsdata/createrecurringaudiencelist/SyncCreateRecurringAudienceListStringRecurringaudiencelist.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 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_CreateRecurringAudienceList_StringRecurringaudiencelist_sync] +import com.google.analytics.data.v1alpha.AlphaAnalyticsDataClient; +import com.google.analytics.data.v1alpha.PropertyName; +import com.google.analytics.data.v1alpha.RecurringAudienceList; + +public class SyncCreateRecurringAudienceListStringRecurringaudiencelist { + + public static void main(String[] args) throws Exception { + syncCreateRecurringAudienceListStringRecurringaudiencelist(); + } + + public static void syncCreateRecurringAudienceListStringRecurringaudiencelist() 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()) { + String parent = PropertyName.of("[PROPERTY]").toString(); + RecurringAudienceList recurringAudienceList = RecurringAudienceList.newBuilder().build(); + RecurringAudienceList response = + alphaAnalyticsDataClient.createRecurringAudienceList(parent, recurringAudienceList); + } + } +} +// [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateRecurringAudienceList_StringRecurringaudiencelist_sync] diff --git a/java-analytics-data/samples/snippets/generated/com/google/analytics/data/v1alpha/alphaanalyticsdata/getrecurringaudiencelist/AsyncGetRecurringAudienceList.java b/java-analytics-data/samples/snippets/generated/com/google/analytics/data/v1alpha/alphaanalyticsdata/getrecurringaudiencelist/AsyncGetRecurringAudienceList.java new file mode 100644 index 000000000000..b8796945f5f9 --- /dev/null +++ b/java-analytics-data/samples/snippets/generated/com/google/analytics/data/v1alpha/alphaanalyticsdata/getrecurringaudiencelist/AsyncGetRecurringAudienceList.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 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_GetRecurringAudienceList_async] +import com.google.analytics.data.v1alpha.AlphaAnalyticsDataClient; +import com.google.analytics.data.v1alpha.GetRecurringAudienceListRequest; +import com.google.analytics.data.v1alpha.RecurringAudienceList; +import com.google.analytics.data.v1alpha.RecurringAudienceListName; +import com.google.api.core.ApiFuture; + +public class AsyncGetRecurringAudienceList { + + public static void main(String[] args) throws Exception { + asyncGetRecurringAudienceList(); + } + + public static void asyncGetRecurringAudienceList() 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()) { + GetRecurringAudienceListRequest request = + GetRecurringAudienceListRequest.newBuilder() + .setName( + RecurringAudienceListName.of("[PROPERTY]", "[RECURRING_AUDIENCE_LIST]") + .toString()) + .build(); + ApiFuture future = + alphaAnalyticsDataClient.getRecurringAudienceListCallable().futureCall(request); + // Do something. + RecurringAudienceList response = future.get(); + } + } +} +// [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetRecurringAudienceList_async] diff --git a/java-analytics-data/samples/snippets/generated/com/google/analytics/data/v1alpha/alphaanalyticsdata/getrecurringaudiencelist/SyncGetRecurringAudienceList.java b/java-analytics-data/samples/snippets/generated/com/google/analytics/data/v1alpha/alphaanalyticsdata/getrecurringaudiencelist/SyncGetRecurringAudienceList.java new file mode 100644 index 000000000000..dc20ce3146f4 --- /dev/null +++ b/java-analytics-data/samples/snippets/generated/com/google/analytics/data/v1alpha/alphaanalyticsdata/getrecurringaudiencelist/SyncGetRecurringAudienceList.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 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_GetRecurringAudienceList_sync] +import com.google.analytics.data.v1alpha.AlphaAnalyticsDataClient; +import com.google.analytics.data.v1alpha.GetRecurringAudienceListRequest; +import com.google.analytics.data.v1alpha.RecurringAudienceList; +import com.google.analytics.data.v1alpha.RecurringAudienceListName; + +public class SyncGetRecurringAudienceList { + + public static void main(String[] args) throws Exception { + syncGetRecurringAudienceList(); + } + + public static void syncGetRecurringAudienceList() 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()) { + GetRecurringAudienceListRequest request = + GetRecurringAudienceListRequest.newBuilder() + .setName( + RecurringAudienceListName.of("[PROPERTY]", "[RECURRING_AUDIENCE_LIST]") + .toString()) + .build(); + RecurringAudienceList response = alphaAnalyticsDataClient.getRecurringAudienceList(request); + } + } +} +// [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetRecurringAudienceList_sync] diff --git a/java-analytics-data/samples/snippets/generated/com/google/analytics/data/v1alpha/alphaanalyticsdata/getrecurringaudiencelist/SyncGetRecurringAudienceListRecurringaudiencelistname.java b/java-analytics-data/samples/snippets/generated/com/google/analytics/data/v1alpha/alphaanalyticsdata/getrecurringaudiencelist/SyncGetRecurringAudienceListRecurringaudiencelistname.java new file mode 100644 index 000000000000..c46259da7e80 --- /dev/null +++ b/java-analytics-data/samples/snippets/generated/com/google/analytics/data/v1alpha/alphaanalyticsdata/getrecurringaudiencelist/SyncGetRecurringAudienceListRecurringaudiencelistname.java @@ -0,0 +1,43 @@ +/* + * Copyright 2023 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_GetRecurringAudienceList_Recurringaudiencelistname_sync] +import com.google.analytics.data.v1alpha.AlphaAnalyticsDataClient; +import com.google.analytics.data.v1alpha.RecurringAudienceList; +import com.google.analytics.data.v1alpha.RecurringAudienceListName; + +public class SyncGetRecurringAudienceListRecurringaudiencelistname { + + public static void main(String[] args) throws Exception { + syncGetRecurringAudienceListRecurringaudiencelistname(); + } + + public static void syncGetRecurringAudienceListRecurringaudiencelistname() 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()) { + RecurringAudienceListName name = + RecurringAudienceListName.of("[PROPERTY]", "[RECURRING_AUDIENCE_LIST]"); + RecurringAudienceList response = alphaAnalyticsDataClient.getRecurringAudienceList(name); + } + } +} +// [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetRecurringAudienceList_Recurringaudiencelistname_sync] diff --git a/java-analytics-data/samples/snippets/generated/com/google/analytics/data/v1alpha/alphaanalyticsdata/getrecurringaudiencelist/SyncGetRecurringAudienceListString.java b/java-analytics-data/samples/snippets/generated/com/google/analytics/data/v1alpha/alphaanalyticsdata/getrecurringaudiencelist/SyncGetRecurringAudienceListString.java new file mode 100644 index 000000000000..525f5bcc5547 --- /dev/null +++ b/java-analytics-data/samples/snippets/generated/com/google/analytics/data/v1alpha/alphaanalyticsdata/getrecurringaudiencelist/SyncGetRecurringAudienceListString.java @@ -0,0 +1,43 @@ +/* + * Copyright 2023 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_GetRecurringAudienceList_String_sync] +import com.google.analytics.data.v1alpha.AlphaAnalyticsDataClient; +import com.google.analytics.data.v1alpha.RecurringAudienceList; +import com.google.analytics.data.v1alpha.RecurringAudienceListName; + +public class SyncGetRecurringAudienceListString { + + public static void main(String[] args) throws Exception { + syncGetRecurringAudienceListString(); + } + + public static void syncGetRecurringAudienceListString() 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()) { + String name = + RecurringAudienceListName.of("[PROPERTY]", "[RECURRING_AUDIENCE_LIST]").toString(); + RecurringAudienceList response = alphaAnalyticsDataClient.getRecurringAudienceList(name); + } + } +} +// [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetRecurringAudienceList_String_sync] diff --git a/java-analytics-data/samples/snippets/generated/com/google/analytics/data/v1alpha/alphaanalyticsdata/listrecurringaudiencelists/AsyncListRecurringAudienceLists.java b/java-analytics-data/samples/snippets/generated/com/google/analytics/data/v1alpha/alphaanalyticsdata/listrecurringaudiencelists/AsyncListRecurringAudienceLists.java new file mode 100644 index 000000000000..894d54d21b95 --- /dev/null +++ b/java-analytics-data/samples/snippets/generated/com/google/analytics/data/v1alpha/alphaanalyticsdata/listrecurringaudiencelists/AsyncListRecurringAudienceLists.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 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_ListRecurringAudienceLists_async] +import com.google.analytics.data.v1alpha.AlphaAnalyticsDataClient; +import com.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest; +import com.google.analytics.data.v1alpha.PropertyName; +import com.google.analytics.data.v1alpha.RecurringAudienceList; +import com.google.api.core.ApiFuture; + +public class AsyncListRecurringAudienceLists { + + public static void main(String[] args) throws Exception { + asyncListRecurringAudienceLists(); + } + + public static void asyncListRecurringAudienceLists() 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()) { + ListRecurringAudienceListsRequest request = + ListRecurringAudienceListsRequest.newBuilder() + .setParent(PropertyName.of("[PROPERTY]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + alphaAnalyticsDataClient.listRecurringAudienceListsPagedCallable().futureCall(request); + // Do something. + for (RecurringAudienceList element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_ListRecurringAudienceLists_async] diff --git a/java-analytics-data/samples/snippets/generated/com/google/analytics/data/v1alpha/alphaanalyticsdata/listrecurringaudiencelists/AsyncListRecurringAudienceListsPaged.java b/java-analytics-data/samples/snippets/generated/com/google/analytics/data/v1alpha/alphaanalyticsdata/listrecurringaudiencelists/AsyncListRecurringAudienceListsPaged.java new file mode 100644 index 000000000000..f99a4fa7a702 --- /dev/null +++ b/java-analytics-data/samples/snippets/generated/com/google/analytics/data/v1alpha/alphaanalyticsdata/listrecurringaudiencelists/AsyncListRecurringAudienceListsPaged.java @@ -0,0 +1,62 @@ +/* + * Copyright 2023 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_ListRecurringAudienceLists_Paged_async] +import com.google.analytics.data.v1alpha.AlphaAnalyticsDataClient; +import com.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest; +import com.google.analytics.data.v1alpha.ListRecurringAudienceListsResponse; +import com.google.analytics.data.v1alpha.PropertyName; +import com.google.analytics.data.v1alpha.RecurringAudienceList; +import com.google.common.base.Strings; + +public class AsyncListRecurringAudienceListsPaged { + + public static void main(String[] args) throws Exception { + asyncListRecurringAudienceListsPaged(); + } + + public static void asyncListRecurringAudienceListsPaged() 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()) { + ListRecurringAudienceListsRequest request = + ListRecurringAudienceListsRequest.newBuilder() + .setParent(PropertyName.of("[PROPERTY]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListRecurringAudienceListsResponse response = + alphaAnalyticsDataClient.listRecurringAudienceListsCallable().call(request); + for (RecurringAudienceList element : response.getRecurringAudienceListsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_ListRecurringAudienceLists_Paged_async] diff --git a/java-analytics-data/samples/snippets/generated/com/google/analytics/data/v1alpha/alphaanalyticsdata/listrecurringaudiencelists/SyncListRecurringAudienceLists.java b/java-analytics-data/samples/snippets/generated/com/google/analytics/data/v1alpha/alphaanalyticsdata/listrecurringaudiencelists/SyncListRecurringAudienceLists.java new file mode 100644 index 000000000000..90a0835a75f6 --- /dev/null +++ b/java-analytics-data/samples/snippets/generated/com/google/analytics/data/v1alpha/alphaanalyticsdata/listrecurringaudiencelists/SyncListRecurringAudienceLists.java @@ -0,0 +1,51 @@ +/* + * Copyright 2023 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_ListRecurringAudienceLists_sync] +import com.google.analytics.data.v1alpha.AlphaAnalyticsDataClient; +import com.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest; +import com.google.analytics.data.v1alpha.PropertyName; +import com.google.analytics.data.v1alpha.RecurringAudienceList; + +public class SyncListRecurringAudienceLists { + + public static void main(String[] args) throws Exception { + syncListRecurringAudienceLists(); + } + + public static void syncListRecurringAudienceLists() 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()) { + ListRecurringAudienceListsRequest request = + ListRecurringAudienceListsRequest.newBuilder() + .setParent(PropertyName.of("[PROPERTY]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (RecurringAudienceList element : + alphaAnalyticsDataClient.listRecurringAudienceLists(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_ListRecurringAudienceLists_sync] diff --git a/java-analytics-data/samples/snippets/generated/com/google/analytics/data/v1alpha/alphaanalyticsdata/listrecurringaudiencelists/SyncListRecurringAudienceListsPropertyname.java b/java-analytics-data/samples/snippets/generated/com/google/analytics/data/v1alpha/alphaanalyticsdata/listrecurringaudiencelists/SyncListRecurringAudienceListsPropertyname.java new file mode 100644 index 000000000000..3dbda158613b --- /dev/null +++ b/java-analytics-data/samples/snippets/generated/com/google/analytics/data/v1alpha/alphaanalyticsdata/listrecurringaudiencelists/SyncListRecurringAudienceListsPropertyname.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 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_ListRecurringAudienceLists_Propertyname_sync] +import com.google.analytics.data.v1alpha.AlphaAnalyticsDataClient; +import com.google.analytics.data.v1alpha.PropertyName; +import com.google.analytics.data.v1alpha.RecurringAudienceList; + +public class SyncListRecurringAudienceListsPropertyname { + + public static void main(String[] args) throws Exception { + syncListRecurringAudienceListsPropertyname(); + } + + public static void syncListRecurringAudienceListsPropertyname() 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()) { + PropertyName parent = PropertyName.of("[PROPERTY]"); + for (RecurringAudienceList element : + alphaAnalyticsDataClient.listRecurringAudienceLists(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_ListRecurringAudienceLists_Propertyname_sync] diff --git a/java-analytics-data/samples/snippets/generated/com/google/analytics/data/v1alpha/alphaanalyticsdata/listrecurringaudiencelists/SyncListRecurringAudienceListsString.java b/java-analytics-data/samples/snippets/generated/com/google/analytics/data/v1alpha/alphaanalyticsdata/listrecurringaudiencelists/SyncListRecurringAudienceListsString.java new file mode 100644 index 000000000000..c1a829e7bd86 --- /dev/null +++ b/java-analytics-data/samples/snippets/generated/com/google/analytics/data/v1alpha/alphaanalyticsdata/listrecurringaudiencelists/SyncListRecurringAudienceListsString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 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_ListRecurringAudienceLists_String_sync] +import com.google.analytics.data.v1alpha.AlphaAnalyticsDataClient; +import com.google.analytics.data.v1alpha.PropertyName; +import com.google.analytics.data.v1alpha.RecurringAudienceList; + +public class SyncListRecurringAudienceListsString { + + public static void main(String[] args) throws Exception { + syncListRecurringAudienceListsString(); + } + + public static void syncListRecurringAudienceListsString() 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()) { + String parent = PropertyName.of("[PROPERTY]").toString(); + for (RecurringAudienceList element : + alphaAnalyticsDataClient.listRecurringAudienceLists(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_ListRecurringAudienceLists_String_sync]