From 09f8faf935d6f129ea832194a460d9af863319c9 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 8 Jul 2022 15:45:48 -0400 Subject: [PATCH] feat: release the Google Analytics Admin API V1 Beta (#424) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: release the Google Analytics Admin API V1 Beta PiperOrigin-RevId: 458479633 Source-Link: https://github.com/googleapis/googleapis/commit/6ef569eaf4fe2d540de4173887698ae3dde4aba9 Source-Link: https://github.com/googleapis/googleapis-gen/commit/e37591034b71728fcd61acd61b0be0caa7625c9e Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZTM3NTkxMDM0YjcxNzI4ZmNkNjFhY2Q2MWIwYmUwY2FhNzYyNWM5ZSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * chore: remove iam dependency * chore: remove unused proto-google-common-protos Co-authored-by: Owl Bot Co-authored-by: alicejli --- java-analytics-admin/README.md | 6 +- .../google-analytics-admin-bom/pom.xml | 10 + .../google-analytics-admin/pom.xml | 9 + .../v1beta/AnalyticsAdminServiceClient.java | 6399 +++++++++++++++++ .../v1beta/AnalyticsAdminServiceSettings.java | 799 ++ .../admin/v1beta/gapic_metadata.json | 159 + .../analytics/admin/v1beta/package-info.java | 41 + .../stub/AnalyticsAdminServiceStub.java | 393 + .../AnalyticsAdminServiceStubSettings.java | 2393 ++++++ ...cAnalyticsAdminServiceCallableFactory.java | 115 + .../stub/GrpcAnalyticsAdminServiceStub.java | 1920 +++++ ...nAnalyticsAdminServiceCallableFactory.java | 105 + .../HttpJsonAnalyticsAdminServiceStub.java | 2958 ++++++++ ...alyticsAdminServiceClientHttpJsonTest.java | 4094 +++++++++++ .../AnalyticsAdminServiceClientTest.java | 3563 +++++++++ .../v1beta/MockAnalyticsAdminService.java | 59 + .../v1beta/MockAnalyticsAdminServiceImpl.java | 1060 +++ .../pom.xml | 65 + .../v1beta/AnalyticsAdminServiceGrpc.java | 6139 ++++++++++++++++ java-analytics-admin/pom.xml | 12 + .../clirr-ignored-differences.xml | 19 + .../pom.xml | 42 + .../analytics/admin/v1beta/Account.java | 1688 +++++ .../analytics/admin/v1beta/AccountName.java | 168 + .../admin/v1beta/AccountOrBuilder.java | 194 + .../admin/v1beta/AccountSummary.java | 1535 ++++ .../admin/v1beta/AccountSummaryOrBuilder.java | 161 + .../AcknowledgeUserDataCollectionRequest.java | 888 +++ ...dgeUserDataCollectionRequestOrBuilder.java | 91 + ...AcknowledgeUserDataCollectionResponse.java | 476 ++ ...geUserDataCollectionResponseOrBuilder.java | 24 + .../analytics/admin/v1beta/ActionType.java | 198 + .../analytics/admin/v1beta/ActorType.java | 199 + .../admin/v1beta/AnalyticsAdminProto.java | 1256 ++++ .../v1beta/ArchiveCustomDimensionRequest.java | 667 ++ ...rchiveCustomDimensionRequestOrBuilder.java | 56 + .../v1beta/ArchiveCustomMetricRequest.java | 663 ++ .../ArchiveCustomMetricRequestOrBuilder.java | 56 + .../admin/v1beta/ChangeHistoryChange.java | 4831 +++++++++++++ .../v1beta/ChangeHistoryChangeOrBuilder.java | 167 + .../admin/v1beta/ChangeHistoryEvent.java | 1884 +++++ .../v1beta/ChangeHistoryEventOrBuilder.java | 210 + .../v1beta/ChangeHistoryResourceType.java | 399 + .../admin/v1beta/ConversionEvent.java | 1324 ++++ .../admin/v1beta/ConversionEventName.java | 198 + .../v1beta/ConversionEventOrBuilder.java | 148 + .../v1beta/CreateConversionEventRequest.java | 970 +++ ...CreateConversionEventRequestOrBuilder.java | 97 + .../v1beta/CreateCustomDimensionRequest.java | 963 +++ ...CreateCustomDimensionRequestOrBuilder.java | 95 + .../v1beta/CreateCustomMetricRequest.java | 955 +++ .../CreateCustomMetricRequestOrBuilder.java | 95 + .../admin/v1beta/CreateDataStreamRequest.java | 955 +++ .../CreateDataStreamRequestOrBuilder.java | 95 + .../v1beta/CreateFirebaseLinkRequest.java | 962 +++ .../CreateFirebaseLinkRequestOrBuilder.java | 97 + .../v1beta/CreateGoogleAdsLinkRequest.java | 958 +++ .../CreateGoogleAdsLinkRequestOrBuilder.java | 95 + ...reateMeasurementProtocolSecretRequest.java | 992 +++ ...urementProtocolSecretRequestOrBuilder.java | 98 + .../admin/v1beta/CreatePropertyRequest.java | 772 ++ .../CreatePropertyRequestOrBuilder.java | 69 + .../admin/v1beta/CustomDimension.java | 1698 +++++ .../admin/v1beta/CustomDimensionName.java | 198 + .../v1beta/CustomDimensionOrBuilder.java | 195 + .../analytics/admin/v1beta/CustomMetric.java | 2712 +++++++ .../admin/v1beta/CustomMetricName.java | 192 + .../admin/v1beta/CustomMetricOrBuilder.java | 292 + .../admin/v1beta/DataRetentionSettings.java | 1153 +++ .../v1beta/DataRetentionSettingsName.java | 169 + .../DataRetentionSettingsOrBuilder.java | 95 + .../admin/v1beta/DataSharingSettings.java | 1141 +++ .../admin/v1beta/DataSharingSettingsName.java | 168 + .../v1beta/DataSharingSettingsOrBuilder.java | 123 + .../analytics/admin/v1beta/DataStream.java | 5779 +++++++++++++++ .../admin/v1beta/DataStreamName.java | 192 + .../admin/v1beta/DataStreamOrBuilder.java | 315 + .../admin/v1beta/DeleteAccountRequest.java | 667 ++ .../v1beta/DeleteAccountRequestOrBuilder.java | 58 + .../v1beta/DeleteConversionEventRequest.java | 673 ++ ...DeleteConversionEventRequestOrBuilder.java | 58 + .../admin/v1beta/DeleteDataStreamRequest.java | 660 ++ .../DeleteDataStreamRequestOrBuilder.java | 56 + .../v1beta/DeleteFirebaseLinkRequest.java | 660 ++ .../DeleteFirebaseLinkRequestOrBuilder.java | 56 + .../v1beta/DeleteGoogleAdsLinkRequest.java | 656 ++ .../DeleteGoogleAdsLinkRequestOrBuilder.java | 54 + ...eleteMeasurementProtocolSecretRequest.java | 685 ++ ...urementProtocolSecretRequestOrBuilder.java | 58 + .../admin/v1beta/DeletePropertyRequest.java | 667 ++ .../DeletePropertyRequestOrBuilder.java | 58 + .../analytics/admin/v1beta/FirebaseLink.java | 1143 +++ .../admin/v1beta/FirebaseLinkName.java | 192 + .../admin/v1beta/FirebaseLinkOrBuilder.java | 123 + .../admin/v1beta/GetAccountRequest.java | 666 ++ .../v1beta/GetAccountRequestOrBuilder.java | 58 + .../v1beta/GetConversionEventRequest.java | 667 ++ .../GetConversionEventRequestOrBuilder.java | 58 + .../v1beta/GetCustomDimensionRequest.java | 660 ++ .../GetCustomDimensionRequestOrBuilder.java | 56 + .../admin/v1beta/GetCustomMetricRequest.java | 660 ++ .../GetCustomMetricRequestOrBuilder.java | 56 + .../GetDataRetentionSettingsRequest.java | 684 ++ ...DataRetentionSettingsRequestOrBuilder.java | 60 + .../v1beta/GetDataSharingSettingsRequest.java | 674 ++ ...etDataSharingSettingsRequestOrBuilder.java | 58 + .../admin/v1beta/GetDataStreamRequest.java | 660 ++ .../v1beta/GetDataStreamRequestOrBuilder.java | 56 + .../GetMeasurementProtocolSecretRequest.java | 680 ++ ...urementProtocolSecretRequestOrBuilder.java | 58 + .../admin/v1beta/GetPropertyRequest.java | 666 ++ .../v1beta/GetPropertyRequestOrBuilder.java | 58 + .../analytics/admin/v1beta/GoogleAdsLink.java | 2001 ++++++ .../admin/v1beta/GoogleAdsLinkName.java | 194 + .../admin/v1beta/GoogleAdsLinkOrBuilder.java | 237 + .../admin/v1beta/IndustryCategory.java | 704 ++ .../v1beta/ListAccountSummariesRequest.java | 766 ++ .../ListAccountSummariesRequestOrBuilder.java | 72 + .../v1beta/ListAccountSummariesResponse.java | 1160 +++ ...ListAccountSummariesResponseOrBuilder.java | 104 + .../admin/v1beta/ListAccountsRequest.java | 860 +++ .../v1beta/ListAccountsRequestOrBuilder.java | 87 + .../admin/v1beta/ListAccountsResponse.java | 1138 +++ .../v1beta/ListAccountsResponseOrBuilder.java | 104 + .../v1beta/ListConversionEventsRequest.java | 962 +++ .../ListConversionEventsRequestOrBuilder.java | 102 + .../v1beta/ListConversionEventsResponse.java | 1161 +++ ...ListConversionEventsResponseOrBuilder.java | 105 + .../v1beta/ListCustomDimensionsRequest.java | 955 +++ .../ListCustomDimensionsRequestOrBuilder.java | 100 + .../v1beta/ListCustomDimensionsResponse.java | 1161 +++ ...ListCustomDimensionsResponseOrBuilder.java | 105 + .../v1beta/ListCustomMetricsRequest.java | 951 +++ .../ListCustomMetricsRequestOrBuilder.java | 100 + .../v1beta/ListCustomMetricsResponse.java | 1150 +++ .../ListCustomMetricsResponseOrBuilder.java | 104 + .../admin/v1beta/ListDataStreamsRequest.java | 951 +++ .../ListDataStreamsRequestOrBuilder.java | 100 + .../admin/v1beta/ListDataStreamsResponse.java | 1142 +++ .../ListDataStreamsResponseOrBuilder.java | 104 + .../v1beta/ListFirebaseLinksRequest.java | 962 +++ .../ListFirebaseLinksRequestOrBuilder.java | 103 + .../v1beta/ListFirebaseLinksResponse.java | 1164 +++ .../ListFirebaseLinksResponseOrBuilder.java | 108 + .../v1beta/ListGoogleAdsLinksRequest.java | 951 +++ .../ListGoogleAdsLinksRequestOrBuilder.java | 100 + .../v1beta/ListGoogleAdsLinksResponse.java | 1154 +++ .../ListGoogleAdsLinksResponseOrBuilder.java | 104 + ...ListMeasurementProtocolSecretsRequest.java | 982 +++ ...rementProtocolSecretsRequestOrBuilder.java | 104 + ...istMeasurementProtocolSecretsResponse.java | 1237 ++++ ...ementProtocolSecretsResponseOrBuilder.java | 117 + .../admin/v1beta/ListPropertiesRequest.java | 1137 +++ .../ListPropertiesRequestOrBuilder.java | 140 + .../admin/v1beta/ListPropertiesResponse.java | 1140 +++ .../ListPropertiesResponseOrBuilder.java | 104 + .../v1beta/MeasurementProtocolSecret.java | 1032 +++ .../v1beta/MeasurementProtocolSecretName.java | 241 + .../MeasurementProtocolSecretOrBuilder.java | 110 + .../analytics/admin/v1beta/Property.java | 3383 +++++++++ .../analytics/admin/v1beta/PropertyName.java | 168 + .../admin/v1beta/PropertyOrBuilder.java | 463 ++ .../admin/v1beta/PropertySummary.java | 1183 +++ .../v1beta/PropertySummaryOrBuilder.java | 135 + .../analytics/admin/v1beta/PropertyType.java | 198 + .../v1beta/ProvisionAccountTicketRequest.java | 930 +++ ...rovisionAccountTicketRequestOrBuilder.java | 87 + .../ProvisionAccountTicketResponse.java | 647 ++ ...ovisionAccountTicketResponseOrBuilder.java | 50 + .../admin/v1beta/ResourcesProto.java | 558 ++ .../SearchChangeHistoryEventsRequest.java | 2935 ++++++++ ...chChangeHistoryEventsRequestOrBuilder.java | 421 ++ .../SearchChangeHistoryEventsResponse.java | 1193 +++ ...hChangeHistoryEventsResponseOrBuilder.java | 110 + .../analytics/admin/v1beta/ServiceLevel.java | 176 + .../admin/v1beta/UpdateAccountRequest.java | 1080 +++ .../v1beta/UpdateAccountRequestOrBuilder.java | 113 + .../v1beta/UpdateCustomDimensionRequest.java | 1053 +++ ...UpdateCustomDimensionRequestOrBuilder.java | 104 + .../v1beta/UpdateCustomMetricRequest.java | 1045 +++ .../UpdateCustomMetricRequestOrBuilder.java | 104 + .../UpdateDataRetentionSettingsRequest.java | 1101 +++ ...DataRetentionSettingsRequestOrBuilder.java | 114 + .../admin/v1beta/UpdateDataStreamRequest.java | 1045 +++ .../UpdateDataStreamRequestOrBuilder.java | 104 + .../v1beta/UpdateGoogleAdsLinkRequest.java | 1048 +++ .../UpdateGoogleAdsLinkRequestOrBuilder.java | 104 + ...pdateMeasurementProtocolSecretRequest.java | 1063 +++ ...urementProtocolSecretRequestOrBuilder.java | 102 + .../admin/v1beta/UpdatePropertyRequest.java | 1092 +++ .../UpdatePropertyRequestOrBuilder.java | 116 + .../admin/v1beta/analytics_admin.proto | 1333 ++++ .../analytics/admin/v1beta/resources.proto | 905 +++ java-analytics-admin/versions.txt | 2 + 194 files changed, 135522 insertions(+), 3 deletions(-) create mode 100644 java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1beta/AnalyticsAdminServiceClient.java create mode 100644 java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1beta/AnalyticsAdminServiceSettings.java create mode 100644 java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1beta/gapic_metadata.json create mode 100644 java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1beta/package-info.java create mode 100644 java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1beta/stub/AnalyticsAdminServiceStub.java create mode 100644 java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1beta/stub/AnalyticsAdminServiceStubSettings.java create mode 100644 java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1beta/stub/GrpcAnalyticsAdminServiceCallableFactory.java create mode 100644 java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1beta/stub/GrpcAnalyticsAdminServiceStub.java create mode 100644 java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1beta/stub/HttpJsonAnalyticsAdminServiceCallableFactory.java create mode 100644 java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1beta/stub/HttpJsonAnalyticsAdminServiceStub.java create mode 100644 java-analytics-admin/google-analytics-admin/src/test/java/com/google/analytics/admin/v1beta/AnalyticsAdminServiceClientHttpJsonTest.java create mode 100644 java-analytics-admin/google-analytics-admin/src/test/java/com/google/analytics/admin/v1beta/AnalyticsAdminServiceClientTest.java create mode 100644 java-analytics-admin/google-analytics-admin/src/test/java/com/google/analytics/admin/v1beta/MockAnalyticsAdminService.java create mode 100644 java-analytics-admin/google-analytics-admin/src/test/java/com/google/analytics/admin/v1beta/MockAnalyticsAdminServiceImpl.java create mode 100644 java-analytics-admin/grpc-google-analytics-admin-v1beta/pom.xml create mode 100644 java-analytics-admin/grpc-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/AnalyticsAdminServiceGrpc.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/clirr-ignored-differences.xml create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/pom.xml create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/Account.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/AccountName.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/AccountOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/AccountSummary.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/AccountSummaryOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/AcknowledgeUserDataCollectionRequest.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/AcknowledgeUserDataCollectionRequestOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/AcknowledgeUserDataCollectionResponse.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/AcknowledgeUserDataCollectionResponseOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ActionType.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ActorType.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/AnalyticsAdminProto.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ArchiveCustomDimensionRequest.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ArchiveCustomDimensionRequestOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ArchiveCustomMetricRequest.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ArchiveCustomMetricRequestOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ChangeHistoryChange.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ChangeHistoryChangeOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ChangeHistoryEvent.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ChangeHistoryEventOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ChangeHistoryResourceType.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ConversionEvent.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ConversionEventName.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ConversionEventOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CreateConversionEventRequest.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CreateConversionEventRequestOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CreateCustomDimensionRequest.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CreateCustomDimensionRequestOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CreateCustomMetricRequest.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CreateCustomMetricRequestOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CreateDataStreamRequest.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CreateDataStreamRequestOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CreateFirebaseLinkRequest.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CreateFirebaseLinkRequestOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CreateGoogleAdsLinkRequest.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CreateGoogleAdsLinkRequestOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CreateMeasurementProtocolSecretRequest.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CreateMeasurementProtocolSecretRequestOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CreatePropertyRequest.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CreatePropertyRequestOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CustomDimension.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CustomDimensionName.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CustomDimensionOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CustomMetric.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CustomMetricName.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CustomMetricOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DataRetentionSettings.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DataRetentionSettingsName.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DataRetentionSettingsOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DataSharingSettings.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DataSharingSettingsName.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DataSharingSettingsOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DataStream.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DataStreamName.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DataStreamOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DeleteAccountRequest.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DeleteAccountRequestOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DeleteConversionEventRequest.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DeleteConversionEventRequestOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DeleteDataStreamRequest.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DeleteDataStreamRequestOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DeleteFirebaseLinkRequest.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DeleteFirebaseLinkRequestOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DeleteGoogleAdsLinkRequest.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DeleteGoogleAdsLinkRequestOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DeleteMeasurementProtocolSecretRequest.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DeleteMeasurementProtocolSecretRequestOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DeletePropertyRequest.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DeletePropertyRequestOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/FirebaseLink.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/FirebaseLinkName.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/FirebaseLinkOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetAccountRequest.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetAccountRequestOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetConversionEventRequest.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetConversionEventRequestOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetCustomDimensionRequest.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetCustomDimensionRequestOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetCustomMetricRequest.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetCustomMetricRequestOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetDataRetentionSettingsRequest.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetDataRetentionSettingsRequestOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetDataSharingSettingsRequest.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetDataSharingSettingsRequestOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetDataStreamRequest.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetDataStreamRequestOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetMeasurementProtocolSecretRequest.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetMeasurementProtocolSecretRequestOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetPropertyRequest.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetPropertyRequestOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GoogleAdsLink.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GoogleAdsLinkName.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GoogleAdsLinkOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/IndustryCategory.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListAccountSummariesRequest.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListAccountSummariesRequestOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListAccountSummariesResponse.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListAccountSummariesResponseOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListAccountsRequest.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListAccountsRequestOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListAccountsResponse.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListAccountsResponseOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListConversionEventsRequest.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListConversionEventsRequestOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListConversionEventsResponse.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListConversionEventsResponseOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListCustomDimensionsRequest.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListCustomDimensionsRequestOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListCustomDimensionsResponse.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListCustomDimensionsResponseOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListCustomMetricsRequest.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListCustomMetricsRequestOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListCustomMetricsResponse.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListCustomMetricsResponseOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListDataStreamsRequest.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListDataStreamsRequestOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListDataStreamsResponse.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListDataStreamsResponseOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListFirebaseLinksRequest.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListFirebaseLinksRequestOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListFirebaseLinksResponse.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListFirebaseLinksResponseOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListGoogleAdsLinksRequest.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListGoogleAdsLinksRequestOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListGoogleAdsLinksResponse.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListGoogleAdsLinksResponseOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListMeasurementProtocolSecretsRequest.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListMeasurementProtocolSecretsRequestOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListMeasurementProtocolSecretsResponse.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListMeasurementProtocolSecretsResponseOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListPropertiesRequest.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListPropertiesRequestOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListPropertiesResponse.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListPropertiesResponseOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/MeasurementProtocolSecret.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/MeasurementProtocolSecretName.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/MeasurementProtocolSecretOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/Property.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/PropertyName.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/PropertyOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/PropertySummary.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/PropertySummaryOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/PropertyType.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ProvisionAccountTicketRequest.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ProvisionAccountTicketRequestOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ProvisionAccountTicketResponse.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ProvisionAccountTicketResponseOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ResourcesProto.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/SearchChangeHistoryEventsRequest.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/SearchChangeHistoryEventsRequestOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/SearchChangeHistoryEventsResponse.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/SearchChangeHistoryEventsResponseOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ServiceLevel.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/UpdateAccountRequest.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/UpdateAccountRequestOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/UpdateCustomDimensionRequest.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/UpdateCustomDimensionRequestOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/UpdateCustomMetricRequest.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/UpdateCustomMetricRequestOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/UpdateDataRetentionSettingsRequest.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/UpdateDataRetentionSettingsRequestOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/UpdateDataStreamRequest.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/UpdateDataStreamRequestOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/UpdateGoogleAdsLinkRequest.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/UpdateGoogleAdsLinkRequestOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/UpdateMeasurementProtocolSecretRequest.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/UpdateMeasurementProtocolSecretRequestOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/UpdatePropertyRequest.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/UpdatePropertyRequestOrBuilder.java create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/proto/google/analytics/admin/v1beta/analytics_admin.proto create mode 100644 java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/proto/google/analytics/admin/v1beta/resources.proto diff --git a/java-analytics-admin/README.md b/java-analytics-admin/README.md index 32ec3bea306b..3f550a4bb1e8 100644 --- a/java-analytics-admin/README.md +++ b/java-analytics-admin/README.md @@ -22,20 +22,20 @@ If you are using Maven, add this to your pom.xml file: com.google.analytics google-analytics-admin - 0.10.2 + 0.11.0 ``` If you are using Gradle without BOM, add this to your dependencies ```Groovy -implementation 'com.google.analytics:google-analytics-admin:0.10.2' +implementation 'com.google.analytics:google-analytics-admin:0.11.0' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.analytics" % "google-analytics-admin" % "0.10.2" +libraryDependencies += "com.google.analytics" % "google-analytics-admin" % "0.11.0" ``` ## Authentication diff --git a/java-analytics-admin/google-analytics-admin-bom/pom.xml b/java-analytics-admin/google-analytics-admin-bom/pom.xml index 36aebf099940..9e68d5a65cbe 100644 --- a/java-analytics-admin/google-analytics-admin-bom/pom.xml +++ b/java-analytics-admin/google-analytics-admin-bom/pom.xml @@ -63,11 +63,21 @@ grpc-google-analytics-admin-v1alpha 0.11.1-SNAPSHOT + + com.google.api.grpc + grpc-google-analytics-admin-v1beta + 0.11.1-SNAPSHOT + com.google.api.grpc proto-google-analytics-admin-v1alpha 0.11.1-SNAPSHOT + + com.google.api.grpc + proto-google-analytics-admin-v1beta + 0.11.1-SNAPSHOT + diff --git a/java-analytics-admin/google-analytics-admin/pom.xml b/java-analytics-admin/google-analytics-admin/pom.xml index c2f6b3f329ed..c9405d565e13 100644 --- a/java-analytics-admin/google-analytics-admin/pom.xml +++ b/java-analytics-admin/google-analytics-admin/pom.xml @@ -42,6 +42,10 @@ proto-google-common-protos + + com.google.api.grpc + proto-google-analytics-admin-v1beta + com.google.api.grpc proto-google-analytics-admin-v1alpha @@ -79,6 +83,11 @@ grpc-google-analytics-admin-v1alpha test + + com.google.api.grpc + grpc-google-analytics-admin-v1beta + test + com.google.api diff --git a/java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1beta/AnalyticsAdminServiceClient.java b/java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1beta/AnalyticsAdminServiceClient.java new file mode 100644 index 000000000000..4fd54231d2c5 --- /dev/null +++ b/java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1beta/AnalyticsAdminServiceClient.java @@ -0,0 +1,6399 @@ +/* + * Copyright 2022 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.admin.v1beta; + +import com.google.analytics.admin.v1beta.stub.AnalyticsAdminServiceStub; +import com.google.analytics.admin.v1beta.stub.AnalyticsAdminServiceStubSettings; +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Service Interface for the Analytics Admin API (GA4). + * + *

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

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+ *     AnalyticsAdminServiceClient.create()) {
+ *   AccountName name = AccountName.of("[ACCOUNT]");
+ *   Account response = analyticsAdminServiceClient.getAccount(name);
+ * }
+ * }
+ * + *

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

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

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

See the individual methods for example code. + * + *

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

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

To customize credentials: + * + *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * AnalyticsAdminServiceSettings analyticsAdminServiceSettings =
+ *     AnalyticsAdminServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * AnalyticsAdminServiceClient analyticsAdminServiceClient =
+ *     AnalyticsAdminServiceClient.create(analyticsAdminServiceSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * AnalyticsAdminServiceSettings analyticsAdminServiceSettings =
+ *     AnalyticsAdminServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * AnalyticsAdminServiceClient analyticsAdminServiceClient =
+ *     AnalyticsAdminServiceClient.create(analyticsAdminServiceSettings);
+ * }
+ * + *

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

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * AnalyticsAdminServiceSettings analyticsAdminServiceSettings =
+ *     AnalyticsAdminServiceSettings.newBuilder()
+ *         .setTransportChannelProvider(
+ *             AnalyticsAdminServiceSettings.defaultHttpJsonTransportProviderBuilder().build())
+ *         .build();
+ * AnalyticsAdminServiceClient analyticsAdminServiceClient =
+ *     AnalyticsAdminServiceClient.create(analyticsAdminServiceSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class AnalyticsAdminServiceClient implements BackgroundResource { + private final AnalyticsAdminServiceSettings settings; + private final AnalyticsAdminServiceStub stub; + + /** Constructs an instance of AnalyticsAdminServiceClient with default settings. */ + public static final AnalyticsAdminServiceClient create() throws IOException { + return create(AnalyticsAdminServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of AnalyticsAdminServiceClient, using the given settings. The channels + * are created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final AnalyticsAdminServiceClient create(AnalyticsAdminServiceSettings settings) + throws IOException { + return new AnalyticsAdminServiceClient(settings); + } + + /** + * Constructs an instance of AnalyticsAdminServiceClient, using the given stub for making calls. + * This is for advanced usage - prefer using create(AnalyticsAdminServiceSettings). + */ + public static final AnalyticsAdminServiceClient create(AnalyticsAdminServiceStub stub) { + return new AnalyticsAdminServiceClient(stub); + } + + /** + * Constructs an instance of AnalyticsAdminServiceClient, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected AnalyticsAdminServiceClient(AnalyticsAdminServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((AnalyticsAdminServiceStubSettings) settings.getStubSettings()).createStub(); + } + + protected AnalyticsAdminServiceClient(AnalyticsAdminServiceStub stub) { + this.settings = null; + this.stub = stub; + } + + public final AnalyticsAdminServiceSettings getSettings() { + return settings; + } + + public AnalyticsAdminServiceStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lookup for a single Account. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   AccountName name = AccountName.of("[ACCOUNT]");
+   *   Account response = analyticsAdminServiceClient.getAccount(name);
+   * }
+   * }
+ * + * @param name Required. The name of the account to lookup. Format: accounts/{account} Example: + * "accounts/100" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Account getAccount(AccountName name) { + GetAccountRequest request = + GetAccountRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getAccount(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lookup for a single Account. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   String name = AccountName.of("[ACCOUNT]").toString();
+   *   Account response = analyticsAdminServiceClient.getAccount(name);
+   * }
+   * }
+ * + * @param name Required. The name of the account to lookup. Format: accounts/{account} Example: + * "accounts/100" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Account getAccount(String name) { + GetAccountRequest request = GetAccountRequest.newBuilder().setName(name).build(); + return getAccount(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lookup for a single Account. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   GetAccountRequest request =
+   *       GetAccountRequest.newBuilder().setName(AccountName.of("[ACCOUNT]").toString()).build();
+   *   Account response = analyticsAdminServiceClient.getAccount(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 Account getAccount(GetAccountRequest request) { + return getAccountCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lookup for a single Account. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   GetAccountRequest request =
+   *       GetAccountRequest.newBuilder().setName(AccountName.of("[ACCOUNT]").toString()).build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.getAccountCallable().futureCall(request);
+   *   // Do something.
+   *   Account response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getAccountCallable() { + return stub.getAccountCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns all accounts accessible by the caller. + * + *

Note that these accounts might not currently have GA4 properties. Soft-deleted (ie: + * "trashed") accounts are excluded by default. Returns an empty list if no relevant accounts are + * found. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   ListAccountsRequest request =
+   *       ListAccountsRequest.newBuilder()
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setShowDeleted(true)
+   *           .build();
+   *   for (Account element : analyticsAdminServiceClient.listAccounts(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 ListAccountsPagedResponse listAccounts(ListAccountsRequest request) { + return listAccountsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns all accounts accessible by the caller. + * + *

Note that these accounts might not currently have GA4 properties. Soft-deleted (ie: + * "trashed") accounts are excluded by default. Returns an empty list if no relevant accounts are + * found. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   ListAccountsRequest request =
+   *       ListAccountsRequest.newBuilder()
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setShowDeleted(true)
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.listAccountsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Account element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listAccountsPagedCallable() { + return stub.listAccountsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns all accounts accessible by the caller. + * + *

Note that these accounts might not currently have GA4 properties. Soft-deleted (ie: + * "trashed") accounts are excluded by default. Returns an empty list if no relevant accounts are + * found. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   ListAccountsRequest request =
+   *       ListAccountsRequest.newBuilder()
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setShowDeleted(true)
+   *           .build();
+   *   while (true) {
+   *     ListAccountsResponse response =
+   *         analyticsAdminServiceClient.listAccountsCallable().call(request);
+   *     for (Account element : response.getAccountsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listAccountsCallable() { + return stub.listAccountsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Marks target Account as soft-deleted (ie: "trashed") and returns it. + * + *

This API does not have a method to restore soft-deleted accounts. However, they can be + * restored using the Trash Can UI. + * + *

If the accounts are not restored before the expiration time, the account and all child + * resources (eg: Properties, GoogleAdsLinks, Streams, UserLinks) will be permanently purged. + * https://support.google.com/analytics/answer/6154772 + * + *

Returns an error if the target is not found. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   AccountName name = AccountName.of("[ACCOUNT]");
+   *   analyticsAdminServiceClient.deleteAccount(name);
+   * }
+   * }
+ * + * @param name Required. The name of the Account to soft-delete. Format: accounts/{account} + * Example: "accounts/100" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteAccount(AccountName name) { + DeleteAccountRequest request = + DeleteAccountRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteAccount(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Marks target Account as soft-deleted (ie: "trashed") and returns it. + * + *

This API does not have a method to restore soft-deleted accounts. However, they can be + * restored using the Trash Can UI. + * + *

If the accounts are not restored before the expiration time, the account and all child + * resources (eg: Properties, GoogleAdsLinks, Streams, UserLinks) will be permanently purged. + * https://support.google.com/analytics/answer/6154772 + * + *

Returns an error if the target is not found. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   String name = AccountName.of("[ACCOUNT]").toString();
+   *   analyticsAdminServiceClient.deleteAccount(name);
+   * }
+   * }
+ * + * @param name Required. The name of the Account to soft-delete. Format: accounts/{account} + * Example: "accounts/100" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteAccount(String name) { + DeleteAccountRequest request = DeleteAccountRequest.newBuilder().setName(name).build(); + deleteAccount(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Marks target Account as soft-deleted (ie: "trashed") and returns it. + * + *

This API does not have a method to restore soft-deleted accounts. However, they can be + * restored using the Trash Can UI. + * + *

If the accounts are not restored before the expiration time, the account and all child + * resources (eg: Properties, GoogleAdsLinks, Streams, UserLinks) will be permanently purged. + * https://support.google.com/analytics/answer/6154772 + * + *

Returns an error if the target is not found. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   DeleteAccountRequest request =
+   *       DeleteAccountRequest.newBuilder().setName(AccountName.of("[ACCOUNT]").toString()).build();
+   *   analyticsAdminServiceClient.deleteAccount(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteAccount(DeleteAccountRequest request) { + deleteAccountCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Marks target Account as soft-deleted (ie: "trashed") and returns it. + * + *

This API does not have a method to restore soft-deleted accounts. However, they can be + * restored using the Trash Can UI. + * + *

If the accounts are not restored before the expiration time, the account and all child + * resources (eg: Properties, GoogleAdsLinks, Streams, UserLinks) will be permanently purged. + * https://support.google.com/analytics/answer/6154772 + * + *

Returns an error if the target is not found. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   DeleteAccountRequest request =
+   *       DeleteAccountRequest.newBuilder().setName(AccountName.of("[ACCOUNT]").toString()).build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.deleteAccountCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteAccountCallable() { + return stub.deleteAccountCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an account. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   Account account = Account.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Account response = analyticsAdminServiceClient.updateAccount(account, updateMask);
+   * }
+   * }
+ * + * @param account Required. The account to update. The account's `name` field is used to identify + * the account. + * @param updateMask Required. The list of fields to be updated. Field names must be in snake case + * (e.g., "field_to_update"). Omitted fields will not be updated. To replace the entire + * entity, use one path with the string "*" to match all fields. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Account updateAccount(Account account, FieldMask updateMask) { + UpdateAccountRequest request = + UpdateAccountRequest.newBuilder().setAccount(account).setUpdateMask(updateMask).build(); + return updateAccount(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an account. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   UpdateAccountRequest request =
+   *       UpdateAccountRequest.newBuilder()
+   *           .setAccount(Account.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Account response = analyticsAdminServiceClient.updateAccount(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 Account updateAccount(UpdateAccountRequest request) { + return updateAccountCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an account. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   UpdateAccountRequest request =
+   *       UpdateAccountRequest.newBuilder()
+   *           .setAccount(Account.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.updateAccountCallable().futureCall(request);
+   *   // Do something.
+   *   Account response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateAccountCallable() { + return stub.updateAccountCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Requests a ticket for creating an account. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   ProvisionAccountTicketRequest request =
+   *       ProvisionAccountTicketRequest.newBuilder()
+   *           .setAccount(Account.newBuilder().build())
+   *           .setRedirectUri("redirectUri1970337776")
+   *           .build();
+   *   ProvisionAccountTicketResponse response =
+   *       analyticsAdminServiceClient.provisionAccountTicket(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 ProvisionAccountTicketResponse provisionAccountTicket( + ProvisionAccountTicketRequest request) { + return provisionAccountTicketCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Requests a ticket for creating an account. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   ProvisionAccountTicketRequest request =
+   *       ProvisionAccountTicketRequest.newBuilder()
+   *           .setAccount(Account.newBuilder().build())
+   *           .setRedirectUri("redirectUri1970337776")
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.provisionAccountTicketCallable().futureCall(request);
+   *   // Do something.
+   *   ProvisionAccountTicketResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + provisionAccountTicketCallable() { + return stub.provisionAccountTicketCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns summaries of all accounts accessible by the caller. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   ListAccountSummariesRequest request =
+   *       ListAccountSummariesRequest.newBuilder()
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (AccountSummary element :
+   *       analyticsAdminServiceClient.listAccountSummaries(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 ListAccountSummariesPagedResponse listAccountSummaries( + ListAccountSummariesRequest request) { + return listAccountSummariesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns summaries of all accounts accessible by the caller. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   ListAccountSummariesRequest request =
+   *       ListAccountSummariesRequest.newBuilder()
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.listAccountSummariesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (AccountSummary element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listAccountSummariesPagedCallable() { + return stub.listAccountSummariesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns summaries of all accounts accessible by the caller. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   ListAccountSummariesRequest request =
+   *       ListAccountSummariesRequest.newBuilder()
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListAccountSummariesResponse response =
+   *         analyticsAdminServiceClient.listAccountSummariesCallable().call(request);
+   *     for (AccountSummary element : response.getAccountSummariesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listAccountSummariesCallable() { + return stub.listAccountSummariesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lookup for a single "GA4" Property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   PropertyName name = PropertyName.of("[PROPERTY]");
+   *   Property response = analyticsAdminServiceClient.getProperty(name);
+   * }
+   * }
+ * + * @param name Required. The name of the property to lookup. Format: properties/{property_id} + * Example: "properties/1000" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Property getProperty(PropertyName name) { + GetPropertyRequest request = + GetPropertyRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getProperty(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lookup for a single "GA4" Property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   String name = PropertyName.of("[PROPERTY]").toString();
+   *   Property response = analyticsAdminServiceClient.getProperty(name);
+   * }
+   * }
+ * + * @param name Required. The name of the property to lookup. Format: properties/{property_id} + * Example: "properties/1000" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Property getProperty(String name) { + GetPropertyRequest request = GetPropertyRequest.newBuilder().setName(name).build(); + return getProperty(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lookup for a single "GA4" Property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   GetPropertyRequest request =
+   *       GetPropertyRequest.newBuilder().setName(PropertyName.of("[PROPERTY]").toString()).build();
+   *   Property response = analyticsAdminServiceClient.getProperty(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 Property getProperty(GetPropertyRequest request) { + return getPropertyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lookup for a single "GA4" Property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   GetPropertyRequest request =
+   *       GetPropertyRequest.newBuilder().setName(PropertyName.of("[PROPERTY]").toString()).build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.getPropertyCallable().futureCall(request);
+   *   // Do something.
+   *   Property response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getPropertyCallable() { + return stub.getPropertyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns child Properties under the specified parent Account. + * + *

Only "GA4" properties will be returned. Properties will be excluded if the caller does not + * have access. Soft-deleted (ie: "trashed") properties are excluded by default. Returns an empty + * list if no relevant properties are found. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   ListPropertiesRequest request =
+   *       ListPropertiesRequest.newBuilder()
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setShowDeleted(true)
+   *           .build();
+   *   for (Property element : analyticsAdminServiceClient.listProperties(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 ListPropertiesPagedResponse listProperties(ListPropertiesRequest request) { + return listPropertiesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns child Properties under the specified parent Account. + * + *

Only "GA4" properties will be returned. Properties will be excluded if the caller does not + * have access. Soft-deleted (ie: "trashed") properties are excluded by default. Returns an empty + * list if no relevant properties are found. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   ListPropertiesRequest request =
+   *       ListPropertiesRequest.newBuilder()
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setShowDeleted(true)
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.listPropertiesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Property element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listPropertiesPagedCallable() { + return stub.listPropertiesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns child Properties under the specified parent Account. + * + *

Only "GA4" properties will be returned. Properties will be excluded if the caller does not + * have access. Soft-deleted (ie: "trashed") properties are excluded by default. Returns an empty + * list if no relevant properties are found. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   ListPropertiesRequest request =
+   *       ListPropertiesRequest.newBuilder()
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setShowDeleted(true)
+   *           .build();
+   *   while (true) {
+   *     ListPropertiesResponse response =
+   *         analyticsAdminServiceClient.listPropertiesCallable().call(request);
+   *     for (Property element : response.getPropertiesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listPropertiesCallable() { + return stub.listPropertiesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an "GA4" property with the specified location and attributes. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   Property property = Property.newBuilder().build();
+   *   Property response = analyticsAdminServiceClient.createProperty(property);
+   * }
+   * }
+ * + * @param property Required. The property to create. Note: the supplied property must specify its + * parent. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Property createProperty(Property property) { + CreatePropertyRequest request = + CreatePropertyRequest.newBuilder().setProperty(property).build(); + return createProperty(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an "GA4" property with the specified location and attributes. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   CreatePropertyRequest request =
+   *       CreatePropertyRequest.newBuilder().setProperty(Property.newBuilder().build()).build();
+   *   Property response = analyticsAdminServiceClient.createProperty(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 Property createProperty(CreatePropertyRequest request) { + return createPropertyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an "GA4" property with the specified location and attributes. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   CreatePropertyRequest request =
+   *       CreatePropertyRequest.newBuilder().setProperty(Property.newBuilder().build()).build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.createPropertyCallable().futureCall(request);
+   *   // Do something.
+   *   Property response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createPropertyCallable() { + return stub.createPropertyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Marks target Property as soft-deleted (ie: "trashed") and returns it. + * + *

This API does not have a method to restore soft-deleted properties. However, they can be + * restored using the Trash Can UI. + * + *

If the properties are not restored before the expiration time, the Property and all child + * resources (eg: GoogleAdsLinks, Streams, UserLinks) will be permanently purged. + * https://support.google.com/analytics/answer/6154772 + * + *

Returns an error if the target is not found, or is not an GA4 Property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   PropertyName name = PropertyName.of("[PROPERTY]");
+   *   Property response = analyticsAdminServiceClient.deleteProperty(name);
+   * }
+   * }
+ * + * @param name Required. The name of the Property to soft-delete. Format: properties/{property_id} + * Example: "properties/1000" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Property deleteProperty(PropertyName name) { + DeletePropertyRequest request = + DeletePropertyRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteProperty(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Marks target Property as soft-deleted (ie: "trashed") and returns it. + * + *

This API does not have a method to restore soft-deleted properties. However, they can be + * restored using the Trash Can UI. + * + *

If the properties are not restored before the expiration time, the Property and all child + * resources (eg: GoogleAdsLinks, Streams, UserLinks) will be permanently purged. + * https://support.google.com/analytics/answer/6154772 + * + *

Returns an error if the target is not found, or is not an GA4 Property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   String name = PropertyName.of("[PROPERTY]").toString();
+   *   Property response = analyticsAdminServiceClient.deleteProperty(name);
+   * }
+   * }
+ * + * @param name Required. The name of the Property to soft-delete. Format: properties/{property_id} + * Example: "properties/1000" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Property deleteProperty(String name) { + DeletePropertyRequest request = DeletePropertyRequest.newBuilder().setName(name).build(); + return deleteProperty(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Marks target Property as soft-deleted (ie: "trashed") and returns it. + * + *

This API does not have a method to restore soft-deleted properties. However, they can be + * restored using the Trash Can UI. + * + *

If the properties are not restored before the expiration time, the Property and all child + * resources (eg: GoogleAdsLinks, Streams, UserLinks) will be permanently purged. + * https://support.google.com/analytics/answer/6154772 + * + *

Returns an error if the target is not found, or is not an GA4 Property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   DeletePropertyRequest request =
+   *       DeletePropertyRequest.newBuilder()
+   *           .setName(PropertyName.of("[PROPERTY]").toString())
+   *           .build();
+   *   Property response = analyticsAdminServiceClient.deleteProperty(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 Property deleteProperty(DeletePropertyRequest request) { + return deletePropertyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Marks target Property as soft-deleted (ie: "trashed") and returns it. + * + *

This API does not have a method to restore soft-deleted properties. However, they can be + * restored using the Trash Can UI. + * + *

If the properties are not restored before the expiration time, the Property and all child + * resources (eg: GoogleAdsLinks, Streams, UserLinks) will be permanently purged. + * https://support.google.com/analytics/answer/6154772 + * + *

Returns an error if the target is not found, or is not an GA4 Property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   DeletePropertyRequest request =
+   *       DeletePropertyRequest.newBuilder()
+   *           .setName(PropertyName.of("[PROPERTY]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.deletePropertyCallable().futureCall(request);
+   *   // Do something.
+   *   Property response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deletePropertyCallable() { + return stub.deletePropertyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   Property property = Property.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Property response = analyticsAdminServiceClient.updateProperty(property, updateMask);
+   * }
+   * }
+ * + * @param property Required. The property to update. The property's `name` field is used to + * identify the property to be updated. + * @param updateMask Required. The list of fields to be updated. Field names must be in snake case + * (e.g., "field_to_update"). Omitted fields will not be updated. To replace the entire + * entity, use one path with the string "*" to match all fields. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Property updateProperty(Property property, FieldMask updateMask) { + UpdatePropertyRequest request = + UpdatePropertyRequest.newBuilder().setProperty(property).setUpdateMask(updateMask).build(); + return updateProperty(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   UpdatePropertyRequest request =
+   *       UpdatePropertyRequest.newBuilder()
+   *           .setProperty(Property.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Property response = analyticsAdminServiceClient.updateProperty(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 Property updateProperty(UpdatePropertyRequest request) { + return updatePropertyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   UpdatePropertyRequest request =
+   *       UpdatePropertyRequest.newBuilder()
+   *           .setProperty(Property.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.updatePropertyCallable().futureCall(request);
+   *   // Do something.
+   *   Property response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updatePropertyCallable() { + return stub.updatePropertyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a FirebaseLink. + * + *

Properties can have at most one FirebaseLink. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   PropertyName parent = PropertyName.of("[PROPERTY]");
+   *   FirebaseLink firebaseLink = FirebaseLink.newBuilder().build();
+   *   FirebaseLink response = analyticsAdminServiceClient.createFirebaseLink(parent, firebaseLink);
+   * }
+   * }
+ * + * @param parent Required. Format: properties/{property_id} Example: properties/1234 + * @param firebaseLink Required. The Firebase link to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final FirebaseLink createFirebaseLink(PropertyName parent, FirebaseLink firebaseLink) { + CreateFirebaseLinkRequest request = + CreateFirebaseLinkRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setFirebaseLink(firebaseLink) + .build(); + return createFirebaseLink(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a FirebaseLink. + * + *

Properties can have at most one FirebaseLink. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   String parent = PropertyName.of("[PROPERTY]").toString();
+   *   FirebaseLink firebaseLink = FirebaseLink.newBuilder().build();
+   *   FirebaseLink response = analyticsAdminServiceClient.createFirebaseLink(parent, firebaseLink);
+   * }
+   * }
+ * + * @param parent Required. Format: properties/{property_id} Example: properties/1234 + * @param firebaseLink Required. The Firebase link to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final FirebaseLink createFirebaseLink(String parent, FirebaseLink firebaseLink) { + CreateFirebaseLinkRequest request = + CreateFirebaseLinkRequest.newBuilder() + .setParent(parent) + .setFirebaseLink(firebaseLink) + .build(); + return createFirebaseLink(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a FirebaseLink. + * + *

Properties can have at most one FirebaseLink. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   CreateFirebaseLinkRequest request =
+   *       CreateFirebaseLinkRequest.newBuilder()
+   *           .setParent(PropertyName.of("[PROPERTY]").toString())
+   *           .setFirebaseLink(FirebaseLink.newBuilder().build())
+   *           .build();
+   *   FirebaseLink response = analyticsAdminServiceClient.createFirebaseLink(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 FirebaseLink createFirebaseLink(CreateFirebaseLinkRequest request) { + return createFirebaseLinkCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a FirebaseLink. + * + *

Properties can have at most one FirebaseLink. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   CreateFirebaseLinkRequest request =
+   *       CreateFirebaseLinkRequest.newBuilder()
+   *           .setParent(PropertyName.of("[PROPERTY]").toString())
+   *           .setFirebaseLink(FirebaseLink.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.createFirebaseLinkCallable().futureCall(request);
+   *   // Do something.
+   *   FirebaseLink response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createFirebaseLinkCallable() { + return stub.createFirebaseLinkCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a FirebaseLink on a property + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   FirebaseLinkName name = FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]");
+   *   analyticsAdminServiceClient.deleteFirebaseLink(name);
+   * }
+   * }
+ * + * @param name Required. Format: properties/{property_id}/firebaseLinks/{firebase_link_id} + * Example: properties/1234/firebaseLinks/5678 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteFirebaseLink(FirebaseLinkName name) { + DeleteFirebaseLinkRequest request = + DeleteFirebaseLinkRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + deleteFirebaseLink(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a FirebaseLink on a property + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   String name = FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]").toString();
+   *   analyticsAdminServiceClient.deleteFirebaseLink(name);
+   * }
+   * }
+ * + * @param name Required. Format: properties/{property_id}/firebaseLinks/{firebase_link_id} + * Example: properties/1234/firebaseLinks/5678 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteFirebaseLink(String name) { + DeleteFirebaseLinkRequest request = + DeleteFirebaseLinkRequest.newBuilder().setName(name).build(); + deleteFirebaseLink(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a FirebaseLink on a property + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   DeleteFirebaseLinkRequest request =
+   *       DeleteFirebaseLinkRequest.newBuilder()
+   *           .setName(FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]").toString())
+   *           .build();
+   *   analyticsAdminServiceClient.deleteFirebaseLink(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteFirebaseLink(DeleteFirebaseLinkRequest request) { + deleteFirebaseLinkCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a FirebaseLink on a property + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   DeleteFirebaseLinkRequest request =
+   *       DeleteFirebaseLinkRequest.newBuilder()
+   *           .setName(FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.deleteFirebaseLinkCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteFirebaseLinkCallable() { + return stub.deleteFirebaseLinkCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists FirebaseLinks on a property. Properties can have at most one FirebaseLink. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   PropertyName parent = PropertyName.of("[PROPERTY]");
+   *   for (FirebaseLink element :
+   *       analyticsAdminServiceClient.listFirebaseLinks(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Format: properties/{property_id} Example: properties/1234 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListFirebaseLinksPagedResponse listFirebaseLinks(PropertyName parent) { + ListFirebaseLinksRequest request = + ListFirebaseLinksRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listFirebaseLinks(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists FirebaseLinks on a property. Properties can have at most one FirebaseLink. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   String parent = PropertyName.of("[PROPERTY]").toString();
+   *   for (FirebaseLink element :
+   *       analyticsAdminServiceClient.listFirebaseLinks(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Format: properties/{property_id} Example: properties/1234 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListFirebaseLinksPagedResponse listFirebaseLinks(String parent) { + ListFirebaseLinksRequest request = + ListFirebaseLinksRequest.newBuilder().setParent(parent).build(); + return listFirebaseLinks(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists FirebaseLinks on a property. Properties can have at most one FirebaseLink. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   ListFirebaseLinksRequest request =
+   *       ListFirebaseLinksRequest.newBuilder()
+   *           .setParent(PropertyName.of("[PROPERTY]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (FirebaseLink element :
+   *       analyticsAdminServiceClient.listFirebaseLinks(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 ListFirebaseLinksPagedResponse listFirebaseLinks(ListFirebaseLinksRequest request) { + return listFirebaseLinksPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists FirebaseLinks on a property. Properties can have at most one FirebaseLink. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   ListFirebaseLinksRequest request =
+   *       ListFirebaseLinksRequest.newBuilder()
+   *           .setParent(PropertyName.of("[PROPERTY]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.listFirebaseLinksPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (FirebaseLink element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listFirebaseLinksPagedCallable() { + return stub.listFirebaseLinksPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists FirebaseLinks on a property. Properties can have at most one FirebaseLink. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   ListFirebaseLinksRequest request =
+   *       ListFirebaseLinksRequest.newBuilder()
+   *           .setParent(PropertyName.of("[PROPERTY]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListFirebaseLinksResponse response =
+   *         analyticsAdminServiceClient.listFirebaseLinksCallable().call(request);
+   *     for (FirebaseLink element : response.getFirebaseLinksList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listFirebaseLinksCallable() { + return stub.listFirebaseLinksCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a GoogleAdsLink. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   PropertyName parent = PropertyName.of("[PROPERTY]");
+   *   GoogleAdsLink googleAdsLink = GoogleAdsLink.newBuilder().build();
+   *   GoogleAdsLink response =
+   *       analyticsAdminServiceClient.createGoogleAdsLink(parent, googleAdsLink);
+   * }
+   * }
+ * + * @param parent Required. Example format: properties/1234 + * @param googleAdsLink Required. The GoogleAdsLink to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final GoogleAdsLink createGoogleAdsLink(PropertyName parent, GoogleAdsLink googleAdsLink) { + CreateGoogleAdsLinkRequest request = + CreateGoogleAdsLinkRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setGoogleAdsLink(googleAdsLink) + .build(); + return createGoogleAdsLink(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a GoogleAdsLink. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   String parent = PropertyName.of("[PROPERTY]").toString();
+   *   GoogleAdsLink googleAdsLink = GoogleAdsLink.newBuilder().build();
+   *   GoogleAdsLink response =
+   *       analyticsAdminServiceClient.createGoogleAdsLink(parent, googleAdsLink);
+   * }
+   * }
+ * + * @param parent Required. Example format: properties/1234 + * @param googleAdsLink Required. The GoogleAdsLink to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final GoogleAdsLink createGoogleAdsLink(String parent, GoogleAdsLink googleAdsLink) { + CreateGoogleAdsLinkRequest request = + CreateGoogleAdsLinkRequest.newBuilder() + .setParent(parent) + .setGoogleAdsLink(googleAdsLink) + .build(); + return createGoogleAdsLink(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a GoogleAdsLink. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   CreateGoogleAdsLinkRequest request =
+   *       CreateGoogleAdsLinkRequest.newBuilder()
+   *           .setParent(PropertyName.of("[PROPERTY]").toString())
+   *           .setGoogleAdsLink(GoogleAdsLink.newBuilder().build())
+   *           .build();
+   *   GoogleAdsLink response = analyticsAdminServiceClient.createGoogleAdsLink(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 GoogleAdsLink createGoogleAdsLink(CreateGoogleAdsLinkRequest request) { + return createGoogleAdsLinkCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a GoogleAdsLink. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   CreateGoogleAdsLinkRequest request =
+   *       CreateGoogleAdsLinkRequest.newBuilder()
+   *           .setParent(PropertyName.of("[PROPERTY]").toString())
+   *           .setGoogleAdsLink(GoogleAdsLink.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.createGoogleAdsLinkCallable().futureCall(request);
+   *   // Do something.
+   *   GoogleAdsLink response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + createGoogleAdsLinkCallable() { + return stub.createGoogleAdsLinkCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a GoogleAdsLink on a property + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   GoogleAdsLink googleAdsLink = GoogleAdsLink.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   GoogleAdsLink response =
+   *       analyticsAdminServiceClient.updateGoogleAdsLink(googleAdsLink, updateMask);
+   * }
+   * }
+ * + * @param googleAdsLink The GoogleAdsLink to update + * @param updateMask Required. The list of fields to be updated. Field names must be in snake case + * (e.g., "field_to_update"). Omitted fields will not be updated. To replace the entire + * entity, use one path with the string "*" to match all fields. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final GoogleAdsLink updateGoogleAdsLink( + GoogleAdsLink googleAdsLink, FieldMask updateMask) { + UpdateGoogleAdsLinkRequest request = + UpdateGoogleAdsLinkRequest.newBuilder() + .setGoogleAdsLink(googleAdsLink) + .setUpdateMask(updateMask) + .build(); + return updateGoogleAdsLink(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a GoogleAdsLink on a property + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   UpdateGoogleAdsLinkRequest request =
+   *       UpdateGoogleAdsLinkRequest.newBuilder()
+   *           .setGoogleAdsLink(GoogleAdsLink.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   GoogleAdsLink response = analyticsAdminServiceClient.updateGoogleAdsLink(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 GoogleAdsLink updateGoogleAdsLink(UpdateGoogleAdsLinkRequest request) { + return updateGoogleAdsLinkCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a GoogleAdsLink on a property + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   UpdateGoogleAdsLinkRequest request =
+   *       UpdateGoogleAdsLinkRequest.newBuilder()
+   *           .setGoogleAdsLink(GoogleAdsLink.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.updateGoogleAdsLinkCallable().futureCall(request);
+   *   // Do something.
+   *   GoogleAdsLink response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + updateGoogleAdsLinkCallable() { + return stub.updateGoogleAdsLinkCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a GoogleAdsLink on a property + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   GoogleAdsLinkName name = GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]");
+   *   analyticsAdminServiceClient.deleteGoogleAdsLink(name);
+   * }
+   * }
+ * + * @param name Required. Example format: properties/1234/googleAdsLinks/5678 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteGoogleAdsLink(GoogleAdsLinkName name) { + DeleteGoogleAdsLinkRequest request = + DeleteGoogleAdsLinkRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + deleteGoogleAdsLink(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a GoogleAdsLink on a property + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   String name = GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]").toString();
+   *   analyticsAdminServiceClient.deleteGoogleAdsLink(name);
+   * }
+   * }
+ * + * @param name Required. Example format: properties/1234/googleAdsLinks/5678 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteGoogleAdsLink(String name) { + DeleteGoogleAdsLinkRequest request = + DeleteGoogleAdsLinkRequest.newBuilder().setName(name).build(); + deleteGoogleAdsLink(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a GoogleAdsLink on a property + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   DeleteGoogleAdsLinkRequest request =
+   *       DeleteGoogleAdsLinkRequest.newBuilder()
+   *           .setName(GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]").toString())
+   *           .build();
+   *   analyticsAdminServiceClient.deleteGoogleAdsLink(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteGoogleAdsLink(DeleteGoogleAdsLinkRequest request) { + deleteGoogleAdsLinkCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a GoogleAdsLink on a property + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   DeleteGoogleAdsLinkRequest request =
+   *       DeleteGoogleAdsLinkRequest.newBuilder()
+   *           .setName(GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.deleteGoogleAdsLinkCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteGoogleAdsLinkCallable() { + return stub.deleteGoogleAdsLinkCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists GoogleAdsLinks on a property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   PropertyName parent = PropertyName.of("[PROPERTY]");
+   *   for (GoogleAdsLink element :
+   *       analyticsAdminServiceClient.listGoogleAdsLinks(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Example format: properties/1234 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListGoogleAdsLinksPagedResponse listGoogleAdsLinks(PropertyName parent) { + ListGoogleAdsLinksRequest request = + ListGoogleAdsLinksRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listGoogleAdsLinks(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists GoogleAdsLinks on a property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   String parent = PropertyName.of("[PROPERTY]").toString();
+   *   for (GoogleAdsLink element :
+   *       analyticsAdminServiceClient.listGoogleAdsLinks(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Example format: properties/1234 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListGoogleAdsLinksPagedResponse listGoogleAdsLinks(String parent) { + ListGoogleAdsLinksRequest request = + ListGoogleAdsLinksRequest.newBuilder().setParent(parent).build(); + return listGoogleAdsLinks(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists GoogleAdsLinks on a property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   ListGoogleAdsLinksRequest request =
+   *       ListGoogleAdsLinksRequest.newBuilder()
+   *           .setParent(PropertyName.of("[PROPERTY]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (GoogleAdsLink element :
+   *       analyticsAdminServiceClient.listGoogleAdsLinks(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 ListGoogleAdsLinksPagedResponse listGoogleAdsLinks( + ListGoogleAdsLinksRequest request) { + return listGoogleAdsLinksPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists GoogleAdsLinks on a property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   ListGoogleAdsLinksRequest request =
+   *       ListGoogleAdsLinksRequest.newBuilder()
+   *           .setParent(PropertyName.of("[PROPERTY]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.listGoogleAdsLinksPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (GoogleAdsLink element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listGoogleAdsLinksPagedCallable() { + return stub.listGoogleAdsLinksPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists GoogleAdsLinks on a property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   ListGoogleAdsLinksRequest request =
+   *       ListGoogleAdsLinksRequest.newBuilder()
+   *           .setParent(PropertyName.of("[PROPERTY]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListGoogleAdsLinksResponse response =
+   *         analyticsAdminServiceClient.listGoogleAdsLinksCallable().call(request);
+   *     for (GoogleAdsLink element : response.getGoogleAdsLinksList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listGoogleAdsLinksCallable() { + return stub.listGoogleAdsLinksCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get data sharing settings on an account. Data sharing settings are singletons. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   DataSharingSettingsName name = DataSharingSettingsName.of("[ACCOUNT]");
+   *   DataSharingSettings response = analyticsAdminServiceClient.getDataSharingSettings(name);
+   * }
+   * }
+ * + * @param name Required. The name of the settings to lookup. Format: + * accounts/{account}/dataSharingSettings Example: "accounts/1000/dataSharingSettings" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DataSharingSettings getDataSharingSettings(DataSharingSettingsName name) { + GetDataSharingSettingsRequest request = + GetDataSharingSettingsRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getDataSharingSettings(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get data sharing settings on an account. Data sharing settings are singletons. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   String name = DataSharingSettingsName.of("[ACCOUNT]").toString();
+   *   DataSharingSettings response = analyticsAdminServiceClient.getDataSharingSettings(name);
+   * }
+   * }
+ * + * @param name Required. The name of the settings to lookup. Format: + * accounts/{account}/dataSharingSettings Example: "accounts/1000/dataSharingSettings" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DataSharingSettings getDataSharingSettings(String name) { + GetDataSharingSettingsRequest request = + GetDataSharingSettingsRequest.newBuilder().setName(name).build(); + return getDataSharingSettings(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get data sharing settings on an account. Data sharing settings are singletons. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   GetDataSharingSettingsRequest request =
+   *       GetDataSharingSettingsRequest.newBuilder()
+   *           .setName(DataSharingSettingsName.of("[ACCOUNT]").toString())
+   *           .build();
+   *   DataSharingSettings response = analyticsAdminServiceClient.getDataSharingSettings(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 DataSharingSettings getDataSharingSettings(GetDataSharingSettingsRequest request) { + return getDataSharingSettingsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get data sharing settings on an account. Data sharing settings are singletons. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   GetDataSharingSettingsRequest request =
+   *       GetDataSharingSettingsRequest.newBuilder()
+   *           .setName(DataSharingSettingsName.of("[ACCOUNT]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.getDataSharingSettingsCallable().futureCall(request);
+   *   // Do something.
+   *   DataSharingSettings response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getDataSharingSettingsCallable() { + return stub.getDataSharingSettingsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lookup for a single "GA4" MeasurementProtocolSecret. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   MeasurementProtocolSecretName name =
+   *       MeasurementProtocolSecretName.of(
+   *           "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]");
+   *   MeasurementProtocolSecret response =
+   *       analyticsAdminServiceClient.getMeasurementProtocolSecret(name);
+   * }
+   * }
+ * + * @param name Required. The name of the measurement protocol secret to lookup. Format: + * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final MeasurementProtocolSecret getMeasurementProtocolSecret( + MeasurementProtocolSecretName name) { + GetMeasurementProtocolSecretRequest request = + GetMeasurementProtocolSecretRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getMeasurementProtocolSecret(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lookup for a single "GA4" MeasurementProtocolSecret. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   String name =
+   *       MeasurementProtocolSecretName.of(
+   *               "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]")
+   *           .toString();
+   *   MeasurementProtocolSecret response =
+   *       analyticsAdminServiceClient.getMeasurementProtocolSecret(name);
+   * }
+   * }
+ * + * @param name Required. The name of the measurement protocol secret to lookup. Format: + * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final MeasurementProtocolSecret getMeasurementProtocolSecret(String name) { + GetMeasurementProtocolSecretRequest request = + GetMeasurementProtocolSecretRequest.newBuilder().setName(name).build(); + return getMeasurementProtocolSecret(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lookup for a single "GA4" MeasurementProtocolSecret. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   GetMeasurementProtocolSecretRequest request =
+   *       GetMeasurementProtocolSecretRequest.newBuilder()
+   *           .setName(
+   *               MeasurementProtocolSecretName.of(
+   *                       "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]")
+   *                   .toString())
+   *           .build();
+   *   MeasurementProtocolSecret response =
+   *       analyticsAdminServiceClient.getMeasurementProtocolSecret(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 MeasurementProtocolSecret getMeasurementProtocolSecret( + GetMeasurementProtocolSecretRequest request) { + return getMeasurementProtocolSecretCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lookup for a single "GA4" MeasurementProtocolSecret. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   GetMeasurementProtocolSecretRequest request =
+   *       GetMeasurementProtocolSecretRequest.newBuilder()
+   *           .setName(
+   *               MeasurementProtocolSecretName.of(
+   *                       "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.getMeasurementProtocolSecretCallable().futureCall(request);
+   *   // Do something.
+   *   MeasurementProtocolSecret response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getMeasurementProtocolSecretCallable() { + return stub.getMeasurementProtocolSecretCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns child MeasurementProtocolSecrets under the specified parent Property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]");
+   *   for (MeasurementProtocolSecret element :
+   *       analyticsAdminServiceClient.listMeasurementProtocolSecrets(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The resource name of the parent stream. Format: + * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListMeasurementProtocolSecretsPagedResponse listMeasurementProtocolSecrets( + DataStreamName parent) { + ListMeasurementProtocolSecretsRequest request = + ListMeasurementProtocolSecretsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listMeasurementProtocolSecrets(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns child MeasurementProtocolSecrets under the specified parent Property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   String parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString();
+   *   for (MeasurementProtocolSecret element :
+   *       analyticsAdminServiceClient.listMeasurementProtocolSecrets(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The resource name of the parent stream. Format: + * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListMeasurementProtocolSecretsPagedResponse listMeasurementProtocolSecrets( + String parent) { + ListMeasurementProtocolSecretsRequest request = + ListMeasurementProtocolSecretsRequest.newBuilder().setParent(parent).build(); + return listMeasurementProtocolSecrets(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns child MeasurementProtocolSecrets under the specified parent Property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   ListMeasurementProtocolSecretsRequest request =
+   *       ListMeasurementProtocolSecretsRequest.newBuilder()
+   *           .setParent(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (MeasurementProtocolSecret element :
+   *       analyticsAdminServiceClient.listMeasurementProtocolSecrets(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 ListMeasurementProtocolSecretsPagedResponse listMeasurementProtocolSecrets( + ListMeasurementProtocolSecretsRequest request) { + return listMeasurementProtocolSecretsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns child MeasurementProtocolSecrets under the specified parent Property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   ListMeasurementProtocolSecretsRequest request =
+   *       ListMeasurementProtocolSecretsRequest.newBuilder()
+   *           .setParent(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient
+   *           .listMeasurementProtocolSecretsPagedCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   for (MeasurementProtocolSecret element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + ListMeasurementProtocolSecretsRequest, ListMeasurementProtocolSecretsPagedResponse> + listMeasurementProtocolSecretsPagedCallable() { + return stub.listMeasurementProtocolSecretsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns child MeasurementProtocolSecrets under the specified parent Property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   ListMeasurementProtocolSecretsRequest request =
+   *       ListMeasurementProtocolSecretsRequest.newBuilder()
+   *           .setParent(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListMeasurementProtocolSecretsResponse response =
+   *         analyticsAdminServiceClient.listMeasurementProtocolSecretsCallable().call(request);
+   *     for (MeasurementProtocolSecret element : response.getMeasurementProtocolSecretsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + ListMeasurementProtocolSecretsRequest, ListMeasurementProtocolSecretsResponse> + listMeasurementProtocolSecretsCallable() { + return stub.listMeasurementProtocolSecretsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a measurement protocol secret. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]");
+   *   MeasurementProtocolSecret measurementProtocolSecret =
+   *       MeasurementProtocolSecret.newBuilder().build();
+   *   MeasurementProtocolSecret response =
+   *       analyticsAdminServiceClient.createMeasurementProtocolSecret(
+   *           parent, measurementProtocolSecret);
+   * }
+   * }
+ * + * @param parent Required. The parent resource where this secret will be created. Format: + * properties/{property}/dataStreams/{dataStream} + * @param measurementProtocolSecret Required. The measurement protocol secret to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final MeasurementProtocolSecret createMeasurementProtocolSecret( + DataStreamName parent, MeasurementProtocolSecret measurementProtocolSecret) { + CreateMeasurementProtocolSecretRequest request = + CreateMeasurementProtocolSecretRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setMeasurementProtocolSecret(measurementProtocolSecret) + .build(); + return createMeasurementProtocolSecret(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a measurement protocol secret. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   String parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString();
+   *   MeasurementProtocolSecret measurementProtocolSecret =
+   *       MeasurementProtocolSecret.newBuilder().build();
+   *   MeasurementProtocolSecret response =
+   *       analyticsAdminServiceClient.createMeasurementProtocolSecret(
+   *           parent, measurementProtocolSecret);
+   * }
+   * }
+ * + * @param parent Required. The parent resource where this secret will be created. Format: + * properties/{property}/dataStreams/{dataStream} + * @param measurementProtocolSecret Required. The measurement protocol secret to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final MeasurementProtocolSecret createMeasurementProtocolSecret( + String parent, MeasurementProtocolSecret measurementProtocolSecret) { + CreateMeasurementProtocolSecretRequest request = + CreateMeasurementProtocolSecretRequest.newBuilder() + .setParent(parent) + .setMeasurementProtocolSecret(measurementProtocolSecret) + .build(); + return createMeasurementProtocolSecret(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a measurement protocol secret. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   CreateMeasurementProtocolSecretRequest request =
+   *       CreateMeasurementProtocolSecretRequest.newBuilder()
+   *           .setParent(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString())
+   *           .setMeasurementProtocolSecret(MeasurementProtocolSecret.newBuilder().build())
+   *           .build();
+   *   MeasurementProtocolSecret response =
+   *       analyticsAdminServiceClient.createMeasurementProtocolSecret(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 MeasurementProtocolSecret createMeasurementProtocolSecret( + CreateMeasurementProtocolSecretRequest request) { + return createMeasurementProtocolSecretCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a measurement protocol secret. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   CreateMeasurementProtocolSecretRequest request =
+   *       CreateMeasurementProtocolSecretRequest.newBuilder()
+   *           .setParent(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString())
+   *           .setMeasurementProtocolSecret(MeasurementProtocolSecret.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.createMeasurementProtocolSecretCallable().futureCall(request);
+   *   // Do something.
+   *   MeasurementProtocolSecret response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + createMeasurementProtocolSecretCallable() { + return stub.createMeasurementProtocolSecretCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes target MeasurementProtocolSecret. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   MeasurementProtocolSecretName name =
+   *       MeasurementProtocolSecretName.of(
+   *           "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]");
+   *   analyticsAdminServiceClient.deleteMeasurementProtocolSecret(name);
+   * }
+   * }
+ * + * @param name Required. The name of the MeasurementProtocolSecret to delete. Format: + * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteMeasurementProtocolSecret(MeasurementProtocolSecretName name) { + DeleteMeasurementProtocolSecretRequest request = + DeleteMeasurementProtocolSecretRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + deleteMeasurementProtocolSecret(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes target MeasurementProtocolSecret. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   String name =
+   *       MeasurementProtocolSecretName.of(
+   *               "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]")
+   *           .toString();
+   *   analyticsAdminServiceClient.deleteMeasurementProtocolSecret(name);
+   * }
+   * }
+ * + * @param name Required. The name of the MeasurementProtocolSecret to delete. Format: + * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteMeasurementProtocolSecret(String name) { + DeleteMeasurementProtocolSecretRequest request = + DeleteMeasurementProtocolSecretRequest.newBuilder().setName(name).build(); + deleteMeasurementProtocolSecret(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes target MeasurementProtocolSecret. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   DeleteMeasurementProtocolSecretRequest request =
+   *       DeleteMeasurementProtocolSecretRequest.newBuilder()
+   *           .setName(
+   *               MeasurementProtocolSecretName.of(
+   *                       "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]")
+   *                   .toString())
+   *           .build();
+   *   analyticsAdminServiceClient.deleteMeasurementProtocolSecret(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteMeasurementProtocolSecret( + DeleteMeasurementProtocolSecretRequest request) { + deleteMeasurementProtocolSecretCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes target MeasurementProtocolSecret. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   DeleteMeasurementProtocolSecretRequest request =
+   *       DeleteMeasurementProtocolSecretRequest.newBuilder()
+   *           .setName(
+   *               MeasurementProtocolSecretName.of(
+   *                       "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.deleteMeasurementProtocolSecretCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + deleteMeasurementProtocolSecretCallable() { + return stub.deleteMeasurementProtocolSecretCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a measurement protocol secret. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   MeasurementProtocolSecret measurementProtocolSecret =
+   *       MeasurementProtocolSecret.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   MeasurementProtocolSecret response =
+   *       analyticsAdminServiceClient.updateMeasurementProtocolSecret(
+   *           measurementProtocolSecret, updateMask);
+   * }
+   * }
+ * + * @param measurementProtocolSecret Required. The measurement protocol secret to update. + * @param updateMask The list of fields to be updated. Omitted fields will not be updated. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final MeasurementProtocolSecret updateMeasurementProtocolSecret( + MeasurementProtocolSecret measurementProtocolSecret, FieldMask updateMask) { + UpdateMeasurementProtocolSecretRequest request = + UpdateMeasurementProtocolSecretRequest.newBuilder() + .setMeasurementProtocolSecret(measurementProtocolSecret) + .setUpdateMask(updateMask) + .build(); + return updateMeasurementProtocolSecret(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a measurement protocol secret. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   UpdateMeasurementProtocolSecretRequest request =
+   *       UpdateMeasurementProtocolSecretRequest.newBuilder()
+   *           .setMeasurementProtocolSecret(MeasurementProtocolSecret.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   MeasurementProtocolSecret response =
+   *       analyticsAdminServiceClient.updateMeasurementProtocolSecret(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 MeasurementProtocolSecret updateMeasurementProtocolSecret( + UpdateMeasurementProtocolSecretRequest request) { + return updateMeasurementProtocolSecretCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a measurement protocol secret. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   UpdateMeasurementProtocolSecretRequest request =
+   *       UpdateMeasurementProtocolSecretRequest.newBuilder()
+   *           .setMeasurementProtocolSecret(MeasurementProtocolSecret.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.updateMeasurementProtocolSecretCallable().futureCall(request);
+   *   // Do something.
+   *   MeasurementProtocolSecret response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + updateMeasurementProtocolSecretCallable() { + return stub.updateMeasurementProtocolSecretCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Acknowledges the terms of user data collection for the specified property. + * + *

This acknowledgement must be completed (either in the Google Analytics UI or via this API) + * before MeasurementProtocolSecret resources may be created. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   AcknowledgeUserDataCollectionRequest request =
+   *       AcknowledgeUserDataCollectionRequest.newBuilder()
+   *           .setProperty(PropertyName.of("[PROPERTY]").toString())
+   *           .setAcknowledgement("acknowledgement1769490938")
+   *           .build();
+   *   AcknowledgeUserDataCollectionResponse response =
+   *       analyticsAdminServiceClient.acknowledgeUserDataCollection(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 AcknowledgeUserDataCollectionResponse acknowledgeUserDataCollection( + AcknowledgeUserDataCollectionRequest request) { + return acknowledgeUserDataCollectionCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Acknowledges the terms of user data collection for the specified property. + * + *

This acknowledgement must be completed (either in the Google Analytics UI or via this API) + * before MeasurementProtocolSecret resources may be created. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   AcknowledgeUserDataCollectionRequest request =
+   *       AcknowledgeUserDataCollectionRequest.newBuilder()
+   *           .setProperty(PropertyName.of("[PROPERTY]").toString())
+   *           .setAcknowledgement("acknowledgement1769490938")
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.acknowledgeUserDataCollectionCallable().futureCall(request);
+   *   // Do something.
+   *   AcknowledgeUserDataCollectionResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable< + AcknowledgeUserDataCollectionRequest, AcknowledgeUserDataCollectionResponse> + acknowledgeUserDataCollectionCallable() { + return stub.acknowledgeUserDataCollectionCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Searches through all changes to an account or its children given the specified set of filters. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   SearchChangeHistoryEventsRequest request =
+   *       SearchChangeHistoryEventsRequest.newBuilder()
+   *           .setAccount(AccountName.of("[ACCOUNT]").toString())
+   *           .setProperty(PropertyName.of("[PROPERTY]").toString())
+   *           .addAllResourceType(new ArrayList())
+   *           .addAllAction(new ArrayList())
+   *           .addAllActorEmail(new ArrayList())
+   *           .setEarliestChangeTime(Timestamp.newBuilder().build())
+   *           .setLatestChangeTime(Timestamp.newBuilder().build())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (ChangeHistoryEvent element :
+   *       analyticsAdminServiceClient.searchChangeHistoryEvents(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 SearchChangeHistoryEventsPagedResponse searchChangeHistoryEvents( + SearchChangeHistoryEventsRequest request) { + return searchChangeHistoryEventsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Searches through all changes to an account or its children given the specified set of filters. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   SearchChangeHistoryEventsRequest request =
+   *       SearchChangeHistoryEventsRequest.newBuilder()
+   *           .setAccount(AccountName.of("[ACCOUNT]").toString())
+   *           .setProperty(PropertyName.of("[PROPERTY]").toString())
+   *           .addAllResourceType(new ArrayList())
+   *           .addAllAction(new ArrayList())
+   *           .addAllActorEmail(new ArrayList())
+   *           .setEarliestChangeTime(Timestamp.newBuilder().build())
+   *           .setLatestChangeTime(Timestamp.newBuilder().build())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.searchChangeHistoryEventsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (ChangeHistoryEvent element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + SearchChangeHistoryEventsRequest, SearchChangeHistoryEventsPagedResponse> + searchChangeHistoryEventsPagedCallable() { + return stub.searchChangeHistoryEventsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Searches through all changes to an account or its children given the specified set of filters. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   SearchChangeHistoryEventsRequest request =
+   *       SearchChangeHistoryEventsRequest.newBuilder()
+   *           .setAccount(AccountName.of("[ACCOUNT]").toString())
+   *           .setProperty(PropertyName.of("[PROPERTY]").toString())
+   *           .addAllResourceType(new ArrayList())
+   *           .addAllAction(new ArrayList())
+   *           .addAllActorEmail(new ArrayList())
+   *           .setEarliestChangeTime(Timestamp.newBuilder().build())
+   *           .setLatestChangeTime(Timestamp.newBuilder().build())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     SearchChangeHistoryEventsResponse response =
+   *         analyticsAdminServiceClient.searchChangeHistoryEventsCallable().call(request);
+   *     for (ChangeHistoryEvent element : response.getChangeHistoryEventsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + searchChangeHistoryEventsCallable() { + return stub.searchChangeHistoryEventsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a conversion event with the specified attributes. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   PropertyName parent = PropertyName.of("[PROPERTY]");
+   *   ConversionEvent conversionEvent = ConversionEvent.newBuilder().build();
+   *   ConversionEvent response =
+   *       analyticsAdminServiceClient.createConversionEvent(parent, conversionEvent);
+   * }
+   * }
+ * + * @param parent Required. The resource name of the parent property where this conversion event + * will be created. Format: properties/123 + * @param conversionEvent Required. The conversion event to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ConversionEvent createConversionEvent( + PropertyName parent, ConversionEvent conversionEvent) { + CreateConversionEventRequest request = + CreateConversionEventRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setConversionEvent(conversionEvent) + .build(); + return createConversionEvent(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a conversion event with the specified attributes. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   String parent = PropertyName.of("[PROPERTY]").toString();
+   *   ConversionEvent conversionEvent = ConversionEvent.newBuilder().build();
+   *   ConversionEvent response =
+   *       analyticsAdminServiceClient.createConversionEvent(parent, conversionEvent);
+   * }
+   * }
+ * + * @param parent Required. The resource name of the parent property where this conversion event + * will be created. Format: properties/123 + * @param conversionEvent Required. The conversion event to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ConversionEvent createConversionEvent( + String parent, ConversionEvent conversionEvent) { + CreateConversionEventRequest request = + CreateConversionEventRequest.newBuilder() + .setParent(parent) + .setConversionEvent(conversionEvent) + .build(); + return createConversionEvent(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a conversion event with the specified attributes. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   CreateConversionEventRequest request =
+   *       CreateConversionEventRequest.newBuilder()
+   *           .setConversionEvent(ConversionEvent.newBuilder().build())
+   *           .setParent(PropertyName.of("[PROPERTY]").toString())
+   *           .build();
+   *   ConversionEvent response = analyticsAdminServiceClient.createConversionEvent(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 ConversionEvent createConversionEvent(CreateConversionEventRequest request) { + return createConversionEventCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a conversion event with the specified attributes. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   CreateConversionEventRequest request =
+   *       CreateConversionEventRequest.newBuilder()
+   *           .setConversionEvent(ConversionEvent.newBuilder().build())
+   *           .setParent(PropertyName.of("[PROPERTY]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.createConversionEventCallable().futureCall(request);
+   *   // Do something.
+   *   ConversionEvent response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + createConversionEventCallable() { + return stub.createConversionEventCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieve a single conversion event. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   ConversionEventName name = ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]");
+   *   ConversionEvent response = analyticsAdminServiceClient.getConversionEvent(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the conversion event to retrieve. Format: + * properties/{property}/conversionEvents/{conversion_event} Example: + * "properties/123/conversionEvents/456" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ConversionEvent getConversionEvent(ConversionEventName name) { + GetConversionEventRequest request = + GetConversionEventRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getConversionEvent(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieve a single conversion event. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   String name = ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]").toString();
+   *   ConversionEvent response = analyticsAdminServiceClient.getConversionEvent(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the conversion event to retrieve. Format: + * properties/{property}/conversionEvents/{conversion_event} Example: + * "properties/123/conversionEvents/456" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ConversionEvent getConversionEvent(String name) { + GetConversionEventRequest request = + GetConversionEventRequest.newBuilder().setName(name).build(); + return getConversionEvent(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieve a single conversion event. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   GetConversionEventRequest request =
+   *       GetConversionEventRequest.newBuilder()
+   *           .setName(ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]").toString())
+   *           .build();
+   *   ConversionEvent response = analyticsAdminServiceClient.getConversionEvent(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 ConversionEvent getConversionEvent(GetConversionEventRequest request) { + return getConversionEventCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieve a single conversion event. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   GetConversionEventRequest request =
+   *       GetConversionEventRequest.newBuilder()
+   *           .setName(ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.getConversionEventCallable().futureCall(request);
+   *   // Do something.
+   *   ConversionEvent response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getConversionEventCallable() { + return stub.getConversionEventCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a conversion event in a property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   ConversionEventName name = ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]");
+   *   analyticsAdminServiceClient.deleteConversionEvent(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the conversion event to delete. Format: + * properties/{property}/conversionEvents/{conversion_event} Example: + * "properties/123/conversionEvents/456" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteConversionEvent(ConversionEventName name) { + DeleteConversionEventRequest request = + DeleteConversionEventRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + deleteConversionEvent(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a conversion event in a property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   String name = ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]").toString();
+   *   analyticsAdminServiceClient.deleteConversionEvent(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the conversion event to delete. Format: + * properties/{property}/conversionEvents/{conversion_event} Example: + * "properties/123/conversionEvents/456" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteConversionEvent(String name) { + DeleteConversionEventRequest request = + DeleteConversionEventRequest.newBuilder().setName(name).build(); + deleteConversionEvent(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a conversion event in a property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   DeleteConversionEventRequest request =
+   *       DeleteConversionEventRequest.newBuilder()
+   *           .setName(ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]").toString())
+   *           .build();
+   *   analyticsAdminServiceClient.deleteConversionEvent(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteConversionEvent(DeleteConversionEventRequest request) { + deleteConversionEventCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a conversion event in a property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   DeleteConversionEventRequest request =
+   *       DeleteConversionEventRequest.newBuilder()
+   *           .setName(ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.deleteConversionEventCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteConversionEventCallable() { + return stub.deleteConversionEventCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a list of conversion events in the specified parent property. + * + *

Returns an empty list if no conversion events are found. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   PropertyName parent = PropertyName.of("[PROPERTY]");
+   *   for (ConversionEvent element :
+   *       analyticsAdminServiceClient.listConversionEvents(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The resource name of the parent property. Example: 'properties/123' + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListConversionEventsPagedResponse listConversionEvents(PropertyName parent) { + ListConversionEventsRequest request = + ListConversionEventsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listConversionEvents(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a list of conversion events in the specified parent property. + * + *

Returns an empty list if no conversion events are found. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   String parent = PropertyName.of("[PROPERTY]").toString();
+   *   for (ConversionEvent element :
+   *       analyticsAdminServiceClient.listConversionEvents(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The resource name of the parent property. Example: 'properties/123' + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListConversionEventsPagedResponse listConversionEvents(String parent) { + ListConversionEventsRequest request = + ListConversionEventsRequest.newBuilder().setParent(parent).build(); + return listConversionEvents(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a list of conversion events in the specified parent property. + * + *

Returns an empty list if no conversion events are found. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   ListConversionEventsRequest request =
+   *       ListConversionEventsRequest.newBuilder()
+   *           .setParent(PropertyName.of("[PROPERTY]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (ConversionEvent element :
+   *       analyticsAdminServiceClient.listConversionEvents(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 ListConversionEventsPagedResponse listConversionEvents( + ListConversionEventsRequest request) { + return listConversionEventsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a list of conversion events in the specified parent property. + * + *

Returns an empty list if no conversion events are found. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   ListConversionEventsRequest request =
+   *       ListConversionEventsRequest.newBuilder()
+   *           .setParent(PropertyName.of("[PROPERTY]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.listConversionEventsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (ConversionEvent element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listConversionEventsPagedCallable() { + return stub.listConversionEventsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a list of conversion events in the specified parent property. + * + *

Returns an empty list if no conversion events are found. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   ListConversionEventsRequest request =
+   *       ListConversionEventsRequest.newBuilder()
+   *           .setParent(PropertyName.of("[PROPERTY]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListConversionEventsResponse response =
+   *         analyticsAdminServiceClient.listConversionEventsCallable().call(request);
+   *     for (ConversionEvent element : response.getConversionEventsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listConversionEventsCallable() { + return stub.listConversionEventsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a CustomDimension. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   PropertyName parent = PropertyName.of("[PROPERTY]");
+   *   CustomDimension customDimension = CustomDimension.newBuilder().build();
+   *   CustomDimension response =
+   *       analyticsAdminServiceClient.createCustomDimension(parent, customDimension);
+   * }
+   * }
+ * + * @param parent Required. Example format: properties/1234 + * @param customDimension Required. The CustomDimension to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final CustomDimension createCustomDimension( + PropertyName parent, CustomDimension customDimension) { + CreateCustomDimensionRequest request = + CreateCustomDimensionRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setCustomDimension(customDimension) + .build(); + return createCustomDimension(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a CustomDimension. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   String parent = PropertyName.of("[PROPERTY]").toString();
+   *   CustomDimension customDimension = CustomDimension.newBuilder().build();
+   *   CustomDimension response =
+   *       analyticsAdminServiceClient.createCustomDimension(parent, customDimension);
+   * }
+   * }
+ * + * @param parent Required. Example format: properties/1234 + * @param customDimension Required. The CustomDimension to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final CustomDimension createCustomDimension( + String parent, CustomDimension customDimension) { + CreateCustomDimensionRequest request = + CreateCustomDimensionRequest.newBuilder() + .setParent(parent) + .setCustomDimension(customDimension) + .build(); + return createCustomDimension(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a CustomDimension. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   CreateCustomDimensionRequest request =
+   *       CreateCustomDimensionRequest.newBuilder()
+   *           .setParent(PropertyName.of("[PROPERTY]").toString())
+   *           .setCustomDimension(CustomDimension.newBuilder().build())
+   *           .build();
+   *   CustomDimension response = analyticsAdminServiceClient.createCustomDimension(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 CustomDimension createCustomDimension(CreateCustomDimensionRequest request) { + return createCustomDimensionCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a CustomDimension. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   CreateCustomDimensionRequest request =
+   *       CreateCustomDimensionRequest.newBuilder()
+   *           .setParent(PropertyName.of("[PROPERTY]").toString())
+   *           .setCustomDimension(CustomDimension.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.createCustomDimensionCallable().futureCall(request);
+   *   // Do something.
+   *   CustomDimension response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + createCustomDimensionCallable() { + return stub.createCustomDimensionCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a CustomDimension on a property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   CustomDimension customDimension = CustomDimension.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   CustomDimension response =
+   *       analyticsAdminServiceClient.updateCustomDimension(customDimension, updateMask);
+   * }
+   * }
+ * + * @param customDimension The CustomDimension to update + * @param updateMask Required. The list of fields to be updated. Omitted fields will not be + * updated. To replace the entire entity, use one path with the string "*" to match all + * fields. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final CustomDimension updateCustomDimension( + CustomDimension customDimension, FieldMask updateMask) { + UpdateCustomDimensionRequest request = + UpdateCustomDimensionRequest.newBuilder() + .setCustomDimension(customDimension) + .setUpdateMask(updateMask) + .build(); + return updateCustomDimension(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a CustomDimension on a property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   UpdateCustomDimensionRequest request =
+   *       UpdateCustomDimensionRequest.newBuilder()
+   *           .setCustomDimension(CustomDimension.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   CustomDimension response = analyticsAdminServiceClient.updateCustomDimension(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 CustomDimension updateCustomDimension(UpdateCustomDimensionRequest request) { + return updateCustomDimensionCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a CustomDimension on a property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   UpdateCustomDimensionRequest request =
+   *       UpdateCustomDimensionRequest.newBuilder()
+   *           .setCustomDimension(CustomDimension.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.updateCustomDimensionCallable().futureCall(request);
+   *   // Do something.
+   *   CustomDimension response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + updateCustomDimensionCallable() { + return stub.updateCustomDimensionCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists CustomDimensions on a property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   PropertyName parent = PropertyName.of("[PROPERTY]");
+   *   for (CustomDimension element :
+   *       analyticsAdminServiceClient.listCustomDimensions(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Example format: properties/1234 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListCustomDimensionsPagedResponse listCustomDimensions(PropertyName parent) { + ListCustomDimensionsRequest request = + ListCustomDimensionsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listCustomDimensions(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists CustomDimensions on a property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   String parent = PropertyName.of("[PROPERTY]").toString();
+   *   for (CustomDimension element :
+   *       analyticsAdminServiceClient.listCustomDimensions(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Example format: properties/1234 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListCustomDimensionsPagedResponse listCustomDimensions(String parent) { + ListCustomDimensionsRequest request = + ListCustomDimensionsRequest.newBuilder().setParent(parent).build(); + return listCustomDimensions(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists CustomDimensions on a property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   ListCustomDimensionsRequest request =
+   *       ListCustomDimensionsRequest.newBuilder()
+   *           .setParent(PropertyName.of("[PROPERTY]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (CustomDimension element :
+   *       analyticsAdminServiceClient.listCustomDimensions(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 ListCustomDimensionsPagedResponse listCustomDimensions( + ListCustomDimensionsRequest request) { + return listCustomDimensionsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists CustomDimensions on a property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   ListCustomDimensionsRequest request =
+   *       ListCustomDimensionsRequest.newBuilder()
+   *           .setParent(PropertyName.of("[PROPERTY]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.listCustomDimensionsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (CustomDimension element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listCustomDimensionsPagedCallable() { + return stub.listCustomDimensionsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists CustomDimensions on a property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   ListCustomDimensionsRequest request =
+   *       ListCustomDimensionsRequest.newBuilder()
+   *           .setParent(PropertyName.of("[PROPERTY]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListCustomDimensionsResponse response =
+   *         analyticsAdminServiceClient.listCustomDimensionsCallable().call(request);
+   *     for (CustomDimension element : response.getCustomDimensionsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listCustomDimensionsCallable() { + return stub.listCustomDimensionsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Archives a CustomDimension on a property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   CustomDimensionName name = CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]");
+   *   analyticsAdminServiceClient.archiveCustomDimension(name);
+   * }
+   * }
+ * + * @param name Required. The name of the CustomDimension to archive. Example format: + * properties/1234/customDimensions/5678 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void archiveCustomDimension(CustomDimensionName name) { + ArchiveCustomDimensionRequest request = + ArchiveCustomDimensionRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + archiveCustomDimension(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Archives a CustomDimension on a property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   String name = CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]").toString();
+   *   analyticsAdminServiceClient.archiveCustomDimension(name);
+   * }
+   * }
+ * + * @param name Required. The name of the CustomDimension to archive. Example format: + * properties/1234/customDimensions/5678 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void archiveCustomDimension(String name) { + ArchiveCustomDimensionRequest request = + ArchiveCustomDimensionRequest.newBuilder().setName(name).build(); + archiveCustomDimension(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Archives a CustomDimension on a property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   ArchiveCustomDimensionRequest request =
+   *       ArchiveCustomDimensionRequest.newBuilder()
+   *           .setName(CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]").toString())
+   *           .build();
+   *   analyticsAdminServiceClient.archiveCustomDimension(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void archiveCustomDimension(ArchiveCustomDimensionRequest request) { + archiveCustomDimensionCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Archives a CustomDimension on a property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   ArchiveCustomDimensionRequest request =
+   *       ArchiveCustomDimensionRequest.newBuilder()
+   *           .setName(CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.archiveCustomDimensionCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + archiveCustomDimensionCallable() { + return stub.archiveCustomDimensionCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lookup for a single CustomDimension. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   CustomDimensionName name = CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]");
+   *   CustomDimension response = analyticsAdminServiceClient.getCustomDimension(name);
+   * }
+   * }
+ * + * @param name Required. The name of the CustomDimension to get. Example format: + * properties/1234/customDimensions/5678 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final CustomDimension getCustomDimension(CustomDimensionName name) { + GetCustomDimensionRequest request = + GetCustomDimensionRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getCustomDimension(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lookup for a single CustomDimension. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   String name = CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]").toString();
+   *   CustomDimension response = analyticsAdminServiceClient.getCustomDimension(name);
+   * }
+   * }
+ * + * @param name Required. The name of the CustomDimension to get. Example format: + * properties/1234/customDimensions/5678 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final CustomDimension getCustomDimension(String name) { + GetCustomDimensionRequest request = + GetCustomDimensionRequest.newBuilder().setName(name).build(); + return getCustomDimension(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lookup for a single CustomDimension. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   GetCustomDimensionRequest request =
+   *       GetCustomDimensionRequest.newBuilder()
+   *           .setName(CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]").toString())
+   *           .build();
+   *   CustomDimension response = analyticsAdminServiceClient.getCustomDimension(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 CustomDimension getCustomDimension(GetCustomDimensionRequest request) { + return getCustomDimensionCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lookup for a single CustomDimension. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   GetCustomDimensionRequest request =
+   *       GetCustomDimensionRequest.newBuilder()
+   *           .setName(CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.getCustomDimensionCallable().futureCall(request);
+   *   // Do something.
+   *   CustomDimension response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getCustomDimensionCallable() { + return stub.getCustomDimensionCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a CustomMetric. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   PropertyName parent = PropertyName.of("[PROPERTY]");
+   *   CustomMetric customMetric = CustomMetric.newBuilder().build();
+   *   CustomMetric response = analyticsAdminServiceClient.createCustomMetric(parent, customMetric);
+   * }
+   * }
+ * + * @param parent Required. Example format: properties/1234 + * @param customMetric Required. The CustomMetric to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final CustomMetric createCustomMetric(PropertyName parent, CustomMetric customMetric) { + CreateCustomMetricRequest request = + CreateCustomMetricRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setCustomMetric(customMetric) + .build(); + return createCustomMetric(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a CustomMetric. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   String parent = PropertyName.of("[PROPERTY]").toString();
+   *   CustomMetric customMetric = CustomMetric.newBuilder().build();
+   *   CustomMetric response = analyticsAdminServiceClient.createCustomMetric(parent, customMetric);
+   * }
+   * }
+ * + * @param parent Required. Example format: properties/1234 + * @param customMetric Required. The CustomMetric to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final CustomMetric createCustomMetric(String parent, CustomMetric customMetric) { + CreateCustomMetricRequest request = + CreateCustomMetricRequest.newBuilder() + .setParent(parent) + .setCustomMetric(customMetric) + .build(); + return createCustomMetric(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a CustomMetric. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   CreateCustomMetricRequest request =
+   *       CreateCustomMetricRequest.newBuilder()
+   *           .setParent(PropertyName.of("[PROPERTY]").toString())
+   *           .setCustomMetric(CustomMetric.newBuilder().build())
+   *           .build();
+   *   CustomMetric response = analyticsAdminServiceClient.createCustomMetric(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 CustomMetric createCustomMetric(CreateCustomMetricRequest request) { + return createCustomMetricCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a CustomMetric. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   CreateCustomMetricRequest request =
+   *       CreateCustomMetricRequest.newBuilder()
+   *           .setParent(PropertyName.of("[PROPERTY]").toString())
+   *           .setCustomMetric(CustomMetric.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.createCustomMetricCallable().futureCall(request);
+   *   // Do something.
+   *   CustomMetric response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createCustomMetricCallable() { + return stub.createCustomMetricCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a CustomMetric on a property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   CustomMetric customMetric = CustomMetric.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   CustomMetric response =
+   *       analyticsAdminServiceClient.updateCustomMetric(customMetric, updateMask);
+   * }
+   * }
+ * + * @param customMetric The CustomMetric to update + * @param updateMask Required. The list of fields to be updated. Omitted fields will not be + * updated. To replace the entire entity, use one path with the string "*" to match all + * fields. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final CustomMetric updateCustomMetric(CustomMetric customMetric, FieldMask updateMask) { + UpdateCustomMetricRequest request = + UpdateCustomMetricRequest.newBuilder() + .setCustomMetric(customMetric) + .setUpdateMask(updateMask) + .build(); + return updateCustomMetric(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a CustomMetric on a property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   UpdateCustomMetricRequest request =
+   *       UpdateCustomMetricRequest.newBuilder()
+   *           .setCustomMetric(CustomMetric.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   CustomMetric response = analyticsAdminServiceClient.updateCustomMetric(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 CustomMetric updateCustomMetric(UpdateCustomMetricRequest request) { + return updateCustomMetricCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a CustomMetric on a property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   UpdateCustomMetricRequest request =
+   *       UpdateCustomMetricRequest.newBuilder()
+   *           .setCustomMetric(CustomMetric.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.updateCustomMetricCallable().futureCall(request);
+   *   // Do something.
+   *   CustomMetric response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateCustomMetricCallable() { + return stub.updateCustomMetricCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists CustomMetrics on a property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   PropertyName parent = PropertyName.of("[PROPERTY]");
+   *   for (CustomMetric element :
+   *       analyticsAdminServiceClient.listCustomMetrics(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Example format: properties/1234 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListCustomMetricsPagedResponse listCustomMetrics(PropertyName parent) { + ListCustomMetricsRequest request = + ListCustomMetricsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listCustomMetrics(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists CustomMetrics on a property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   String parent = PropertyName.of("[PROPERTY]").toString();
+   *   for (CustomMetric element :
+   *       analyticsAdminServiceClient.listCustomMetrics(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Example format: properties/1234 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListCustomMetricsPagedResponse listCustomMetrics(String parent) { + ListCustomMetricsRequest request = + ListCustomMetricsRequest.newBuilder().setParent(parent).build(); + return listCustomMetrics(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists CustomMetrics on a property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   ListCustomMetricsRequest request =
+   *       ListCustomMetricsRequest.newBuilder()
+   *           .setParent(PropertyName.of("[PROPERTY]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (CustomMetric element :
+   *       analyticsAdminServiceClient.listCustomMetrics(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 ListCustomMetricsPagedResponse listCustomMetrics(ListCustomMetricsRequest request) { + return listCustomMetricsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists CustomMetrics on a property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   ListCustomMetricsRequest request =
+   *       ListCustomMetricsRequest.newBuilder()
+   *           .setParent(PropertyName.of("[PROPERTY]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.listCustomMetricsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (CustomMetric element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listCustomMetricsPagedCallable() { + return stub.listCustomMetricsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists CustomMetrics on a property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   ListCustomMetricsRequest request =
+   *       ListCustomMetricsRequest.newBuilder()
+   *           .setParent(PropertyName.of("[PROPERTY]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListCustomMetricsResponse response =
+   *         analyticsAdminServiceClient.listCustomMetricsCallable().call(request);
+   *     for (CustomMetric element : response.getCustomMetricsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listCustomMetricsCallable() { + return stub.listCustomMetricsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Archives a CustomMetric on a property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   CustomMetricName name = CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]");
+   *   analyticsAdminServiceClient.archiveCustomMetric(name);
+   * }
+   * }
+ * + * @param name Required. The name of the CustomMetric to archive. Example format: + * properties/1234/customMetrics/5678 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void archiveCustomMetric(CustomMetricName name) { + ArchiveCustomMetricRequest request = + ArchiveCustomMetricRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + archiveCustomMetric(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Archives a CustomMetric on a property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   String name = CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]").toString();
+   *   analyticsAdminServiceClient.archiveCustomMetric(name);
+   * }
+   * }
+ * + * @param name Required. The name of the CustomMetric to archive. Example format: + * properties/1234/customMetrics/5678 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void archiveCustomMetric(String name) { + ArchiveCustomMetricRequest request = + ArchiveCustomMetricRequest.newBuilder().setName(name).build(); + archiveCustomMetric(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Archives a CustomMetric on a property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   ArchiveCustomMetricRequest request =
+   *       ArchiveCustomMetricRequest.newBuilder()
+   *           .setName(CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]").toString())
+   *           .build();
+   *   analyticsAdminServiceClient.archiveCustomMetric(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void archiveCustomMetric(ArchiveCustomMetricRequest request) { + archiveCustomMetricCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Archives a CustomMetric on a property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   ArchiveCustomMetricRequest request =
+   *       ArchiveCustomMetricRequest.newBuilder()
+   *           .setName(CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.archiveCustomMetricCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable archiveCustomMetricCallable() { + return stub.archiveCustomMetricCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lookup for a single CustomMetric. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   CustomMetricName name = CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]");
+   *   CustomMetric response = analyticsAdminServiceClient.getCustomMetric(name);
+   * }
+   * }
+ * + * @param name Required. The name of the CustomMetric to get. Example format: + * properties/1234/customMetrics/5678 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final CustomMetric getCustomMetric(CustomMetricName name) { + GetCustomMetricRequest request = + GetCustomMetricRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getCustomMetric(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lookup for a single CustomMetric. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   String name = CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]").toString();
+   *   CustomMetric response = analyticsAdminServiceClient.getCustomMetric(name);
+   * }
+   * }
+ * + * @param name Required. The name of the CustomMetric to get. Example format: + * properties/1234/customMetrics/5678 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final CustomMetric getCustomMetric(String name) { + GetCustomMetricRequest request = GetCustomMetricRequest.newBuilder().setName(name).build(); + return getCustomMetric(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lookup for a single CustomMetric. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   GetCustomMetricRequest request =
+   *       GetCustomMetricRequest.newBuilder()
+   *           .setName(CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]").toString())
+   *           .build();
+   *   CustomMetric response = analyticsAdminServiceClient.getCustomMetric(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 CustomMetric getCustomMetric(GetCustomMetricRequest request) { + return getCustomMetricCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lookup for a single CustomMetric. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   GetCustomMetricRequest request =
+   *       GetCustomMetricRequest.newBuilder()
+   *           .setName(CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.getCustomMetricCallable().futureCall(request);
+   *   // Do something.
+   *   CustomMetric response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getCustomMetricCallable() { + return stub.getCustomMetricCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the singleton data retention settings for this property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   DataRetentionSettingsName name = DataRetentionSettingsName.of("[PROPERTY]");
+   *   DataRetentionSettings response = analyticsAdminServiceClient.getDataRetentionSettings(name);
+   * }
+   * }
+ * + * @param name Required. The name of the settings to lookup. Format: + * properties/{property}/dataRetentionSettings Example: + * "properties/1000/dataRetentionSettings" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DataRetentionSettings getDataRetentionSettings(DataRetentionSettingsName name) { + GetDataRetentionSettingsRequest request = + GetDataRetentionSettingsRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getDataRetentionSettings(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the singleton data retention settings for this property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   String name = DataRetentionSettingsName.of("[PROPERTY]").toString();
+   *   DataRetentionSettings response = analyticsAdminServiceClient.getDataRetentionSettings(name);
+   * }
+   * }
+ * + * @param name Required. The name of the settings to lookup. Format: + * properties/{property}/dataRetentionSettings Example: + * "properties/1000/dataRetentionSettings" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DataRetentionSettings getDataRetentionSettings(String name) { + GetDataRetentionSettingsRequest request = + GetDataRetentionSettingsRequest.newBuilder().setName(name).build(); + return getDataRetentionSettings(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the singleton data retention settings for this property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   GetDataRetentionSettingsRequest request =
+   *       GetDataRetentionSettingsRequest.newBuilder()
+   *           .setName(DataRetentionSettingsName.of("[PROPERTY]").toString())
+   *           .build();
+   *   DataRetentionSettings response =
+   *       analyticsAdminServiceClient.getDataRetentionSettings(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 DataRetentionSettings getDataRetentionSettings( + GetDataRetentionSettingsRequest request) { + return getDataRetentionSettingsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the singleton data retention settings for this property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   GetDataRetentionSettingsRequest request =
+   *       GetDataRetentionSettingsRequest.newBuilder()
+   *           .setName(DataRetentionSettingsName.of("[PROPERTY]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.getDataRetentionSettingsCallable().futureCall(request);
+   *   // Do something.
+   *   DataRetentionSettings response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getDataRetentionSettingsCallable() { + return stub.getDataRetentionSettingsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the singleton data retention settings for this property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   DataRetentionSettings dataRetentionSettings = DataRetentionSettings.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   DataRetentionSettings response =
+   *       analyticsAdminServiceClient.updateDataRetentionSettings(
+   *           dataRetentionSettings, updateMask);
+   * }
+   * }
+ * + * @param dataRetentionSettings Required. The settings to update. The `name` field is used to + * identify the settings to be updated. + * @param updateMask Required. The list of fields to be updated. Field names must be in snake case + * (e.g., "field_to_update"). Omitted fields will not be updated. To replace the entire + * entity, use one path with the string "*" to match all fields. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DataRetentionSettings updateDataRetentionSettings( + DataRetentionSettings dataRetentionSettings, FieldMask updateMask) { + UpdateDataRetentionSettingsRequest request = + UpdateDataRetentionSettingsRequest.newBuilder() + .setDataRetentionSettings(dataRetentionSettings) + .setUpdateMask(updateMask) + .build(); + return updateDataRetentionSettings(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the singleton data retention settings for this property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   UpdateDataRetentionSettingsRequest request =
+   *       UpdateDataRetentionSettingsRequest.newBuilder()
+   *           .setDataRetentionSettings(DataRetentionSettings.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   DataRetentionSettings response =
+   *       analyticsAdminServiceClient.updateDataRetentionSettings(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 DataRetentionSettings updateDataRetentionSettings( + UpdateDataRetentionSettingsRequest request) { + return updateDataRetentionSettingsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the singleton data retention settings for this property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   UpdateDataRetentionSettingsRequest request =
+   *       UpdateDataRetentionSettingsRequest.newBuilder()
+   *           .setDataRetentionSettings(DataRetentionSettings.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.updateDataRetentionSettingsCallable().futureCall(request);
+   *   // Do something.
+   *   DataRetentionSettings response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + updateDataRetentionSettingsCallable() { + return stub.updateDataRetentionSettingsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a DataStream. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   PropertyName parent = PropertyName.of("[PROPERTY]");
+   *   DataStream dataStream = DataStream.newBuilder().build();
+   *   DataStream response = analyticsAdminServiceClient.createDataStream(parent, dataStream);
+   * }
+   * }
+ * + * @param parent Required. Example format: properties/1234 + * @param dataStream Required. The DataStream to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DataStream createDataStream(PropertyName parent, DataStream dataStream) { + CreateDataStreamRequest request = + CreateDataStreamRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setDataStream(dataStream) + .build(); + return createDataStream(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a DataStream. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   String parent = PropertyName.of("[PROPERTY]").toString();
+   *   DataStream dataStream = DataStream.newBuilder().build();
+   *   DataStream response = analyticsAdminServiceClient.createDataStream(parent, dataStream);
+   * }
+   * }
+ * + * @param parent Required. Example format: properties/1234 + * @param dataStream Required. The DataStream to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DataStream createDataStream(String parent, DataStream dataStream) { + CreateDataStreamRequest request = + CreateDataStreamRequest.newBuilder().setParent(parent).setDataStream(dataStream).build(); + return createDataStream(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a DataStream. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   CreateDataStreamRequest request =
+   *       CreateDataStreamRequest.newBuilder()
+   *           .setParent(PropertyName.of("[PROPERTY]").toString())
+   *           .setDataStream(DataStream.newBuilder().build())
+   *           .build();
+   *   DataStream response = analyticsAdminServiceClient.createDataStream(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 DataStream createDataStream(CreateDataStreamRequest request) { + return createDataStreamCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a DataStream. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   CreateDataStreamRequest request =
+   *       CreateDataStreamRequest.newBuilder()
+   *           .setParent(PropertyName.of("[PROPERTY]").toString())
+   *           .setDataStream(DataStream.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.createDataStreamCallable().futureCall(request);
+   *   // Do something.
+   *   DataStream response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createDataStreamCallable() { + return stub.createDataStreamCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a DataStream on a property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   DataStreamName name = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]");
+   *   analyticsAdminServiceClient.deleteDataStream(name);
+   * }
+   * }
+ * + * @param name Required. The name of the DataStream to delete. Example format: + * properties/1234/dataStreams/5678 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteDataStream(DataStreamName name) { + DeleteDataStreamRequest request = + DeleteDataStreamRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteDataStream(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a DataStream on a property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   String name = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString();
+   *   analyticsAdminServiceClient.deleteDataStream(name);
+   * }
+   * }
+ * + * @param name Required. The name of the DataStream to delete. Example format: + * properties/1234/dataStreams/5678 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteDataStream(String name) { + DeleteDataStreamRequest request = DeleteDataStreamRequest.newBuilder().setName(name).build(); + deleteDataStream(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a DataStream on a property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   DeleteDataStreamRequest request =
+   *       DeleteDataStreamRequest.newBuilder()
+   *           .setName(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString())
+   *           .build();
+   *   analyticsAdminServiceClient.deleteDataStream(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteDataStream(DeleteDataStreamRequest request) { + deleteDataStreamCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a DataStream on a property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   DeleteDataStreamRequest request =
+   *       DeleteDataStreamRequest.newBuilder()
+   *           .setName(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.deleteDataStreamCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteDataStreamCallable() { + return stub.deleteDataStreamCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a DataStream on a property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   DataStream dataStream = DataStream.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   DataStream response = analyticsAdminServiceClient.updateDataStream(dataStream, updateMask);
+   * }
+   * }
+ * + * @param dataStream The DataStream to update + * @param updateMask Required. The list of fields to be updated. Omitted fields will not be + * updated. To replace the entire entity, use one path with the string "*" to match all + * fields. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DataStream updateDataStream(DataStream dataStream, FieldMask updateMask) { + UpdateDataStreamRequest request = + UpdateDataStreamRequest.newBuilder() + .setDataStream(dataStream) + .setUpdateMask(updateMask) + .build(); + return updateDataStream(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a DataStream on a property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   UpdateDataStreamRequest request =
+   *       UpdateDataStreamRequest.newBuilder()
+   *           .setDataStream(DataStream.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   DataStream response = analyticsAdminServiceClient.updateDataStream(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 DataStream updateDataStream(UpdateDataStreamRequest request) { + return updateDataStreamCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a DataStream on a property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   UpdateDataStreamRequest request =
+   *       UpdateDataStreamRequest.newBuilder()
+   *           .setDataStream(DataStream.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.updateDataStreamCallable().futureCall(request);
+   *   // Do something.
+   *   DataStream response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateDataStreamCallable() { + return stub.updateDataStreamCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DataStreams on a property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   PropertyName parent = PropertyName.of("[PROPERTY]");
+   *   for (DataStream element : analyticsAdminServiceClient.listDataStreams(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Example format: properties/1234 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDataStreamsPagedResponse listDataStreams(PropertyName parent) { + ListDataStreamsRequest request = + ListDataStreamsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listDataStreams(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DataStreams on a property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   String parent = PropertyName.of("[PROPERTY]").toString();
+   *   for (DataStream element : analyticsAdminServiceClient.listDataStreams(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Example format: properties/1234 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDataStreamsPagedResponse listDataStreams(String parent) { + ListDataStreamsRequest request = ListDataStreamsRequest.newBuilder().setParent(parent).build(); + return listDataStreams(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DataStreams on a property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   ListDataStreamsRequest request =
+   *       ListDataStreamsRequest.newBuilder()
+   *           .setParent(PropertyName.of("[PROPERTY]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (DataStream element : analyticsAdminServiceClient.listDataStreams(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 ListDataStreamsPagedResponse listDataStreams(ListDataStreamsRequest request) { + return listDataStreamsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DataStreams on a property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   ListDataStreamsRequest request =
+   *       ListDataStreamsRequest.newBuilder()
+   *           .setParent(PropertyName.of("[PROPERTY]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.listDataStreamsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (DataStream element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listDataStreamsPagedCallable() { + return stub.listDataStreamsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DataStreams on a property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   ListDataStreamsRequest request =
+   *       ListDataStreamsRequest.newBuilder()
+   *           .setParent(PropertyName.of("[PROPERTY]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListDataStreamsResponse response =
+   *         analyticsAdminServiceClient.listDataStreamsCallable().call(request);
+   *     for (DataStream element : response.getDataStreamsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listDataStreamsCallable() { + return stub.listDataStreamsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lookup for a single DataStream. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   DataStreamName name = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]");
+   *   DataStream response = analyticsAdminServiceClient.getDataStream(name);
+   * }
+   * }
+ * + * @param name Required. The name of the DataStream to get. Example format: + * properties/1234/dataStreams/5678 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DataStream getDataStream(DataStreamName name) { + GetDataStreamRequest request = + GetDataStreamRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getDataStream(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lookup for a single DataStream. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   String name = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString();
+   *   DataStream response = analyticsAdminServiceClient.getDataStream(name);
+   * }
+   * }
+ * + * @param name Required. The name of the DataStream to get. Example format: + * properties/1234/dataStreams/5678 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DataStream getDataStream(String name) { + GetDataStreamRequest request = GetDataStreamRequest.newBuilder().setName(name).build(); + return getDataStream(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lookup for a single DataStream. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   GetDataStreamRequest request =
+   *       GetDataStreamRequest.newBuilder()
+   *           .setName(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString())
+   *           .build();
+   *   DataStream response = analyticsAdminServiceClient.getDataStream(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 DataStream getDataStream(GetDataStreamRequest request) { + return getDataStreamCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lookup for a single DataStream. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   GetDataStreamRequest request =
+   *       GetDataStreamRequest.newBuilder()
+   *           .setName(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.getDataStreamCallable().futureCall(request);
+   *   // Do something.
+   *   DataStream response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getDataStreamCallable() { + return stub.getDataStreamCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListAccountsPagedResponse + extends AbstractPagedListResponse< + ListAccountsRequest, + ListAccountsResponse, + Account, + ListAccountsPage, + ListAccountsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListAccountsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListAccountsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListAccountsPagedResponse(ListAccountsPage page) { + super(page, ListAccountsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListAccountsPage + extends AbstractPage { + + private ListAccountsPage( + PageContext context, + ListAccountsResponse response) { + super(context, response); + } + + private static ListAccountsPage createEmptyPage() { + return new ListAccountsPage(null, null); + } + + @Override + protected ListAccountsPage createPage( + PageContext context, + ListAccountsResponse response) { + return new ListAccountsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListAccountsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListAccountsRequest, + ListAccountsResponse, + Account, + ListAccountsPage, + ListAccountsFixedSizeCollection> { + + private ListAccountsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListAccountsFixedSizeCollection createEmptyCollection() { + return new ListAccountsFixedSizeCollection(null, 0); + } + + @Override + protected ListAccountsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListAccountsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListAccountSummariesPagedResponse + extends AbstractPagedListResponse< + ListAccountSummariesRequest, + ListAccountSummariesResponse, + AccountSummary, + ListAccountSummariesPage, + ListAccountSummariesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListAccountSummariesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListAccountSummariesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListAccountSummariesPagedResponse(ListAccountSummariesPage page) { + super(page, ListAccountSummariesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListAccountSummariesPage + extends AbstractPage< + ListAccountSummariesRequest, + ListAccountSummariesResponse, + AccountSummary, + ListAccountSummariesPage> { + + private ListAccountSummariesPage( + PageContext + context, + ListAccountSummariesResponse response) { + super(context, response); + } + + private static ListAccountSummariesPage createEmptyPage() { + return new ListAccountSummariesPage(null, null); + } + + @Override + protected ListAccountSummariesPage createPage( + PageContext + context, + ListAccountSummariesResponse response) { + return new ListAccountSummariesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListAccountSummariesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListAccountSummariesRequest, + ListAccountSummariesResponse, + AccountSummary, + ListAccountSummariesPage, + ListAccountSummariesFixedSizeCollection> { + + private ListAccountSummariesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListAccountSummariesFixedSizeCollection createEmptyCollection() { + return new ListAccountSummariesFixedSizeCollection(null, 0); + } + + @Override + protected ListAccountSummariesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListAccountSummariesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListPropertiesPagedResponse + extends AbstractPagedListResponse< + ListPropertiesRequest, + ListPropertiesResponse, + Property, + ListPropertiesPage, + ListPropertiesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListPropertiesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListPropertiesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListPropertiesPagedResponse(ListPropertiesPage page) { + super(page, ListPropertiesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListPropertiesPage + extends AbstractPage< + ListPropertiesRequest, ListPropertiesResponse, Property, ListPropertiesPage> { + + private ListPropertiesPage( + PageContext context, + ListPropertiesResponse response) { + super(context, response); + } + + private static ListPropertiesPage createEmptyPage() { + return new ListPropertiesPage(null, null); + } + + @Override + protected ListPropertiesPage createPage( + PageContext context, + ListPropertiesResponse response) { + return new ListPropertiesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListPropertiesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListPropertiesRequest, + ListPropertiesResponse, + Property, + ListPropertiesPage, + ListPropertiesFixedSizeCollection> { + + private ListPropertiesFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListPropertiesFixedSizeCollection createEmptyCollection() { + return new ListPropertiesFixedSizeCollection(null, 0); + } + + @Override + protected ListPropertiesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListPropertiesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListFirebaseLinksPagedResponse + extends AbstractPagedListResponse< + ListFirebaseLinksRequest, + ListFirebaseLinksResponse, + FirebaseLink, + ListFirebaseLinksPage, + ListFirebaseLinksFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListFirebaseLinksPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListFirebaseLinksPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListFirebaseLinksPagedResponse(ListFirebaseLinksPage page) { + super(page, ListFirebaseLinksFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListFirebaseLinksPage + extends AbstractPage< + ListFirebaseLinksRequest, + ListFirebaseLinksResponse, + FirebaseLink, + ListFirebaseLinksPage> { + + private ListFirebaseLinksPage( + PageContext context, + ListFirebaseLinksResponse response) { + super(context, response); + } + + private static ListFirebaseLinksPage createEmptyPage() { + return new ListFirebaseLinksPage(null, null); + } + + @Override + protected ListFirebaseLinksPage createPage( + PageContext context, + ListFirebaseLinksResponse response) { + return new ListFirebaseLinksPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListFirebaseLinksFixedSizeCollection + extends AbstractFixedSizeCollection< + ListFirebaseLinksRequest, + ListFirebaseLinksResponse, + FirebaseLink, + ListFirebaseLinksPage, + ListFirebaseLinksFixedSizeCollection> { + + private ListFirebaseLinksFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListFirebaseLinksFixedSizeCollection createEmptyCollection() { + return new ListFirebaseLinksFixedSizeCollection(null, 0); + } + + @Override + protected ListFirebaseLinksFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListFirebaseLinksFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListGoogleAdsLinksPagedResponse + extends AbstractPagedListResponse< + ListGoogleAdsLinksRequest, + ListGoogleAdsLinksResponse, + GoogleAdsLink, + ListGoogleAdsLinksPage, + ListGoogleAdsLinksFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListGoogleAdsLinksPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListGoogleAdsLinksPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListGoogleAdsLinksPagedResponse(ListGoogleAdsLinksPage page) { + super(page, ListGoogleAdsLinksFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListGoogleAdsLinksPage + extends AbstractPage< + ListGoogleAdsLinksRequest, + ListGoogleAdsLinksResponse, + GoogleAdsLink, + ListGoogleAdsLinksPage> { + + private ListGoogleAdsLinksPage( + PageContext context, + ListGoogleAdsLinksResponse response) { + super(context, response); + } + + private static ListGoogleAdsLinksPage createEmptyPage() { + return new ListGoogleAdsLinksPage(null, null); + } + + @Override + protected ListGoogleAdsLinksPage createPage( + PageContext context, + ListGoogleAdsLinksResponse response) { + return new ListGoogleAdsLinksPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListGoogleAdsLinksFixedSizeCollection + extends AbstractFixedSizeCollection< + ListGoogleAdsLinksRequest, + ListGoogleAdsLinksResponse, + GoogleAdsLink, + ListGoogleAdsLinksPage, + ListGoogleAdsLinksFixedSizeCollection> { + + private ListGoogleAdsLinksFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListGoogleAdsLinksFixedSizeCollection createEmptyCollection() { + return new ListGoogleAdsLinksFixedSizeCollection(null, 0); + } + + @Override + protected ListGoogleAdsLinksFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListGoogleAdsLinksFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListMeasurementProtocolSecretsPagedResponse + extends AbstractPagedListResponse< + ListMeasurementProtocolSecretsRequest, + ListMeasurementProtocolSecretsResponse, + MeasurementProtocolSecret, + ListMeasurementProtocolSecretsPage, + ListMeasurementProtocolSecretsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + ListMeasurementProtocolSecretsRequest, + ListMeasurementProtocolSecretsResponse, + MeasurementProtocolSecret> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListMeasurementProtocolSecretsPage.createEmptyPage() + .createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListMeasurementProtocolSecretsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListMeasurementProtocolSecretsPagedResponse(ListMeasurementProtocolSecretsPage page) { + super(page, ListMeasurementProtocolSecretsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListMeasurementProtocolSecretsPage + extends AbstractPage< + ListMeasurementProtocolSecretsRequest, + ListMeasurementProtocolSecretsResponse, + MeasurementProtocolSecret, + ListMeasurementProtocolSecretsPage> { + + private ListMeasurementProtocolSecretsPage( + PageContext< + ListMeasurementProtocolSecretsRequest, + ListMeasurementProtocolSecretsResponse, + MeasurementProtocolSecret> + context, + ListMeasurementProtocolSecretsResponse response) { + super(context, response); + } + + private static ListMeasurementProtocolSecretsPage createEmptyPage() { + return new ListMeasurementProtocolSecretsPage(null, null); + } + + @Override + protected ListMeasurementProtocolSecretsPage createPage( + PageContext< + ListMeasurementProtocolSecretsRequest, + ListMeasurementProtocolSecretsResponse, + MeasurementProtocolSecret> + context, + ListMeasurementProtocolSecretsResponse response) { + return new ListMeasurementProtocolSecretsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + ListMeasurementProtocolSecretsRequest, + ListMeasurementProtocolSecretsResponse, + MeasurementProtocolSecret> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListMeasurementProtocolSecretsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListMeasurementProtocolSecretsRequest, + ListMeasurementProtocolSecretsResponse, + MeasurementProtocolSecret, + ListMeasurementProtocolSecretsPage, + ListMeasurementProtocolSecretsFixedSizeCollection> { + + private ListMeasurementProtocolSecretsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListMeasurementProtocolSecretsFixedSizeCollection createEmptyCollection() { + return new ListMeasurementProtocolSecretsFixedSizeCollection(null, 0); + } + + @Override + protected ListMeasurementProtocolSecretsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListMeasurementProtocolSecretsFixedSizeCollection(pages, collectionSize); + } + } + + public static class SearchChangeHistoryEventsPagedResponse + extends AbstractPagedListResponse< + SearchChangeHistoryEventsRequest, + SearchChangeHistoryEventsResponse, + ChangeHistoryEvent, + SearchChangeHistoryEventsPage, + SearchChangeHistoryEventsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + SearchChangeHistoryEventsRequest, + SearchChangeHistoryEventsResponse, + ChangeHistoryEvent> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + SearchChangeHistoryEventsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new SearchChangeHistoryEventsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private SearchChangeHistoryEventsPagedResponse(SearchChangeHistoryEventsPage page) { + super(page, SearchChangeHistoryEventsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class SearchChangeHistoryEventsPage + extends AbstractPage< + SearchChangeHistoryEventsRequest, + SearchChangeHistoryEventsResponse, + ChangeHistoryEvent, + SearchChangeHistoryEventsPage> { + + private SearchChangeHistoryEventsPage( + PageContext< + SearchChangeHistoryEventsRequest, + SearchChangeHistoryEventsResponse, + ChangeHistoryEvent> + context, + SearchChangeHistoryEventsResponse response) { + super(context, response); + } + + private static SearchChangeHistoryEventsPage createEmptyPage() { + return new SearchChangeHistoryEventsPage(null, null); + } + + @Override + protected SearchChangeHistoryEventsPage createPage( + PageContext< + SearchChangeHistoryEventsRequest, + SearchChangeHistoryEventsResponse, + ChangeHistoryEvent> + context, + SearchChangeHistoryEventsResponse response) { + return new SearchChangeHistoryEventsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + SearchChangeHistoryEventsRequest, + SearchChangeHistoryEventsResponse, + ChangeHistoryEvent> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class SearchChangeHistoryEventsFixedSizeCollection + extends AbstractFixedSizeCollection< + SearchChangeHistoryEventsRequest, + SearchChangeHistoryEventsResponse, + ChangeHistoryEvent, + SearchChangeHistoryEventsPage, + SearchChangeHistoryEventsFixedSizeCollection> { + + private SearchChangeHistoryEventsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static SearchChangeHistoryEventsFixedSizeCollection createEmptyCollection() { + return new SearchChangeHistoryEventsFixedSizeCollection(null, 0); + } + + @Override + protected SearchChangeHistoryEventsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new SearchChangeHistoryEventsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListConversionEventsPagedResponse + extends AbstractPagedListResponse< + ListConversionEventsRequest, + ListConversionEventsResponse, + ConversionEvent, + ListConversionEventsPage, + ListConversionEventsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListConversionEventsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListConversionEventsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListConversionEventsPagedResponse(ListConversionEventsPage page) { + super(page, ListConversionEventsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListConversionEventsPage + extends AbstractPage< + ListConversionEventsRequest, + ListConversionEventsResponse, + ConversionEvent, + ListConversionEventsPage> { + + private ListConversionEventsPage( + PageContext + context, + ListConversionEventsResponse response) { + super(context, response); + } + + private static ListConversionEventsPage createEmptyPage() { + return new ListConversionEventsPage(null, null); + } + + @Override + protected ListConversionEventsPage createPage( + PageContext + context, + ListConversionEventsResponse response) { + return new ListConversionEventsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListConversionEventsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListConversionEventsRequest, + ListConversionEventsResponse, + ConversionEvent, + ListConversionEventsPage, + ListConversionEventsFixedSizeCollection> { + + private ListConversionEventsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListConversionEventsFixedSizeCollection createEmptyCollection() { + return new ListConversionEventsFixedSizeCollection(null, 0); + } + + @Override + protected ListConversionEventsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListConversionEventsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListCustomDimensionsPagedResponse + extends AbstractPagedListResponse< + ListCustomDimensionsRequest, + ListCustomDimensionsResponse, + CustomDimension, + ListCustomDimensionsPage, + ListCustomDimensionsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListCustomDimensionsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListCustomDimensionsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListCustomDimensionsPagedResponse(ListCustomDimensionsPage page) { + super(page, ListCustomDimensionsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListCustomDimensionsPage + extends AbstractPage< + ListCustomDimensionsRequest, + ListCustomDimensionsResponse, + CustomDimension, + ListCustomDimensionsPage> { + + private ListCustomDimensionsPage( + PageContext + context, + ListCustomDimensionsResponse response) { + super(context, response); + } + + private static ListCustomDimensionsPage createEmptyPage() { + return new ListCustomDimensionsPage(null, null); + } + + @Override + protected ListCustomDimensionsPage createPage( + PageContext + context, + ListCustomDimensionsResponse response) { + return new ListCustomDimensionsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListCustomDimensionsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListCustomDimensionsRequest, + ListCustomDimensionsResponse, + CustomDimension, + ListCustomDimensionsPage, + ListCustomDimensionsFixedSizeCollection> { + + private ListCustomDimensionsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListCustomDimensionsFixedSizeCollection createEmptyCollection() { + return new ListCustomDimensionsFixedSizeCollection(null, 0); + } + + @Override + protected ListCustomDimensionsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListCustomDimensionsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListCustomMetricsPagedResponse + extends AbstractPagedListResponse< + ListCustomMetricsRequest, + ListCustomMetricsResponse, + CustomMetric, + ListCustomMetricsPage, + ListCustomMetricsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListCustomMetricsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListCustomMetricsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListCustomMetricsPagedResponse(ListCustomMetricsPage page) { + super(page, ListCustomMetricsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListCustomMetricsPage + extends AbstractPage< + ListCustomMetricsRequest, + ListCustomMetricsResponse, + CustomMetric, + ListCustomMetricsPage> { + + private ListCustomMetricsPage( + PageContext context, + ListCustomMetricsResponse response) { + super(context, response); + } + + private static ListCustomMetricsPage createEmptyPage() { + return new ListCustomMetricsPage(null, null); + } + + @Override + protected ListCustomMetricsPage createPage( + PageContext context, + ListCustomMetricsResponse response) { + return new ListCustomMetricsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListCustomMetricsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListCustomMetricsRequest, + ListCustomMetricsResponse, + CustomMetric, + ListCustomMetricsPage, + ListCustomMetricsFixedSizeCollection> { + + private ListCustomMetricsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListCustomMetricsFixedSizeCollection createEmptyCollection() { + return new ListCustomMetricsFixedSizeCollection(null, 0); + } + + @Override + protected ListCustomMetricsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListCustomMetricsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListDataStreamsPagedResponse + extends AbstractPagedListResponse< + ListDataStreamsRequest, + ListDataStreamsResponse, + DataStream, + ListDataStreamsPage, + ListDataStreamsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListDataStreamsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListDataStreamsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListDataStreamsPagedResponse(ListDataStreamsPage page) { + super(page, ListDataStreamsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListDataStreamsPage + extends AbstractPage< + ListDataStreamsRequest, ListDataStreamsResponse, DataStream, ListDataStreamsPage> { + + private ListDataStreamsPage( + PageContext context, + ListDataStreamsResponse response) { + super(context, response); + } + + private static ListDataStreamsPage createEmptyPage() { + return new ListDataStreamsPage(null, null); + } + + @Override + protected ListDataStreamsPage createPage( + PageContext context, + ListDataStreamsResponse response) { + return new ListDataStreamsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListDataStreamsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListDataStreamsRequest, + ListDataStreamsResponse, + DataStream, + ListDataStreamsPage, + ListDataStreamsFixedSizeCollection> { + + private ListDataStreamsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListDataStreamsFixedSizeCollection createEmptyCollection() { + return new ListDataStreamsFixedSizeCollection(null, 0); + } + + @Override + protected ListDataStreamsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListDataStreamsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1beta/AnalyticsAdminServiceSettings.java b/java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1beta/AnalyticsAdminServiceSettings.java new file mode 100644 index 000000000000..a1cb9a55442c --- /dev/null +++ b/java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1beta/AnalyticsAdminServiceSettings.java @@ -0,0 +1,799 @@ +/* + * Copyright 2022 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.admin.v1beta; + +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListAccountSummariesPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListAccountsPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListConversionEventsPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListCustomDimensionsPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListCustomMetricsPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListDataStreamsPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListFirebaseLinksPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListGoogleAdsLinksPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListMeasurementProtocolSecretsPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListPropertiesPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.SearchChangeHistoryEventsPagedResponse; + +import com.google.analytics.admin.v1beta.stub.AnalyticsAdminServiceStubSettings; +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link AnalyticsAdminServiceClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (analyticsadmin.googleapis.com) and default port (443) are + * used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of getAccount to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * AnalyticsAdminServiceSettings.Builder analyticsAdminServiceSettingsBuilder =
+ *     AnalyticsAdminServiceSettings.newBuilder();
+ * analyticsAdminServiceSettingsBuilder
+ *     .getAccountSettings()
+ *     .setRetrySettings(
+ *         analyticsAdminServiceSettingsBuilder
+ *             .getAccountSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * AnalyticsAdminServiceSettings analyticsAdminServiceSettings =
+ *     analyticsAdminServiceSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class AnalyticsAdminServiceSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to getAccount. */ + public UnaryCallSettings getAccountSettings() { + return ((AnalyticsAdminServiceStubSettings) getStubSettings()).getAccountSettings(); + } + + /** Returns the object with the settings used for calls to listAccounts. */ + public PagedCallSettings + listAccountsSettings() { + return ((AnalyticsAdminServiceStubSettings) getStubSettings()).listAccountsSettings(); + } + + /** Returns the object with the settings used for calls to deleteAccount. */ + public UnaryCallSettings deleteAccountSettings() { + return ((AnalyticsAdminServiceStubSettings) getStubSettings()).deleteAccountSettings(); + } + + /** Returns the object with the settings used for calls to updateAccount. */ + public UnaryCallSettings updateAccountSettings() { + return ((AnalyticsAdminServiceStubSettings) getStubSettings()).updateAccountSettings(); + } + + /** Returns the object with the settings used for calls to provisionAccountTicket. */ + public UnaryCallSettings + provisionAccountTicketSettings() { + return ((AnalyticsAdminServiceStubSettings) getStubSettings()).provisionAccountTicketSettings(); + } + + /** Returns the object with the settings used for calls to listAccountSummaries. */ + public PagedCallSettings< + ListAccountSummariesRequest, + ListAccountSummariesResponse, + ListAccountSummariesPagedResponse> + listAccountSummariesSettings() { + return ((AnalyticsAdminServiceStubSettings) getStubSettings()).listAccountSummariesSettings(); + } + + /** Returns the object with the settings used for calls to getProperty. */ + public UnaryCallSettings getPropertySettings() { + return ((AnalyticsAdminServiceStubSettings) getStubSettings()).getPropertySettings(); + } + + /** Returns the object with the settings used for calls to listProperties. */ + public PagedCallSettings< + ListPropertiesRequest, ListPropertiesResponse, ListPropertiesPagedResponse> + listPropertiesSettings() { + return ((AnalyticsAdminServiceStubSettings) getStubSettings()).listPropertiesSettings(); + } + + /** Returns the object with the settings used for calls to createProperty. */ + public UnaryCallSettings createPropertySettings() { + return ((AnalyticsAdminServiceStubSettings) getStubSettings()).createPropertySettings(); + } + + /** Returns the object with the settings used for calls to deleteProperty. */ + public UnaryCallSettings deletePropertySettings() { + return ((AnalyticsAdminServiceStubSettings) getStubSettings()).deletePropertySettings(); + } + + /** Returns the object with the settings used for calls to updateProperty. */ + public UnaryCallSettings updatePropertySettings() { + return ((AnalyticsAdminServiceStubSettings) getStubSettings()).updatePropertySettings(); + } + + /** Returns the object with the settings used for calls to createFirebaseLink. */ + public UnaryCallSettings createFirebaseLinkSettings() { + return ((AnalyticsAdminServiceStubSettings) getStubSettings()).createFirebaseLinkSettings(); + } + + /** Returns the object with the settings used for calls to deleteFirebaseLink. */ + public UnaryCallSettings deleteFirebaseLinkSettings() { + return ((AnalyticsAdminServiceStubSettings) getStubSettings()).deleteFirebaseLinkSettings(); + } + + /** Returns the object with the settings used for calls to listFirebaseLinks. */ + public PagedCallSettings< + ListFirebaseLinksRequest, ListFirebaseLinksResponse, ListFirebaseLinksPagedResponse> + listFirebaseLinksSettings() { + return ((AnalyticsAdminServiceStubSettings) getStubSettings()).listFirebaseLinksSettings(); + } + + /** Returns the object with the settings used for calls to createGoogleAdsLink. */ + public UnaryCallSettings + createGoogleAdsLinkSettings() { + return ((AnalyticsAdminServiceStubSettings) getStubSettings()).createGoogleAdsLinkSettings(); + } + + /** Returns the object with the settings used for calls to updateGoogleAdsLink. */ + public UnaryCallSettings + updateGoogleAdsLinkSettings() { + return ((AnalyticsAdminServiceStubSettings) getStubSettings()).updateGoogleAdsLinkSettings(); + } + + /** Returns the object with the settings used for calls to deleteGoogleAdsLink. */ + public UnaryCallSettings deleteGoogleAdsLinkSettings() { + return ((AnalyticsAdminServiceStubSettings) getStubSettings()).deleteGoogleAdsLinkSettings(); + } + + /** Returns the object with the settings used for calls to listGoogleAdsLinks. */ + public PagedCallSettings< + ListGoogleAdsLinksRequest, ListGoogleAdsLinksResponse, ListGoogleAdsLinksPagedResponse> + listGoogleAdsLinksSettings() { + return ((AnalyticsAdminServiceStubSettings) getStubSettings()).listGoogleAdsLinksSettings(); + } + + /** Returns the object with the settings used for calls to getDataSharingSettings. */ + public UnaryCallSettings + getDataSharingSettingsSettings() { + return ((AnalyticsAdminServiceStubSettings) getStubSettings()).getDataSharingSettingsSettings(); + } + + /** Returns the object with the settings used for calls to getMeasurementProtocolSecret. */ + public UnaryCallSettings + getMeasurementProtocolSecretSettings() { + return ((AnalyticsAdminServiceStubSettings) getStubSettings()) + .getMeasurementProtocolSecretSettings(); + } + + /** Returns the object with the settings used for calls to listMeasurementProtocolSecrets. */ + public PagedCallSettings< + ListMeasurementProtocolSecretsRequest, + ListMeasurementProtocolSecretsResponse, + ListMeasurementProtocolSecretsPagedResponse> + listMeasurementProtocolSecretsSettings() { + return ((AnalyticsAdminServiceStubSettings) getStubSettings()) + .listMeasurementProtocolSecretsSettings(); + } + + /** Returns the object with the settings used for calls to createMeasurementProtocolSecret. */ + public UnaryCallSettings + createMeasurementProtocolSecretSettings() { + return ((AnalyticsAdminServiceStubSettings) getStubSettings()) + .createMeasurementProtocolSecretSettings(); + } + + /** Returns the object with the settings used for calls to deleteMeasurementProtocolSecret. */ + public UnaryCallSettings + deleteMeasurementProtocolSecretSettings() { + return ((AnalyticsAdminServiceStubSettings) getStubSettings()) + .deleteMeasurementProtocolSecretSettings(); + } + + /** Returns the object with the settings used for calls to updateMeasurementProtocolSecret. */ + public UnaryCallSettings + updateMeasurementProtocolSecretSettings() { + return ((AnalyticsAdminServiceStubSettings) getStubSettings()) + .updateMeasurementProtocolSecretSettings(); + } + + /** Returns the object with the settings used for calls to acknowledgeUserDataCollection. */ + public UnaryCallSettings< + AcknowledgeUserDataCollectionRequest, AcknowledgeUserDataCollectionResponse> + acknowledgeUserDataCollectionSettings() { + return ((AnalyticsAdminServiceStubSettings) getStubSettings()) + .acknowledgeUserDataCollectionSettings(); + } + + /** Returns the object with the settings used for calls to searchChangeHistoryEvents. */ + public PagedCallSettings< + SearchChangeHistoryEventsRequest, + SearchChangeHistoryEventsResponse, + SearchChangeHistoryEventsPagedResponse> + searchChangeHistoryEventsSettings() { + return ((AnalyticsAdminServiceStubSettings) getStubSettings()) + .searchChangeHistoryEventsSettings(); + } + + /** Returns the object with the settings used for calls to createConversionEvent. */ + public UnaryCallSettings + createConversionEventSettings() { + return ((AnalyticsAdminServiceStubSettings) getStubSettings()).createConversionEventSettings(); + } + + /** Returns the object with the settings used for calls to getConversionEvent. */ + public UnaryCallSettings + getConversionEventSettings() { + return ((AnalyticsAdminServiceStubSettings) getStubSettings()).getConversionEventSettings(); + } + + /** Returns the object with the settings used for calls to deleteConversionEvent. */ + public UnaryCallSettings deleteConversionEventSettings() { + return ((AnalyticsAdminServiceStubSettings) getStubSettings()).deleteConversionEventSettings(); + } + + /** Returns the object with the settings used for calls to listConversionEvents. */ + public PagedCallSettings< + ListConversionEventsRequest, + ListConversionEventsResponse, + ListConversionEventsPagedResponse> + listConversionEventsSettings() { + return ((AnalyticsAdminServiceStubSettings) getStubSettings()).listConversionEventsSettings(); + } + + /** Returns the object with the settings used for calls to createCustomDimension. */ + public UnaryCallSettings + createCustomDimensionSettings() { + return ((AnalyticsAdminServiceStubSettings) getStubSettings()).createCustomDimensionSettings(); + } + + /** Returns the object with the settings used for calls to updateCustomDimension. */ + public UnaryCallSettings + updateCustomDimensionSettings() { + return ((AnalyticsAdminServiceStubSettings) getStubSettings()).updateCustomDimensionSettings(); + } + + /** Returns the object with the settings used for calls to listCustomDimensions. */ + public PagedCallSettings< + ListCustomDimensionsRequest, + ListCustomDimensionsResponse, + ListCustomDimensionsPagedResponse> + listCustomDimensionsSettings() { + return ((AnalyticsAdminServiceStubSettings) getStubSettings()).listCustomDimensionsSettings(); + } + + /** Returns the object with the settings used for calls to archiveCustomDimension. */ + public UnaryCallSettings archiveCustomDimensionSettings() { + return ((AnalyticsAdminServiceStubSettings) getStubSettings()).archiveCustomDimensionSettings(); + } + + /** Returns the object with the settings used for calls to getCustomDimension. */ + public UnaryCallSettings + getCustomDimensionSettings() { + return ((AnalyticsAdminServiceStubSettings) getStubSettings()).getCustomDimensionSettings(); + } + + /** Returns the object with the settings used for calls to createCustomMetric. */ + public UnaryCallSettings createCustomMetricSettings() { + return ((AnalyticsAdminServiceStubSettings) getStubSettings()).createCustomMetricSettings(); + } + + /** Returns the object with the settings used for calls to updateCustomMetric. */ + public UnaryCallSettings updateCustomMetricSettings() { + return ((AnalyticsAdminServiceStubSettings) getStubSettings()).updateCustomMetricSettings(); + } + + /** Returns the object with the settings used for calls to listCustomMetrics. */ + public PagedCallSettings< + ListCustomMetricsRequest, ListCustomMetricsResponse, ListCustomMetricsPagedResponse> + listCustomMetricsSettings() { + return ((AnalyticsAdminServiceStubSettings) getStubSettings()).listCustomMetricsSettings(); + } + + /** Returns the object with the settings used for calls to archiveCustomMetric. */ + public UnaryCallSettings archiveCustomMetricSettings() { + return ((AnalyticsAdminServiceStubSettings) getStubSettings()).archiveCustomMetricSettings(); + } + + /** Returns the object with the settings used for calls to getCustomMetric. */ + public UnaryCallSettings getCustomMetricSettings() { + return ((AnalyticsAdminServiceStubSettings) getStubSettings()).getCustomMetricSettings(); + } + + /** Returns the object with the settings used for calls to getDataRetentionSettings. */ + public UnaryCallSettings + getDataRetentionSettingsSettings() { + return ((AnalyticsAdminServiceStubSettings) getStubSettings()) + .getDataRetentionSettingsSettings(); + } + + /** Returns the object with the settings used for calls to updateDataRetentionSettings. */ + public UnaryCallSettings + updateDataRetentionSettingsSettings() { + return ((AnalyticsAdminServiceStubSettings) getStubSettings()) + .updateDataRetentionSettingsSettings(); + } + + /** Returns the object with the settings used for calls to createDataStream. */ + public UnaryCallSettings createDataStreamSettings() { + return ((AnalyticsAdminServiceStubSettings) getStubSettings()).createDataStreamSettings(); + } + + /** Returns the object with the settings used for calls to deleteDataStream. */ + public UnaryCallSettings deleteDataStreamSettings() { + return ((AnalyticsAdminServiceStubSettings) getStubSettings()).deleteDataStreamSettings(); + } + + /** Returns the object with the settings used for calls to updateDataStream. */ + public UnaryCallSettings updateDataStreamSettings() { + return ((AnalyticsAdminServiceStubSettings) getStubSettings()).updateDataStreamSettings(); + } + + /** Returns the object with the settings used for calls to listDataStreams. */ + public PagedCallSettings< + ListDataStreamsRequest, ListDataStreamsResponse, ListDataStreamsPagedResponse> + listDataStreamsSettings() { + return ((AnalyticsAdminServiceStubSettings) getStubSettings()).listDataStreamsSettings(); + } + + /** Returns the object with the settings used for calls to getDataStream. */ + public UnaryCallSettings getDataStreamSettings() { + return ((AnalyticsAdminServiceStubSettings) getStubSettings()).getDataStreamSettings(); + } + + public static final AnalyticsAdminServiceSettings create(AnalyticsAdminServiceStubSettings stub) + throws IOException { + return new AnalyticsAdminServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return AnalyticsAdminServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return AnalyticsAdminServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return AnalyticsAdminServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return AnalyticsAdminServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return AnalyticsAdminServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return AnalyticsAdminServiceStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return AnalyticsAdminServiceStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return AnalyticsAdminServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + @BetaApi + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected AnalyticsAdminServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for AnalyticsAdminServiceSettings. */ + public static class Builder + extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(AnalyticsAdminServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(AnalyticsAdminServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(AnalyticsAdminServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(AnalyticsAdminServiceStubSettings.newBuilder()); + } + + @BetaApi + private static Builder createHttpJsonDefault() { + return new Builder(AnalyticsAdminServiceStubSettings.newHttpJsonBuilder()); + } + + public AnalyticsAdminServiceStubSettings.Builder getStubSettingsBuilder() { + return ((AnalyticsAdminServiceStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to getAccount. */ + public UnaryCallSettings.Builder getAccountSettings() { + return getStubSettingsBuilder().getAccountSettings(); + } + + /** Returns the builder for the settings used for calls to listAccounts. */ + public PagedCallSettings.Builder< + ListAccountsRequest, ListAccountsResponse, ListAccountsPagedResponse> + listAccountsSettings() { + return getStubSettingsBuilder().listAccountsSettings(); + } + + /** Returns the builder for the settings used for calls to deleteAccount. */ + public UnaryCallSettings.Builder deleteAccountSettings() { + return getStubSettingsBuilder().deleteAccountSettings(); + } + + /** Returns the builder for the settings used for calls to updateAccount. */ + public UnaryCallSettings.Builder updateAccountSettings() { + return getStubSettingsBuilder().updateAccountSettings(); + } + + /** Returns the builder for the settings used for calls to provisionAccountTicket. */ + public UnaryCallSettings.Builder + provisionAccountTicketSettings() { + return getStubSettingsBuilder().provisionAccountTicketSettings(); + } + + /** Returns the builder for the settings used for calls to listAccountSummaries. */ + public PagedCallSettings.Builder< + ListAccountSummariesRequest, + ListAccountSummariesResponse, + ListAccountSummariesPagedResponse> + listAccountSummariesSettings() { + return getStubSettingsBuilder().listAccountSummariesSettings(); + } + + /** Returns the builder for the settings used for calls to getProperty. */ + public UnaryCallSettings.Builder getPropertySettings() { + return getStubSettingsBuilder().getPropertySettings(); + } + + /** Returns the builder for the settings used for calls to listProperties. */ + public PagedCallSettings.Builder< + ListPropertiesRequest, ListPropertiesResponse, ListPropertiesPagedResponse> + listPropertiesSettings() { + return getStubSettingsBuilder().listPropertiesSettings(); + } + + /** Returns the builder for the settings used for calls to createProperty. */ + public UnaryCallSettings.Builder createPropertySettings() { + return getStubSettingsBuilder().createPropertySettings(); + } + + /** Returns the builder for the settings used for calls to deleteProperty. */ + public UnaryCallSettings.Builder deletePropertySettings() { + return getStubSettingsBuilder().deletePropertySettings(); + } + + /** Returns the builder for the settings used for calls to updateProperty. */ + public UnaryCallSettings.Builder updatePropertySettings() { + return getStubSettingsBuilder().updatePropertySettings(); + } + + /** Returns the builder for the settings used for calls to createFirebaseLink. */ + public UnaryCallSettings.Builder + createFirebaseLinkSettings() { + return getStubSettingsBuilder().createFirebaseLinkSettings(); + } + + /** Returns the builder for the settings used for calls to deleteFirebaseLink. */ + public UnaryCallSettings.Builder + deleteFirebaseLinkSettings() { + return getStubSettingsBuilder().deleteFirebaseLinkSettings(); + } + + /** Returns the builder for the settings used for calls to listFirebaseLinks. */ + public PagedCallSettings.Builder< + ListFirebaseLinksRequest, ListFirebaseLinksResponse, ListFirebaseLinksPagedResponse> + listFirebaseLinksSettings() { + return getStubSettingsBuilder().listFirebaseLinksSettings(); + } + + /** Returns the builder for the settings used for calls to createGoogleAdsLink. */ + public UnaryCallSettings.Builder + createGoogleAdsLinkSettings() { + return getStubSettingsBuilder().createGoogleAdsLinkSettings(); + } + + /** Returns the builder for the settings used for calls to updateGoogleAdsLink. */ + public UnaryCallSettings.Builder + updateGoogleAdsLinkSettings() { + return getStubSettingsBuilder().updateGoogleAdsLinkSettings(); + } + + /** Returns the builder for the settings used for calls to deleteGoogleAdsLink. */ + public UnaryCallSettings.Builder + deleteGoogleAdsLinkSettings() { + return getStubSettingsBuilder().deleteGoogleAdsLinkSettings(); + } + + /** Returns the builder for the settings used for calls to listGoogleAdsLinks. */ + public PagedCallSettings.Builder< + ListGoogleAdsLinksRequest, ListGoogleAdsLinksResponse, ListGoogleAdsLinksPagedResponse> + listGoogleAdsLinksSettings() { + return getStubSettingsBuilder().listGoogleAdsLinksSettings(); + } + + /** Returns the builder for the settings used for calls to getDataSharingSettings. */ + public UnaryCallSettings.Builder + getDataSharingSettingsSettings() { + return getStubSettingsBuilder().getDataSharingSettingsSettings(); + } + + /** Returns the builder for the settings used for calls to getMeasurementProtocolSecret. */ + public UnaryCallSettings.Builder + getMeasurementProtocolSecretSettings() { + return getStubSettingsBuilder().getMeasurementProtocolSecretSettings(); + } + + /** Returns the builder for the settings used for calls to listMeasurementProtocolSecrets. */ + public PagedCallSettings.Builder< + ListMeasurementProtocolSecretsRequest, + ListMeasurementProtocolSecretsResponse, + ListMeasurementProtocolSecretsPagedResponse> + listMeasurementProtocolSecretsSettings() { + return getStubSettingsBuilder().listMeasurementProtocolSecretsSettings(); + } + + /** Returns the builder for the settings used for calls to createMeasurementProtocolSecret. */ + public UnaryCallSettings.Builder< + CreateMeasurementProtocolSecretRequest, MeasurementProtocolSecret> + createMeasurementProtocolSecretSettings() { + return getStubSettingsBuilder().createMeasurementProtocolSecretSettings(); + } + + /** Returns the builder for the settings used for calls to deleteMeasurementProtocolSecret. */ + public UnaryCallSettings.Builder + deleteMeasurementProtocolSecretSettings() { + return getStubSettingsBuilder().deleteMeasurementProtocolSecretSettings(); + } + + /** Returns the builder for the settings used for calls to updateMeasurementProtocolSecret. */ + public UnaryCallSettings.Builder< + UpdateMeasurementProtocolSecretRequest, MeasurementProtocolSecret> + updateMeasurementProtocolSecretSettings() { + return getStubSettingsBuilder().updateMeasurementProtocolSecretSettings(); + } + + /** Returns the builder for the settings used for calls to acknowledgeUserDataCollection. */ + public UnaryCallSettings.Builder< + AcknowledgeUserDataCollectionRequest, AcknowledgeUserDataCollectionResponse> + acknowledgeUserDataCollectionSettings() { + return getStubSettingsBuilder().acknowledgeUserDataCollectionSettings(); + } + + /** Returns the builder for the settings used for calls to searchChangeHistoryEvents. */ + public PagedCallSettings.Builder< + SearchChangeHistoryEventsRequest, + SearchChangeHistoryEventsResponse, + SearchChangeHistoryEventsPagedResponse> + searchChangeHistoryEventsSettings() { + return getStubSettingsBuilder().searchChangeHistoryEventsSettings(); + } + + /** Returns the builder for the settings used for calls to createConversionEvent. */ + public UnaryCallSettings.Builder + createConversionEventSettings() { + return getStubSettingsBuilder().createConversionEventSettings(); + } + + /** Returns the builder for the settings used for calls to getConversionEvent. */ + public UnaryCallSettings.Builder + getConversionEventSettings() { + return getStubSettingsBuilder().getConversionEventSettings(); + } + + /** Returns the builder for the settings used for calls to deleteConversionEvent. */ + public UnaryCallSettings.Builder + deleteConversionEventSettings() { + return getStubSettingsBuilder().deleteConversionEventSettings(); + } + + /** Returns the builder for the settings used for calls to listConversionEvents. */ + public PagedCallSettings.Builder< + ListConversionEventsRequest, + ListConversionEventsResponse, + ListConversionEventsPagedResponse> + listConversionEventsSettings() { + return getStubSettingsBuilder().listConversionEventsSettings(); + } + + /** Returns the builder for the settings used for calls to createCustomDimension. */ + public UnaryCallSettings.Builder + createCustomDimensionSettings() { + return getStubSettingsBuilder().createCustomDimensionSettings(); + } + + /** Returns the builder for the settings used for calls to updateCustomDimension. */ + public UnaryCallSettings.Builder + updateCustomDimensionSettings() { + return getStubSettingsBuilder().updateCustomDimensionSettings(); + } + + /** Returns the builder for the settings used for calls to listCustomDimensions. */ + public PagedCallSettings.Builder< + ListCustomDimensionsRequest, + ListCustomDimensionsResponse, + ListCustomDimensionsPagedResponse> + listCustomDimensionsSettings() { + return getStubSettingsBuilder().listCustomDimensionsSettings(); + } + + /** Returns the builder for the settings used for calls to archiveCustomDimension. */ + public UnaryCallSettings.Builder + archiveCustomDimensionSettings() { + return getStubSettingsBuilder().archiveCustomDimensionSettings(); + } + + /** Returns the builder for the settings used for calls to getCustomDimension. */ + public UnaryCallSettings.Builder + getCustomDimensionSettings() { + return getStubSettingsBuilder().getCustomDimensionSettings(); + } + + /** Returns the builder for the settings used for calls to createCustomMetric. */ + public UnaryCallSettings.Builder + createCustomMetricSettings() { + return getStubSettingsBuilder().createCustomMetricSettings(); + } + + /** Returns the builder for the settings used for calls to updateCustomMetric. */ + public UnaryCallSettings.Builder + updateCustomMetricSettings() { + return getStubSettingsBuilder().updateCustomMetricSettings(); + } + + /** Returns the builder for the settings used for calls to listCustomMetrics. */ + public PagedCallSettings.Builder< + ListCustomMetricsRequest, ListCustomMetricsResponse, ListCustomMetricsPagedResponse> + listCustomMetricsSettings() { + return getStubSettingsBuilder().listCustomMetricsSettings(); + } + + /** Returns the builder for the settings used for calls to archiveCustomMetric. */ + public UnaryCallSettings.Builder + archiveCustomMetricSettings() { + return getStubSettingsBuilder().archiveCustomMetricSettings(); + } + + /** Returns the builder for the settings used for calls to getCustomMetric. */ + public UnaryCallSettings.Builder + getCustomMetricSettings() { + return getStubSettingsBuilder().getCustomMetricSettings(); + } + + /** Returns the builder for the settings used for calls to getDataRetentionSettings. */ + public UnaryCallSettings.Builder + getDataRetentionSettingsSettings() { + return getStubSettingsBuilder().getDataRetentionSettingsSettings(); + } + + /** Returns the builder for the settings used for calls to updateDataRetentionSettings. */ + public UnaryCallSettings.Builder + updateDataRetentionSettingsSettings() { + return getStubSettingsBuilder().updateDataRetentionSettingsSettings(); + } + + /** Returns the builder for the settings used for calls to createDataStream. */ + public UnaryCallSettings.Builder + createDataStreamSettings() { + return getStubSettingsBuilder().createDataStreamSettings(); + } + + /** Returns the builder for the settings used for calls to deleteDataStream. */ + public UnaryCallSettings.Builder deleteDataStreamSettings() { + return getStubSettingsBuilder().deleteDataStreamSettings(); + } + + /** Returns the builder for the settings used for calls to updateDataStream. */ + public UnaryCallSettings.Builder + updateDataStreamSettings() { + return getStubSettingsBuilder().updateDataStreamSettings(); + } + + /** Returns the builder for the settings used for calls to listDataStreams. */ + public PagedCallSettings.Builder< + ListDataStreamsRequest, ListDataStreamsResponse, ListDataStreamsPagedResponse> + listDataStreamsSettings() { + return getStubSettingsBuilder().listDataStreamsSettings(); + } + + /** Returns the builder for the settings used for calls to getDataStream. */ + public UnaryCallSettings.Builder getDataStreamSettings() { + return getStubSettingsBuilder().getDataStreamSettings(); + } + + @Override + public AnalyticsAdminServiceSettings build() throws IOException { + return new AnalyticsAdminServiceSettings(this); + } + } +} diff --git a/java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1beta/gapic_metadata.json b/java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1beta/gapic_metadata.json new file mode 100644 index 000000000000..4b0e9b0c9e88 --- /dev/null +++ b/java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1beta/gapic_metadata.json @@ -0,0 +1,159 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.analytics.admin.v1beta", + "libraryPackage": "com.google.analytics.admin.v1beta", + "services": { + "AnalyticsAdminService": { + "clients": { + "grpc": { + "libraryClient": "AnalyticsAdminServiceClient", + "rpcs": { + "AcknowledgeUserDataCollection": { + "methods": ["acknowledgeUserDataCollection", "acknowledgeUserDataCollectionCallable"] + }, + "ArchiveCustomDimension": { + "methods": ["archiveCustomDimension", "archiveCustomDimension", "archiveCustomDimension", "archiveCustomDimensionCallable"] + }, + "ArchiveCustomMetric": { + "methods": ["archiveCustomMetric", "archiveCustomMetric", "archiveCustomMetric", "archiveCustomMetricCallable"] + }, + "CreateConversionEvent": { + "methods": ["createConversionEvent", "createConversionEvent", "createConversionEvent", "createConversionEventCallable"] + }, + "CreateCustomDimension": { + "methods": ["createCustomDimension", "createCustomDimension", "createCustomDimension", "createCustomDimensionCallable"] + }, + "CreateCustomMetric": { + "methods": ["createCustomMetric", "createCustomMetric", "createCustomMetric", "createCustomMetricCallable"] + }, + "CreateDataStream": { + "methods": ["createDataStream", "createDataStream", "createDataStream", "createDataStreamCallable"] + }, + "CreateFirebaseLink": { + "methods": ["createFirebaseLink", "createFirebaseLink", "createFirebaseLink", "createFirebaseLinkCallable"] + }, + "CreateGoogleAdsLink": { + "methods": ["createGoogleAdsLink", "createGoogleAdsLink", "createGoogleAdsLink", "createGoogleAdsLinkCallable"] + }, + "CreateMeasurementProtocolSecret": { + "methods": ["createMeasurementProtocolSecret", "createMeasurementProtocolSecret", "createMeasurementProtocolSecret", "createMeasurementProtocolSecretCallable"] + }, + "CreateProperty": { + "methods": ["createProperty", "createProperty", "createPropertyCallable"] + }, + "DeleteAccount": { + "methods": ["deleteAccount", "deleteAccount", "deleteAccount", "deleteAccountCallable"] + }, + "DeleteConversionEvent": { + "methods": ["deleteConversionEvent", "deleteConversionEvent", "deleteConversionEvent", "deleteConversionEventCallable"] + }, + "DeleteDataStream": { + "methods": ["deleteDataStream", "deleteDataStream", "deleteDataStream", "deleteDataStreamCallable"] + }, + "DeleteFirebaseLink": { + "methods": ["deleteFirebaseLink", "deleteFirebaseLink", "deleteFirebaseLink", "deleteFirebaseLinkCallable"] + }, + "DeleteGoogleAdsLink": { + "methods": ["deleteGoogleAdsLink", "deleteGoogleAdsLink", "deleteGoogleAdsLink", "deleteGoogleAdsLinkCallable"] + }, + "DeleteMeasurementProtocolSecret": { + "methods": ["deleteMeasurementProtocolSecret", "deleteMeasurementProtocolSecret", "deleteMeasurementProtocolSecret", "deleteMeasurementProtocolSecretCallable"] + }, + "DeleteProperty": { + "methods": ["deleteProperty", "deleteProperty", "deleteProperty", "deletePropertyCallable"] + }, + "GetAccount": { + "methods": ["getAccount", "getAccount", "getAccount", "getAccountCallable"] + }, + "GetConversionEvent": { + "methods": ["getConversionEvent", "getConversionEvent", "getConversionEvent", "getConversionEventCallable"] + }, + "GetCustomDimension": { + "methods": ["getCustomDimension", "getCustomDimension", "getCustomDimension", "getCustomDimensionCallable"] + }, + "GetCustomMetric": { + "methods": ["getCustomMetric", "getCustomMetric", "getCustomMetric", "getCustomMetricCallable"] + }, + "GetDataRetentionSettings": { + "methods": ["getDataRetentionSettings", "getDataRetentionSettings", "getDataRetentionSettings", "getDataRetentionSettingsCallable"] + }, + "GetDataSharingSettings": { + "methods": ["getDataSharingSettings", "getDataSharingSettings", "getDataSharingSettings", "getDataSharingSettingsCallable"] + }, + "GetDataStream": { + "methods": ["getDataStream", "getDataStream", "getDataStream", "getDataStreamCallable"] + }, + "GetMeasurementProtocolSecret": { + "methods": ["getMeasurementProtocolSecret", "getMeasurementProtocolSecret", "getMeasurementProtocolSecret", "getMeasurementProtocolSecretCallable"] + }, + "GetProperty": { + "methods": ["getProperty", "getProperty", "getProperty", "getPropertyCallable"] + }, + "ListAccountSummaries": { + "methods": ["listAccountSummaries", "listAccountSummariesPagedCallable", "listAccountSummariesCallable"] + }, + "ListAccounts": { + "methods": ["listAccounts", "listAccountsPagedCallable", "listAccountsCallable"] + }, + "ListConversionEvents": { + "methods": ["listConversionEvents", "listConversionEvents", "listConversionEvents", "listConversionEventsPagedCallable", "listConversionEventsCallable"] + }, + "ListCustomDimensions": { + "methods": ["listCustomDimensions", "listCustomDimensions", "listCustomDimensions", "listCustomDimensionsPagedCallable", "listCustomDimensionsCallable"] + }, + "ListCustomMetrics": { + "methods": ["listCustomMetrics", "listCustomMetrics", "listCustomMetrics", "listCustomMetricsPagedCallable", "listCustomMetricsCallable"] + }, + "ListDataStreams": { + "methods": ["listDataStreams", "listDataStreams", "listDataStreams", "listDataStreamsPagedCallable", "listDataStreamsCallable"] + }, + "ListFirebaseLinks": { + "methods": ["listFirebaseLinks", "listFirebaseLinks", "listFirebaseLinks", "listFirebaseLinksPagedCallable", "listFirebaseLinksCallable"] + }, + "ListGoogleAdsLinks": { + "methods": ["listGoogleAdsLinks", "listGoogleAdsLinks", "listGoogleAdsLinks", "listGoogleAdsLinksPagedCallable", "listGoogleAdsLinksCallable"] + }, + "ListMeasurementProtocolSecrets": { + "methods": ["listMeasurementProtocolSecrets", "listMeasurementProtocolSecrets", "listMeasurementProtocolSecrets", "listMeasurementProtocolSecretsPagedCallable", "listMeasurementProtocolSecretsCallable"] + }, + "ListProperties": { + "methods": ["listProperties", "listPropertiesPagedCallable", "listPropertiesCallable"] + }, + "ProvisionAccountTicket": { + "methods": ["provisionAccountTicket", "provisionAccountTicketCallable"] + }, + "SearchChangeHistoryEvents": { + "methods": ["searchChangeHistoryEvents", "searchChangeHistoryEventsPagedCallable", "searchChangeHistoryEventsCallable"] + }, + "UpdateAccount": { + "methods": ["updateAccount", "updateAccount", "updateAccountCallable"] + }, + "UpdateCustomDimension": { + "methods": ["updateCustomDimension", "updateCustomDimension", "updateCustomDimensionCallable"] + }, + "UpdateCustomMetric": { + "methods": ["updateCustomMetric", "updateCustomMetric", "updateCustomMetricCallable"] + }, + "UpdateDataRetentionSettings": { + "methods": ["updateDataRetentionSettings", "updateDataRetentionSettings", "updateDataRetentionSettingsCallable"] + }, + "UpdateDataStream": { + "methods": ["updateDataStream", "updateDataStream", "updateDataStreamCallable"] + }, + "UpdateGoogleAdsLink": { + "methods": ["updateGoogleAdsLink", "updateGoogleAdsLink", "updateGoogleAdsLinkCallable"] + }, + "UpdateMeasurementProtocolSecret": { + "methods": ["updateMeasurementProtocolSecret", "updateMeasurementProtocolSecret", "updateMeasurementProtocolSecretCallable"] + }, + "UpdateProperty": { + "methods": ["updateProperty", "updateProperty", "updatePropertyCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1beta/package-info.java b/java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1beta/package-info.java new file mode 100644 index 000000000000..e2df4e96f500 --- /dev/null +++ b/java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1beta/package-info.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 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. + */ + +/** + * A client to Google Analytics Admin API + * + *

The interfaces provided are listed below, along with usage samples. + * + *

======================= AnalyticsAdminServiceClient ======================= + * + *

Service Description: Service Interface for the Analytics Admin API (GA4). + * + *

Sample for AnalyticsAdminServiceClient: + * + *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+ *     AnalyticsAdminServiceClient.create()) {
+ *   AccountName name = AccountName.of("[ACCOUNT]");
+ *   Account response = analyticsAdminServiceClient.getAccount(name);
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package com.google.analytics.admin.v1beta; + +import javax.annotation.Generated; diff --git a/java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1beta/stub/AnalyticsAdminServiceStub.java b/java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1beta/stub/AnalyticsAdminServiceStub.java new file mode 100644 index 000000000000..382435fd501d --- /dev/null +++ b/java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1beta/stub/AnalyticsAdminServiceStub.java @@ -0,0 +1,393 @@ +/* + * Copyright 2022 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.admin.v1beta.stub; + +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListAccountSummariesPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListAccountsPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListConversionEventsPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListCustomDimensionsPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListCustomMetricsPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListDataStreamsPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListFirebaseLinksPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListGoogleAdsLinksPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListMeasurementProtocolSecretsPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListPropertiesPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.SearchChangeHistoryEventsPagedResponse; + +import com.google.analytics.admin.v1beta.Account; +import com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest; +import com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse; +import com.google.analytics.admin.v1beta.ArchiveCustomDimensionRequest; +import com.google.analytics.admin.v1beta.ArchiveCustomMetricRequest; +import com.google.analytics.admin.v1beta.ConversionEvent; +import com.google.analytics.admin.v1beta.CreateConversionEventRequest; +import com.google.analytics.admin.v1beta.CreateCustomDimensionRequest; +import com.google.analytics.admin.v1beta.CreateCustomMetricRequest; +import com.google.analytics.admin.v1beta.CreateDataStreamRequest; +import com.google.analytics.admin.v1beta.CreateFirebaseLinkRequest; +import com.google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest; +import com.google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest; +import com.google.analytics.admin.v1beta.CreatePropertyRequest; +import com.google.analytics.admin.v1beta.CustomDimension; +import com.google.analytics.admin.v1beta.CustomMetric; +import com.google.analytics.admin.v1beta.DataRetentionSettings; +import com.google.analytics.admin.v1beta.DataSharingSettings; +import com.google.analytics.admin.v1beta.DataStream; +import com.google.analytics.admin.v1beta.DeleteAccountRequest; +import com.google.analytics.admin.v1beta.DeleteConversionEventRequest; +import com.google.analytics.admin.v1beta.DeleteDataStreamRequest; +import com.google.analytics.admin.v1beta.DeleteFirebaseLinkRequest; +import com.google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest; +import com.google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest; +import com.google.analytics.admin.v1beta.DeletePropertyRequest; +import com.google.analytics.admin.v1beta.FirebaseLink; +import com.google.analytics.admin.v1beta.GetAccountRequest; +import com.google.analytics.admin.v1beta.GetConversionEventRequest; +import com.google.analytics.admin.v1beta.GetCustomDimensionRequest; +import com.google.analytics.admin.v1beta.GetCustomMetricRequest; +import com.google.analytics.admin.v1beta.GetDataRetentionSettingsRequest; +import com.google.analytics.admin.v1beta.GetDataSharingSettingsRequest; +import com.google.analytics.admin.v1beta.GetDataStreamRequest; +import com.google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest; +import com.google.analytics.admin.v1beta.GetPropertyRequest; +import com.google.analytics.admin.v1beta.GoogleAdsLink; +import com.google.analytics.admin.v1beta.ListAccountSummariesRequest; +import com.google.analytics.admin.v1beta.ListAccountSummariesResponse; +import com.google.analytics.admin.v1beta.ListAccountsRequest; +import com.google.analytics.admin.v1beta.ListAccountsResponse; +import com.google.analytics.admin.v1beta.ListConversionEventsRequest; +import com.google.analytics.admin.v1beta.ListConversionEventsResponse; +import com.google.analytics.admin.v1beta.ListCustomDimensionsRequest; +import com.google.analytics.admin.v1beta.ListCustomDimensionsResponse; +import com.google.analytics.admin.v1beta.ListCustomMetricsRequest; +import com.google.analytics.admin.v1beta.ListCustomMetricsResponse; +import com.google.analytics.admin.v1beta.ListDataStreamsRequest; +import com.google.analytics.admin.v1beta.ListDataStreamsResponse; +import com.google.analytics.admin.v1beta.ListFirebaseLinksRequest; +import com.google.analytics.admin.v1beta.ListFirebaseLinksResponse; +import com.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest; +import com.google.analytics.admin.v1beta.ListGoogleAdsLinksResponse; +import com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest; +import com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse; +import com.google.analytics.admin.v1beta.ListPropertiesRequest; +import com.google.analytics.admin.v1beta.ListPropertiesResponse; +import com.google.analytics.admin.v1beta.MeasurementProtocolSecret; +import com.google.analytics.admin.v1beta.Property; +import com.google.analytics.admin.v1beta.ProvisionAccountTicketRequest; +import com.google.analytics.admin.v1beta.ProvisionAccountTicketResponse; +import com.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest; +import com.google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse; +import com.google.analytics.admin.v1beta.UpdateAccountRequest; +import com.google.analytics.admin.v1beta.UpdateCustomDimensionRequest; +import com.google.analytics.admin.v1beta.UpdateCustomMetricRequest; +import com.google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest; +import com.google.analytics.admin.v1beta.UpdateDataStreamRequest; +import com.google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest; +import com.google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest; +import com.google.analytics.admin.v1beta.UpdatePropertyRequest; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the AnalyticsAdminService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public abstract class AnalyticsAdminServiceStub implements BackgroundResource { + + public UnaryCallable getAccountCallable() { + throw new UnsupportedOperationException("Not implemented: getAccountCallable()"); + } + + public UnaryCallable listAccountsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listAccountsPagedCallable()"); + } + + public UnaryCallable listAccountsCallable() { + throw new UnsupportedOperationException("Not implemented: listAccountsCallable()"); + } + + public UnaryCallable deleteAccountCallable() { + throw new UnsupportedOperationException("Not implemented: deleteAccountCallable()"); + } + + public UnaryCallable updateAccountCallable() { + throw new UnsupportedOperationException("Not implemented: updateAccountCallable()"); + } + + public UnaryCallable + provisionAccountTicketCallable() { + throw new UnsupportedOperationException("Not implemented: provisionAccountTicketCallable()"); + } + + public UnaryCallable + listAccountSummariesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listAccountSummariesPagedCallable()"); + } + + public UnaryCallable + listAccountSummariesCallable() { + throw new UnsupportedOperationException("Not implemented: listAccountSummariesCallable()"); + } + + public UnaryCallable getPropertyCallable() { + throw new UnsupportedOperationException("Not implemented: getPropertyCallable()"); + } + + public UnaryCallable + listPropertiesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listPropertiesPagedCallable()"); + } + + public UnaryCallable listPropertiesCallable() { + throw new UnsupportedOperationException("Not implemented: listPropertiesCallable()"); + } + + public UnaryCallable createPropertyCallable() { + throw new UnsupportedOperationException("Not implemented: createPropertyCallable()"); + } + + public UnaryCallable deletePropertyCallable() { + throw new UnsupportedOperationException("Not implemented: deletePropertyCallable()"); + } + + public UnaryCallable updatePropertyCallable() { + throw new UnsupportedOperationException("Not implemented: updatePropertyCallable()"); + } + + public UnaryCallable createFirebaseLinkCallable() { + throw new UnsupportedOperationException("Not implemented: createFirebaseLinkCallable()"); + } + + public UnaryCallable deleteFirebaseLinkCallable() { + throw new UnsupportedOperationException("Not implemented: deleteFirebaseLinkCallable()"); + } + + public UnaryCallable + listFirebaseLinksPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listFirebaseLinksPagedCallable()"); + } + + public UnaryCallable + listFirebaseLinksCallable() { + throw new UnsupportedOperationException("Not implemented: listFirebaseLinksCallable()"); + } + + public UnaryCallable createGoogleAdsLinkCallable() { + throw new UnsupportedOperationException("Not implemented: createGoogleAdsLinkCallable()"); + } + + public UnaryCallable updateGoogleAdsLinkCallable() { + throw new UnsupportedOperationException("Not implemented: updateGoogleAdsLinkCallable()"); + } + + public UnaryCallable deleteGoogleAdsLinkCallable() { + throw new UnsupportedOperationException("Not implemented: deleteGoogleAdsLinkCallable()"); + } + + public UnaryCallable + listGoogleAdsLinksPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listGoogleAdsLinksPagedCallable()"); + } + + public UnaryCallable + listGoogleAdsLinksCallable() { + throw new UnsupportedOperationException("Not implemented: listGoogleAdsLinksCallable()"); + } + + public UnaryCallable + getDataSharingSettingsCallable() { + throw new UnsupportedOperationException("Not implemented: getDataSharingSettingsCallable()"); + } + + public UnaryCallable + getMeasurementProtocolSecretCallable() { + throw new UnsupportedOperationException( + "Not implemented: getMeasurementProtocolSecretCallable()"); + } + + public UnaryCallable< + ListMeasurementProtocolSecretsRequest, ListMeasurementProtocolSecretsPagedResponse> + listMeasurementProtocolSecretsPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listMeasurementProtocolSecretsPagedCallable()"); + } + + public UnaryCallable< + ListMeasurementProtocolSecretsRequest, ListMeasurementProtocolSecretsResponse> + listMeasurementProtocolSecretsCallable() { + throw new UnsupportedOperationException( + "Not implemented: listMeasurementProtocolSecretsCallable()"); + } + + public UnaryCallable + createMeasurementProtocolSecretCallable() { + throw new UnsupportedOperationException( + "Not implemented: createMeasurementProtocolSecretCallable()"); + } + + public UnaryCallable + deleteMeasurementProtocolSecretCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteMeasurementProtocolSecretCallable()"); + } + + public UnaryCallable + updateMeasurementProtocolSecretCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateMeasurementProtocolSecretCallable()"); + } + + public UnaryCallable + acknowledgeUserDataCollectionCallable() { + throw new UnsupportedOperationException( + "Not implemented: acknowledgeUserDataCollectionCallable()"); + } + + public UnaryCallable + searchChangeHistoryEventsPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: searchChangeHistoryEventsPagedCallable()"); + } + + public UnaryCallable + searchChangeHistoryEventsCallable() { + throw new UnsupportedOperationException("Not implemented: searchChangeHistoryEventsCallable()"); + } + + public UnaryCallable + createConversionEventCallable() { + throw new UnsupportedOperationException("Not implemented: createConversionEventCallable()"); + } + + public UnaryCallable getConversionEventCallable() { + throw new UnsupportedOperationException("Not implemented: getConversionEventCallable()"); + } + + public UnaryCallable deleteConversionEventCallable() { + throw new UnsupportedOperationException("Not implemented: deleteConversionEventCallable()"); + } + + public UnaryCallable + listConversionEventsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listConversionEventsPagedCallable()"); + } + + public UnaryCallable + listConversionEventsCallable() { + throw new UnsupportedOperationException("Not implemented: listConversionEventsCallable()"); + } + + public UnaryCallable + createCustomDimensionCallable() { + throw new UnsupportedOperationException("Not implemented: createCustomDimensionCallable()"); + } + + public UnaryCallable + updateCustomDimensionCallable() { + throw new UnsupportedOperationException("Not implemented: updateCustomDimensionCallable()"); + } + + public UnaryCallable + listCustomDimensionsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listCustomDimensionsPagedCallable()"); + } + + public UnaryCallable + listCustomDimensionsCallable() { + throw new UnsupportedOperationException("Not implemented: listCustomDimensionsCallable()"); + } + + public UnaryCallable archiveCustomDimensionCallable() { + throw new UnsupportedOperationException("Not implemented: archiveCustomDimensionCallable()"); + } + + public UnaryCallable getCustomDimensionCallable() { + throw new UnsupportedOperationException("Not implemented: getCustomDimensionCallable()"); + } + + public UnaryCallable createCustomMetricCallable() { + throw new UnsupportedOperationException("Not implemented: createCustomMetricCallable()"); + } + + public UnaryCallable updateCustomMetricCallable() { + throw new UnsupportedOperationException("Not implemented: updateCustomMetricCallable()"); + } + + public UnaryCallable + listCustomMetricsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listCustomMetricsPagedCallable()"); + } + + public UnaryCallable + listCustomMetricsCallable() { + throw new UnsupportedOperationException("Not implemented: listCustomMetricsCallable()"); + } + + public UnaryCallable archiveCustomMetricCallable() { + throw new UnsupportedOperationException("Not implemented: archiveCustomMetricCallable()"); + } + + public UnaryCallable getCustomMetricCallable() { + throw new UnsupportedOperationException("Not implemented: getCustomMetricCallable()"); + } + + public UnaryCallable + getDataRetentionSettingsCallable() { + throw new UnsupportedOperationException("Not implemented: getDataRetentionSettingsCallable()"); + } + + public UnaryCallable + updateDataRetentionSettingsCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateDataRetentionSettingsCallable()"); + } + + public UnaryCallable createDataStreamCallable() { + throw new UnsupportedOperationException("Not implemented: createDataStreamCallable()"); + } + + public UnaryCallable deleteDataStreamCallable() { + throw new UnsupportedOperationException("Not implemented: deleteDataStreamCallable()"); + } + + public UnaryCallable updateDataStreamCallable() { + throw new UnsupportedOperationException("Not implemented: updateDataStreamCallable()"); + } + + public UnaryCallable + listDataStreamsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listDataStreamsPagedCallable()"); + } + + public UnaryCallable listDataStreamsCallable() { + throw new UnsupportedOperationException("Not implemented: listDataStreamsCallable()"); + } + + public UnaryCallable getDataStreamCallable() { + throw new UnsupportedOperationException("Not implemented: getDataStreamCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1beta/stub/AnalyticsAdminServiceStubSettings.java b/java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1beta/stub/AnalyticsAdminServiceStubSettings.java new file mode 100644 index 000000000000..99774a50e646 --- /dev/null +++ b/java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1beta/stub/AnalyticsAdminServiceStubSettings.java @@ -0,0 +1,2393 @@ +/* + * Copyright 2022 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.admin.v1beta.stub; + +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListAccountSummariesPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListAccountsPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListConversionEventsPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListCustomDimensionsPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListCustomMetricsPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListDataStreamsPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListFirebaseLinksPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListGoogleAdsLinksPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListMeasurementProtocolSecretsPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListPropertiesPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.SearchChangeHistoryEventsPagedResponse; + +import com.google.analytics.admin.v1beta.Account; +import com.google.analytics.admin.v1beta.AccountSummary; +import com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest; +import com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse; +import com.google.analytics.admin.v1beta.ArchiveCustomDimensionRequest; +import com.google.analytics.admin.v1beta.ArchiveCustomMetricRequest; +import com.google.analytics.admin.v1beta.ChangeHistoryEvent; +import com.google.analytics.admin.v1beta.ConversionEvent; +import com.google.analytics.admin.v1beta.CreateConversionEventRequest; +import com.google.analytics.admin.v1beta.CreateCustomDimensionRequest; +import com.google.analytics.admin.v1beta.CreateCustomMetricRequest; +import com.google.analytics.admin.v1beta.CreateDataStreamRequest; +import com.google.analytics.admin.v1beta.CreateFirebaseLinkRequest; +import com.google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest; +import com.google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest; +import com.google.analytics.admin.v1beta.CreatePropertyRequest; +import com.google.analytics.admin.v1beta.CustomDimension; +import com.google.analytics.admin.v1beta.CustomMetric; +import com.google.analytics.admin.v1beta.DataRetentionSettings; +import com.google.analytics.admin.v1beta.DataSharingSettings; +import com.google.analytics.admin.v1beta.DataStream; +import com.google.analytics.admin.v1beta.DeleteAccountRequest; +import com.google.analytics.admin.v1beta.DeleteConversionEventRequest; +import com.google.analytics.admin.v1beta.DeleteDataStreamRequest; +import com.google.analytics.admin.v1beta.DeleteFirebaseLinkRequest; +import com.google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest; +import com.google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest; +import com.google.analytics.admin.v1beta.DeletePropertyRequest; +import com.google.analytics.admin.v1beta.FirebaseLink; +import com.google.analytics.admin.v1beta.GetAccountRequest; +import com.google.analytics.admin.v1beta.GetConversionEventRequest; +import com.google.analytics.admin.v1beta.GetCustomDimensionRequest; +import com.google.analytics.admin.v1beta.GetCustomMetricRequest; +import com.google.analytics.admin.v1beta.GetDataRetentionSettingsRequest; +import com.google.analytics.admin.v1beta.GetDataSharingSettingsRequest; +import com.google.analytics.admin.v1beta.GetDataStreamRequest; +import com.google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest; +import com.google.analytics.admin.v1beta.GetPropertyRequest; +import com.google.analytics.admin.v1beta.GoogleAdsLink; +import com.google.analytics.admin.v1beta.ListAccountSummariesRequest; +import com.google.analytics.admin.v1beta.ListAccountSummariesResponse; +import com.google.analytics.admin.v1beta.ListAccountsRequest; +import com.google.analytics.admin.v1beta.ListAccountsResponse; +import com.google.analytics.admin.v1beta.ListConversionEventsRequest; +import com.google.analytics.admin.v1beta.ListConversionEventsResponse; +import com.google.analytics.admin.v1beta.ListCustomDimensionsRequest; +import com.google.analytics.admin.v1beta.ListCustomDimensionsResponse; +import com.google.analytics.admin.v1beta.ListCustomMetricsRequest; +import com.google.analytics.admin.v1beta.ListCustomMetricsResponse; +import com.google.analytics.admin.v1beta.ListDataStreamsRequest; +import com.google.analytics.admin.v1beta.ListDataStreamsResponse; +import com.google.analytics.admin.v1beta.ListFirebaseLinksRequest; +import com.google.analytics.admin.v1beta.ListFirebaseLinksResponse; +import com.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest; +import com.google.analytics.admin.v1beta.ListGoogleAdsLinksResponse; +import com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest; +import com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse; +import com.google.analytics.admin.v1beta.ListPropertiesRequest; +import com.google.analytics.admin.v1beta.ListPropertiesResponse; +import com.google.analytics.admin.v1beta.MeasurementProtocolSecret; +import com.google.analytics.admin.v1beta.Property; +import com.google.analytics.admin.v1beta.ProvisionAccountTicketRequest; +import com.google.analytics.admin.v1beta.ProvisionAccountTicketResponse; +import com.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest; +import com.google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse; +import com.google.analytics.admin.v1beta.UpdateAccountRequest; +import com.google.analytics.admin.v1beta.UpdateCustomDimensionRequest; +import com.google.analytics.admin.v1beta.UpdateCustomMetricRequest; +import com.google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest; +import com.google.analytics.admin.v1beta.UpdateDataStreamRequest; +import com.google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest; +import com.google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest; +import com.google.analytics.admin.v1beta.UpdatePropertyRequest; +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link AnalyticsAdminServiceStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (analyticsadmin.googleapis.com) and default port (443) are + * used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of getAccount to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * AnalyticsAdminServiceStubSettings.Builder analyticsAdminServiceSettingsBuilder =
+ *     AnalyticsAdminServiceStubSettings.newBuilder();
+ * analyticsAdminServiceSettingsBuilder
+ *     .getAccountSettings()
+ *     .setRetrySettings(
+ *         analyticsAdminServiceSettingsBuilder
+ *             .getAccountSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * AnalyticsAdminServiceStubSettings analyticsAdminServiceSettings =
+ *     analyticsAdminServiceSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class AnalyticsAdminServiceStubSettings + extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder() + .add("https://www.googleapis.com/auth/analytics.edit") + .add("https://www.googleapis.com/auth/analytics.readonly") + .build(); + + private final UnaryCallSettings getAccountSettings; + private final PagedCallSettings< + ListAccountsRequest, ListAccountsResponse, ListAccountsPagedResponse> + listAccountsSettings; + private final UnaryCallSettings deleteAccountSettings; + private final UnaryCallSettings updateAccountSettings; + private final UnaryCallSettings + provisionAccountTicketSettings; + private final PagedCallSettings< + ListAccountSummariesRequest, + ListAccountSummariesResponse, + ListAccountSummariesPagedResponse> + listAccountSummariesSettings; + private final UnaryCallSettings getPropertySettings; + private final PagedCallSettings< + ListPropertiesRequest, ListPropertiesResponse, ListPropertiesPagedResponse> + listPropertiesSettings; + private final UnaryCallSettings createPropertySettings; + private final UnaryCallSettings deletePropertySettings; + private final UnaryCallSettings updatePropertySettings; + private final UnaryCallSettings + createFirebaseLinkSettings; + private final UnaryCallSettings deleteFirebaseLinkSettings; + private final PagedCallSettings< + ListFirebaseLinksRequest, ListFirebaseLinksResponse, ListFirebaseLinksPagedResponse> + listFirebaseLinksSettings; + private final UnaryCallSettings + createGoogleAdsLinkSettings; + private final UnaryCallSettings + updateGoogleAdsLinkSettings; + private final UnaryCallSettings deleteGoogleAdsLinkSettings; + private final PagedCallSettings< + ListGoogleAdsLinksRequest, ListGoogleAdsLinksResponse, ListGoogleAdsLinksPagedResponse> + listGoogleAdsLinksSettings; + private final UnaryCallSettings + getDataSharingSettingsSettings; + private final UnaryCallSettings + getMeasurementProtocolSecretSettings; + private final PagedCallSettings< + ListMeasurementProtocolSecretsRequest, + ListMeasurementProtocolSecretsResponse, + ListMeasurementProtocolSecretsPagedResponse> + listMeasurementProtocolSecretsSettings; + private final UnaryCallSettings + createMeasurementProtocolSecretSettings; + private final UnaryCallSettings + deleteMeasurementProtocolSecretSettings; + private final UnaryCallSettings + updateMeasurementProtocolSecretSettings; + private final UnaryCallSettings< + AcknowledgeUserDataCollectionRequest, AcknowledgeUserDataCollectionResponse> + acknowledgeUserDataCollectionSettings; + private final PagedCallSettings< + SearchChangeHistoryEventsRequest, + SearchChangeHistoryEventsResponse, + SearchChangeHistoryEventsPagedResponse> + searchChangeHistoryEventsSettings; + private final UnaryCallSettings + createConversionEventSettings; + private final UnaryCallSettings + getConversionEventSettings; + private final UnaryCallSettings + deleteConversionEventSettings; + private final PagedCallSettings< + ListConversionEventsRequest, + ListConversionEventsResponse, + ListConversionEventsPagedResponse> + listConversionEventsSettings; + private final UnaryCallSettings + createCustomDimensionSettings; + private final UnaryCallSettings + updateCustomDimensionSettings; + private final PagedCallSettings< + ListCustomDimensionsRequest, + ListCustomDimensionsResponse, + ListCustomDimensionsPagedResponse> + listCustomDimensionsSettings; + private final UnaryCallSettings + archiveCustomDimensionSettings; + private final UnaryCallSettings + getCustomDimensionSettings; + private final UnaryCallSettings + createCustomMetricSettings; + private final UnaryCallSettings + updateCustomMetricSettings; + private final PagedCallSettings< + ListCustomMetricsRequest, ListCustomMetricsResponse, ListCustomMetricsPagedResponse> + listCustomMetricsSettings; + private final UnaryCallSettings archiveCustomMetricSettings; + private final UnaryCallSettings getCustomMetricSettings; + private final UnaryCallSettings + getDataRetentionSettingsSettings; + private final UnaryCallSettings + updateDataRetentionSettingsSettings; + private final UnaryCallSettings createDataStreamSettings; + private final UnaryCallSettings deleteDataStreamSettings; + private final UnaryCallSettings updateDataStreamSettings; + private final PagedCallSettings< + ListDataStreamsRequest, ListDataStreamsResponse, ListDataStreamsPagedResponse> + listDataStreamsSettings; + private final UnaryCallSettings getDataStreamSettings; + + private static final PagedListDescriptor + LIST_ACCOUNTS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListAccountsRequest injectToken(ListAccountsRequest payload, String token) { + return ListAccountsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListAccountsRequest injectPageSize(ListAccountsRequest payload, int pageSize) { + return ListAccountsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListAccountsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListAccountsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListAccountsResponse payload) { + return payload.getAccountsList() == null + ? ImmutableList.of() + : payload.getAccountsList(); + } + }; + + private static final PagedListDescriptor< + ListAccountSummariesRequest, ListAccountSummariesResponse, AccountSummary> + LIST_ACCOUNT_SUMMARIES_PAGE_STR_DESC = + new PagedListDescriptor< + ListAccountSummariesRequest, ListAccountSummariesResponse, AccountSummary>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListAccountSummariesRequest injectToken( + ListAccountSummariesRequest payload, String token) { + return ListAccountSummariesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListAccountSummariesRequest injectPageSize( + ListAccountSummariesRequest payload, int pageSize) { + return ListAccountSummariesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListAccountSummariesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListAccountSummariesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListAccountSummariesResponse payload) { + return payload.getAccountSummariesList() == null + ? ImmutableList.of() + : payload.getAccountSummariesList(); + } + }; + + private static final PagedListDescriptor + LIST_PROPERTIES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListPropertiesRequest injectToken(ListPropertiesRequest payload, String token) { + return ListPropertiesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListPropertiesRequest injectPageSize( + ListPropertiesRequest payload, int pageSize) { + return ListPropertiesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListPropertiesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListPropertiesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListPropertiesResponse payload) { + return payload.getPropertiesList() == null + ? ImmutableList.of() + : payload.getPropertiesList(); + } + }; + + private static final PagedListDescriptor< + ListFirebaseLinksRequest, ListFirebaseLinksResponse, FirebaseLink> + LIST_FIREBASE_LINKS_PAGE_STR_DESC = + new PagedListDescriptor< + ListFirebaseLinksRequest, ListFirebaseLinksResponse, FirebaseLink>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListFirebaseLinksRequest injectToken( + ListFirebaseLinksRequest payload, String token) { + return ListFirebaseLinksRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListFirebaseLinksRequest injectPageSize( + ListFirebaseLinksRequest payload, int pageSize) { + return ListFirebaseLinksRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListFirebaseLinksRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListFirebaseLinksResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListFirebaseLinksResponse payload) { + return payload.getFirebaseLinksList() == null + ? ImmutableList.of() + : payload.getFirebaseLinksList(); + } + }; + + private static final PagedListDescriptor< + ListGoogleAdsLinksRequest, ListGoogleAdsLinksResponse, GoogleAdsLink> + LIST_GOOGLE_ADS_LINKS_PAGE_STR_DESC = + new PagedListDescriptor< + ListGoogleAdsLinksRequest, ListGoogleAdsLinksResponse, GoogleAdsLink>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListGoogleAdsLinksRequest injectToken( + ListGoogleAdsLinksRequest payload, String token) { + return ListGoogleAdsLinksRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListGoogleAdsLinksRequest injectPageSize( + ListGoogleAdsLinksRequest payload, int pageSize) { + return ListGoogleAdsLinksRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListGoogleAdsLinksRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListGoogleAdsLinksResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListGoogleAdsLinksResponse payload) { + return payload.getGoogleAdsLinksList() == null + ? ImmutableList.of() + : payload.getGoogleAdsLinksList(); + } + }; + + private static final PagedListDescriptor< + ListMeasurementProtocolSecretsRequest, + ListMeasurementProtocolSecretsResponse, + MeasurementProtocolSecret> + LIST_MEASUREMENT_PROTOCOL_SECRETS_PAGE_STR_DESC = + new PagedListDescriptor< + ListMeasurementProtocolSecretsRequest, + ListMeasurementProtocolSecretsResponse, + MeasurementProtocolSecret>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListMeasurementProtocolSecretsRequest injectToken( + ListMeasurementProtocolSecretsRequest payload, String token) { + return ListMeasurementProtocolSecretsRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public ListMeasurementProtocolSecretsRequest injectPageSize( + ListMeasurementProtocolSecretsRequest payload, int pageSize) { + return ListMeasurementProtocolSecretsRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(ListMeasurementProtocolSecretsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListMeasurementProtocolSecretsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListMeasurementProtocolSecretsResponse payload) { + return payload.getMeasurementProtocolSecretsList() == null + ? ImmutableList.of() + : payload.getMeasurementProtocolSecretsList(); + } + }; + + private static final PagedListDescriptor< + SearchChangeHistoryEventsRequest, SearchChangeHistoryEventsResponse, ChangeHistoryEvent> + SEARCH_CHANGE_HISTORY_EVENTS_PAGE_STR_DESC = + new PagedListDescriptor< + SearchChangeHistoryEventsRequest, + SearchChangeHistoryEventsResponse, + ChangeHistoryEvent>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public SearchChangeHistoryEventsRequest injectToken( + SearchChangeHistoryEventsRequest payload, String token) { + return SearchChangeHistoryEventsRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public SearchChangeHistoryEventsRequest injectPageSize( + SearchChangeHistoryEventsRequest payload, int pageSize) { + return SearchChangeHistoryEventsRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(SearchChangeHistoryEventsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(SearchChangeHistoryEventsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + SearchChangeHistoryEventsResponse payload) { + return payload.getChangeHistoryEventsList() == null + ? ImmutableList.of() + : payload.getChangeHistoryEventsList(); + } + }; + + private static final PagedListDescriptor< + ListConversionEventsRequest, ListConversionEventsResponse, ConversionEvent> + LIST_CONVERSION_EVENTS_PAGE_STR_DESC = + new PagedListDescriptor< + ListConversionEventsRequest, ListConversionEventsResponse, ConversionEvent>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListConversionEventsRequest injectToken( + ListConversionEventsRequest payload, String token) { + return ListConversionEventsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListConversionEventsRequest injectPageSize( + ListConversionEventsRequest payload, int pageSize) { + return ListConversionEventsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListConversionEventsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListConversionEventsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListConversionEventsResponse payload) { + return payload.getConversionEventsList() == null + ? ImmutableList.of() + : payload.getConversionEventsList(); + } + }; + + private static final PagedListDescriptor< + ListCustomDimensionsRequest, ListCustomDimensionsResponse, CustomDimension> + LIST_CUSTOM_DIMENSIONS_PAGE_STR_DESC = + new PagedListDescriptor< + ListCustomDimensionsRequest, ListCustomDimensionsResponse, CustomDimension>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListCustomDimensionsRequest injectToken( + ListCustomDimensionsRequest payload, String token) { + return ListCustomDimensionsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListCustomDimensionsRequest injectPageSize( + ListCustomDimensionsRequest payload, int pageSize) { + return ListCustomDimensionsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListCustomDimensionsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListCustomDimensionsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListCustomDimensionsResponse payload) { + return payload.getCustomDimensionsList() == null + ? ImmutableList.of() + : payload.getCustomDimensionsList(); + } + }; + + private static final PagedListDescriptor< + ListCustomMetricsRequest, ListCustomMetricsResponse, CustomMetric> + LIST_CUSTOM_METRICS_PAGE_STR_DESC = + new PagedListDescriptor< + ListCustomMetricsRequest, ListCustomMetricsResponse, CustomMetric>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListCustomMetricsRequest injectToken( + ListCustomMetricsRequest payload, String token) { + return ListCustomMetricsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListCustomMetricsRequest injectPageSize( + ListCustomMetricsRequest payload, int pageSize) { + return ListCustomMetricsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListCustomMetricsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListCustomMetricsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListCustomMetricsResponse payload) { + return payload.getCustomMetricsList() == null + ? ImmutableList.of() + : payload.getCustomMetricsList(); + } + }; + + private static final PagedListDescriptor< + ListDataStreamsRequest, ListDataStreamsResponse, DataStream> + LIST_DATA_STREAMS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListDataStreamsRequest injectToken( + ListDataStreamsRequest payload, String token) { + return ListDataStreamsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListDataStreamsRequest injectPageSize( + ListDataStreamsRequest payload, int pageSize) { + return ListDataStreamsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListDataStreamsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListDataStreamsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListDataStreamsResponse payload) { + return payload.getDataStreamsList() == null + ? ImmutableList.of() + : payload.getDataStreamsList(); + } + }; + + private static final PagedListResponseFactory< + ListAccountsRequest, ListAccountsResponse, ListAccountsPagedResponse> + LIST_ACCOUNTS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListAccountsRequest, ListAccountsResponse, ListAccountsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListAccountsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_ACCOUNTS_PAGE_STR_DESC, request, context); + return ListAccountsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListAccountSummariesRequest, + ListAccountSummariesResponse, + ListAccountSummariesPagedResponse> + LIST_ACCOUNT_SUMMARIES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListAccountSummariesRequest, + ListAccountSummariesResponse, + ListAccountSummariesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListAccountSummariesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_ACCOUNT_SUMMARIES_PAGE_STR_DESC, request, context); + return ListAccountSummariesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListPropertiesRequest, ListPropertiesResponse, ListPropertiesPagedResponse> + LIST_PROPERTIES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListPropertiesRequest, ListPropertiesResponse, ListPropertiesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListPropertiesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_PROPERTIES_PAGE_STR_DESC, request, context); + return ListPropertiesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListFirebaseLinksRequest, ListFirebaseLinksResponse, ListFirebaseLinksPagedResponse> + LIST_FIREBASE_LINKS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListFirebaseLinksRequest, + ListFirebaseLinksResponse, + ListFirebaseLinksPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListFirebaseLinksRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_FIREBASE_LINKS_PAGE_STR_DESC, request, context); + return ListFirebaseLinksPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListGoogleAdsLinksRequest, ListGoogleAdsLinksResponse, ListGoogleAdsLinksPagedResponse> + LIST_GOOGLE_ADS_LINKS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListGoogleAdsLinksRequest, + ListGoogleAdsLinksResponse, + ListGoogleAdsLinksPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListGoogleAdsLinksRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_GOOGLE_ADS_LINKS_PAGE_STR_DESC, request, context); + return ListGoogleAdsLinksPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListMeasurementProtocolSecretsRequest, + ListMeasurementProtocolSecretsResponse, + ListMeasurementProtocolSecretsPagedResponse> + LIST_MEASUREMENT_PROTOCOL_SECRETS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListMeasurementProtocolSecretsRequest, + ListMeasurementProtocolSecretsResponse, + ListMeasurementProtocolSecretsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable< + ListMeasurementProtocolSecretsRequest, + ListMeasurementProtocolSecretsResponse> + callable, + ListMeasurementProtocolSecretsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListMeasurementProtocolSecretsRequest, + ListMeasurementProtocolSecretsResponse, + MeasurementProtocolSecret> + pageContext = + PageContext.create( + callable, + LIST_MEASUREMENT_PROTOCOL_SECRETS_PAGE_STR_DESC, + request, + context); + return ListMeasurementProtocolSecretsPagedResponse.createAsync( + pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + SearchChangeHistoryEventsRequest, + SearchChangeHistoryEventsResponse, + SearchChangeHistoryEventsPagedResponse> + SEARCH_CHANGE_HISTORY_EVENTS_PAGE_STR_FACT = + new PagedListResponseFactory< + SearchChangeHistoryEventsRequest, + SearchChangeHistoryEventsResponse, + SearchChangeHistoryEventsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable + callable, + SearchChangeHistoryEventsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + SearchChangeHistoryEventsRequest, + SearchChangeHistoryEventsResponse, + ChangeHistoryEvent> + pageContext = + PageContext.create( + callable, SEARCH_CHANGE_HISTORY_EVENTS_PAGE_STR_DESC, request, context); + return SearchChangeHistoryEventsPagedResponse.createAsync( + pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListConversionEventsRequest, + ListConversionEventsResponse, + ListConversionEventsPagedResponse> + LIST_CONVERSION_EVENTS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListConversionEventsRequest, + ListConversionEventsResponse, + ListConversionEventsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListConversionEventsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListConversionEventsRequest, ListConversionEventsResponse, ConversionEvent> + pageContext = + PageContext.create( + callable, LIST_CONVERSION_EVENTS_PAGE_STR_DESC, request, context); + return ListConversionEventsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListCustomDimensionsRequest, + ListCustomDimensionsResponse, + ListCustomDimensionsPagedResponse> + LIST_CUSTOM_DIMENSIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListCustomDimensionsRequest, + ListCustomDimensionsResponse, + ListCustomDimensionsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListCustomDimensionsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListCustomDimensionsRequest, ListCustomDimensionsResponse, CustomDimension> + pageContext = + PageContext.create( + callable, LIST_CUSTOM_DIMENSIONS_PAGE_STR_DESC, request, context); + return ListCustomDimensionsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListCustomMetricsRequest, ListCustomMetricsResponse, ListCustomMetricsPagedResponse> + LIST_CUSTOM_METRICS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListCustomMetricsRequest, + ListCustomMetricsResponse, + ListCustomMetricsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListCustomMetricsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_CUSTOM_METRICS_PAGE_STR_DESC, request, context); + return ListCustomMetricsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListDataStreamsRequest, ListDataStreamsResponse, ListDataStreamsPagedResponse> + LIST_DATA_STREAMS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListDataStreamsRequest, ListDataStreamsResponse, ListDataStreamsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListDataStreamsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_DATA_STREAMS_PAGE_STR_DESC, request, context); + return ListDataStreamsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to getAccount. */ + public UnaryCallSettings getAccountSettings() { + return getAccountSettings; + } + + /** Returns the object with the settings used for calls to listAccounts. */ + public PagedCallSettings + listAccountsSettings() { + return listAccountsSettings; + } + + /** Returns the object with the settings used for calls to deleteAccount. */ + public UnaryCallSettings deleteAccountSettings() { + return deleteAccountSettings; + } + + /** Returns the object with the settings used for calls to updateAccount. */ + public UnaryCallSettings updateAccountSettings() { + return updateAccountSettings; + } + + /** Returns the object with the settings used for calls to provisionAccountTicket. */ + public UnaryCallSettings + provisionAccountTicketSettings() { + return provisionAccountTicketSettings; + } + + /** Returns the object with the settings used for calls to listAccountSummaries. */ + public PagedCallSettings< + ListAccountSummariesRequest, + ListAccountSummariesResponse, + ListAccountSummariesPagedResponse> + listAccountSummariesSettings() { + return listAccountSummariesSettings; + } + + /** Returns the object with the settings used for calls to getProperty. */ + public UnaryCallSettings getPropertySettings() { + return getPropertySettings; + } + + /** Returns the object with the settings used for calls to listProperties. */ + public PagedCallSettings< + ListPropertiesRequest, ListPropertiesResponse, ListPropertiesPagedResponse> + listPropertiesSettings() { + return listPropertiesSettings; + } + + /** Returns the object with the settings used for calls to createProperty. */ + public UnaryCallSettings createPropertySettings() { + return createPropertySettings; + } + + /** Returns the object with the settings used for calls to deleteProperty. */ + public UnaryCallSettings deletePropertySettings() { + return deletePropertySettings; + } + + /** Returns the object with the settings used for calls to updateProperty. */ + public UnaryCallSettings updatePropertySettings() { + return updatePropertySettings; + } + + /** Returns the object with the settings used for calls to createFirebaseLink. */ + public UnaryCallSettings createFirebaseLinkSettings() { + return createFirebaseLinkSettings; + } + + /** Returns the object with the settings used for calls to deleteFirebaseLink. */ + public UnaryCallSettings deleteFirebaseLinkSettings() { + return deleteFirebaseLinkSettings; + } + + /** Returns the object with the settings used for calls to listFirebaseLinks. */ + public PagedCallSettings< + ListFirebaseLinksRequest, ListFirebaseLinksResponse, ListFirebaseLinksPagedResponse> + listFirebaseLinksSettings() { + return listFirebaseLinksSettings; + } + + /** Returns the object with the settings used for calls to createGoogleAdsLink. */ + public UnaryCallSettings + createGoogleAdsLinkSettings() { + return createGoogleAdsLinkSettings; + } + + /** Returns the object with the settings used for calls to updateGoogleAdsLink. */ + public UnaryCallSettings + updateGoogleAdsLinkSettings() { + return updateGoogleAdsLinkSettings; + } + + /** Returns the object with the settings used for calls to deleteGoogleAdsLink. */ + public UnaryCallSettings deleteGoogleAdsLinkSettings() { + return deleteGoogleAdsLinkSettings; + } + + /** Returns the object with the settings used for calls to listGoogleAdsLinks. */ + public PagedCallSettings< + ListGoogleAdsLinksRequest, ListGoogleAdsLinksResponse, ListGoogleAdsLinksPagedResponse> + listGoogleAdsLinksSettings() { + return listGoogleAdsLinksSettings; + } + + /** Returns the object with the settings used for calls to getDataSharingSettings. */ + public UnaryCallSettings + getDataSharingSettingsSettings() { + return getDataSharingSettingsSettings; + } + + /** Returns the object with the settings used for calls to getMeasurementProtocolSecret. */ + public UnaryCallSettings + getMeasurementProtocolSecretSettings() { + return getMeasurementProtocolSecretSettings; + } + + /** Returns the object with the settings used for calls to listMeasurementProtocolSecrets. */ + public PagedCallSettings< + ListMeasurementProtocolSecretsRequest, + ListMeasurementProtocolSecretsResponse, + ListMeasurementProtocolSecretsPagedResponse> + listMeasurementProtocolSecretsSettings() { + return listMeasurementProtocolSecretsSettings; + } + + /** Returns the object with the settings used for calls to createMeasurementProtocolSecret. */ + public UnaryCallSettings + createMeasurementProtocolSecretSettings() { + return createMeasurementProtocolSecretSettings; + } + + /** Returns the object with the settings used for calls to deleteMeasurementProtocolSecret. */ + public UnaryCallSettings + deleteMeasurementProtocolSecretSettings() { + return deleteMeasurementProtocolSecretSettings; + } + + /** Returns the object with the settings used for calls to updateMeasurementProtocolSecret. */ + public UnaryCallSettings + updateMeasurementProtocolSecretSettings() { + return updateMeasurementProtocolSecretSettings; + } + + /** Returns the object with the settings used for calls to acknowledgeUserDataCollection. */ + public UnaryCallSettings< + AcknowledgeUserDataCollectionRequest, AcknowledgeUserDataCollectionResponse> + acknowledgeUserDataCollectionSettings() { + return acknowledgeUserDataCollectionSettings; + } + + /** Returns the object with the settings used for calls to searchChangeHistoryEvents. */ + public PagedCallSettings< + SearchChangeHistoryEventsRequest, + SearchChangeHistoryEventsResponse, + SearchChangeHistoryEventsPagedResponse> + searchChangeHistoryEventsSettings() { + return searchChangeHistoryEventsSettings; + } + + /** Returns the object with the settings used for calls to createConversionEvent. */ + public UnaryCallSettings + createConversionEventSettings() { + return createConversionEventSettings; + } + + /** Returns the object with the settings used for calls to getConversionEvent. */ + public UnaryCallSettings + getConversionEventSettings() { + return getConversionEventSettings; + } + + /** Returns the object with the settings used for calls to deleteConversionEvent. */ + public UnaryCallSettings deleteConversionEventSettings() { + return deleteConversionEventSettings; + } + + /** Returns the object with the settings used for calls to listConversionEvents. */ + public PagedCallSettings< + ListConversionEventsRequest, + ListConversionEventsResponse, + ListConversionEventsPagedResponse> + listConversionEventsSettings() { + return listConversionEventsSettings; + } + + /** Returns the object with the settings used for calls to createCustomDimension. */ + public UnaryCallSettings + createCustomDimensionSettings() { + return createCustomDimensionSettings; + } + + /** Returns the object with the settings used for calls to updateCustomDimension. */ + public UnaryCallSettings + updateCustomDimensionSettings() { + return updateCustomDimensionSettings; + } + + /** Returns the object with the settings used for calls to listCustomDimensions. */ + public PagedCallSettings< + ListCustomDimensionsRequest, + ListCustomDimensionsResponse, + ListCustomDimensionsPagedResponse> + listCustomDimensionsSettings() { + return listCustomDimensionsSettings; + } + + /** Returns the object with the settings used for calls to archiveCustomDimension. */ + public UnaryCallSettings archiveCustomDimensionSettings() { + return archiveCustomDimensionSettings; + } + + /** Returns the object with the settings used for calls to getCustomDimension. */ + public UnaryCallSettings + getCustomDimensionSettings() { + return getCustomDimensionSettings; + } + + /** Returns the object with the settings used for calls to createCustomMetric. */ + public UnaryCallSettings createCustomMetricSettings() { + return createCustomMetricSettings; + } + + /** Returns the object with the settings used for calls to updateCustomMetric. */ + public UnaryCallSettings updateCustomMetricSettings() { + return updateCustomMetricSettings; + } + + /** Returns the object with the settings used for calls to listCustomMetrics. */ + public PagedCallSettings< + ListCustomMetricsRequest, ListCustomMetricsResponse, ListCustomMetricsPagedResponse> + listCustomMetricsSettings() { + return listCustomMetricsSettings; + } + + /** Returns the object with the settings used for calls to archiveCustomMetric. */ + public UnaryCallSettings archiveCustomMetricSettings() { + return archiveCustomMetricSettings; + } + + /** Returns the object with the settings used for calls to getCustomMetric. */ + public UnaryCallSettings getCustomMetricSettings() { + return getCustomMetricSettings; + } + + /** Returns the object with the settings used for calls to getDataRetentionSettings. */ + public UnaryCallSettings + getDataRetentionSettingsSettings() { + return getDataRetentionSettingsSettings; + } + + /** Returns the object with the settings used for calls to updateDataRetentionSettings. */ + public UnaryCallSettings + updateDataRetentionSettingsSettings() { + return updateDataRetentionSettingsSettings; + } + + /** Returns the object with the settings used for calls to createDataStream. */ + public UnaryCallSettings createDataStreamSettings() { + return createDataStreamSettings; + } + + /** Returns the object with the settings used for calls to deleteDataStream. */ + public UnaryCallSettings deleteDataStreamSettings() { + return deleteDataStreamSettings; + } + + /** Returns the object with the settings used for calls to updateDataStream. */ + public UnaryCallSettings updateDataStreamSettings() { + return updateDataStreamSettings; + } + + /** Returns the object with the settings used for calls to listDataStreams. */ + public PagedCallSettings< + ListDataStreamsRequest, ListDataStreamsResponse, ListDataStreamsPagedResponse> + listDataStreamsSettings() { + return listDataStreamsSettings; + } + + /** Returns the object with the settings used for calls to getDataStream. */ + public UnaryCallSettings getDataStreamSettings() { + return getDataStreamSettings; + } + + public AnalyticsAdminServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcAnalyticsAdminServiceStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonAnalyticsAdminServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "analyticsadmin.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "analyticsadmin.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(AnalyticsAdminServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(AnalyticsAdminServiceStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return AnalyticsAdminServiceStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected AnalyticsAdminServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + getAccountSettings = settingsBuilder.getAccountSettings().build(); + listAccountsSettings = settingsBuilder.listAccountsSettings().build(); + deleteAccountSettings = settingsBuilder.deleteAccountSettings().build(); + updateAccountSettings = settingsBuilder.updateAccountSettings().build(); + provisionAccountTicketSettings = settingsBuilder.provisionAccountTicketSettings().build(); + listAccountSummariesSettings = settingsBuilder.listAccountSummariesSettings().build(); + getPropertySettings = settingsBuilder.getPropertySettings().build(); + listPropertiesSettings = settingsBuilder.listPropertiesSettings().build(); + createPropertySettings = settingsBuilder.createPropertySettings().build(); + deletePropertySettings = settingsBuilder.deletePropertySettings().build(); + updatePropertySettings = settingsBuilder.updatePropertySettings().build(); + createFirebaseLinkSettings = settingsBuilder.createFirebaseLinkSettings().build(); + deleteFirebaseLinkSettings = settingsBuilder.deleteFirebaseLinkSettings().build(); + listFirebaseLinksSettings = settingsBuilder.listFirebaseLinksSettings().build(); + createGoogleAdsLinkSettings = settingsBuilder.createGoogleAdsLinkSettings().build(); + updateGoogleAdsLinkSettings = settingsBuilder.updateGoogleAdsLinkSettings().build(); + deleteGoogleAdsLinkSettings = settingsBuilder.deleteGoogleAdsLinkSettings().build(); + listGoogleAdsLinksSettings = settingsBuilder.listGoogleAdsLinksSettings().build(); + getDataSharingSettingsSettings = settingsBuilder.getDataSharingSettingsSettings().build(); + getMeasurementProtocolSecretSettings = + settingsBuilder.getMeasurementProtocolSecretSettings().build(); + listMeasurementProtocolSecretsSettings = + settingsBuilder.listMeasurementProtocolSecretsSettings().build(); + createMeasurementProtocolSecretSettings = + settingsBuilder.createMeasurementProtocolSecretSettings().build(); + deleteMeasurementProtocolSecretSettings = + settingsBuilder.deleteMeasurementProtocolSecretSettings().build(); + updateMeasurementProtocolSecretSettings = + settingsBuilder.updateMeasurementProtocolSecretSettings().build(); + acknowledgeUserDataCollectionSettings = + settingsBuilder.acknowledgeUserDataCollectionSettings().build(); + searchChangeHistoryEventsSettings = settingsBuilder.searchChangeHistoryEventsSettings().build(); + createConversionEventSettings = settingsBuilder.createConversionEventSettings().build(); + getConversionEventSettings = settingsBuilder.getConversionEventSettings().build(); + deleteConversionEventSettings = settingsBuilder.deleteConversionEventSettings().build(); + listConversionEventsSettings = settingsBuilder.listConversionEventsSettings().build(); + createCustomDimensionSettings = settingsBuilder.createCustomDimensionSettings().build(); + updateCustomDimensionSettings = settingsBuilder.updateCustomDimensionSettings().build(); + listCustomDimensionsSettings = settingsBuilder.listCustomDimensionsSettings().build(); + archiveCustomDimensionSettings = settingsBuilder.archiveCustomDimensionSettings().build(); + getCustomDimensionSettings = settingsBuilder.getCustomDimensionSettings().build(); + createCustomMetricSettings = settingsBuilder.createCustomMetricSettings().build(); + updateCustomMetricSettings = settingsBuilder.updateCustomMetricSettings().build(); + listCustomMetricsSettings = settingsBuilder.listCustomMetricsSettings().build(); + archiveCustomMetricSettings = settingsBuilder.archiveCustomMetricSettings().build(); + getCustomMetricSettings = settingsBuilder.getCustomMetricSettings().build(); + getDataRetentionSettingsSettings = settingsBuilder.getDataRetentionSettingsSettings().build(); + updateDataRetentionSettingsSettings = + settingsBuilder.updateDataRetentionSettingsSettings().build(); + createDataStreamSettings = settingsBuilder.createDataStreamSettings().build(); + deleteDataStreamSettings = settingsBuilder.deleteDataStreamSettings().build(); + updateDataStreamSettings = settingsBuilder.updateDataStreamSettings().build(); + listDataStreamsSettings = settingsBuilder.listDataStreamsSettings().build(); + getDataStreamSettings = settingsBuilder.getDataStreamSettings().build(); + } + + /** Builder for AnalyticsAdminServiceStubSettings. */ + public static class Builder + extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder getAccountSettings; + private final PagedCallSettings.Builder< + ListAccountsRequest, ListAccountsResponse, ListAccountsPagedResponse> + listAccountsSettings; + private final UnaryCallSettings.Builder deleteAccountSettings; + private final UnaryCallSettings.Builder updateAccountSettings; + private final UnaryCallSettings.Builder< + ProvisionAccountTicketRequest, ProvisionAccountTicketResponse> + provisionAccountTicketSettings; + private final PagedCallSettings.Builder< + ListAccountSummariesRequest, + ListAccountSummariesResponse, + ListAccountSummariesPagedResponse> + listAccountSummariesSettings; + private final UnaryCallSettings.Builder getPropertySettings; + private final PagedCallSettings.Builder< + ListPropertiesRequest, ListPropertiesResponse, ListPropertiesPagedResponse> + listPropertiesSettings; + private final UnaryCallSettings.Builder createPropertySettings; + private final UnaryCallSettings.Builder deletePropertySettings; + private final UnaryCallSettings.Builder updatePropertySettings; + private final UnaryCallSettings.Builder + createFirebaseLinkSettings; + private final UnaryCallSettings.Builder + deleteFirebaseLinkSettings; + private final PagedCallSettings.Builder< + ListFirebaseLinksRequest, ListFirebaseLinksResponse, ListFirebaseLinksPagedResponse> + listFirebaseLinksSettings; + private final UnaryCallSettings.Builder + createGoogleAdsLinkSettings; + private final UnaryCallSettings.Builder + updateGoogleAdsLinkSettings; + private final UnaryCallSettings.Builder + deleteGoogleAdsLinkSettings; + private final PagedCallSettings.Builder< + ListGoogleAdsLinksRequest, ListGoogleAdsLinksResponse, ListGoogleAdsLinksPagedResponse> + listGoogleAdsLinksSettings; + private final UnaryCallSettings.Builder + getDataSharingSettingsSettings; + private final UnaryCallSettings.Builder< + GetMeasurementProtocolSecretRequest, MeasurementProtocolSecret> + getMeasurementProtocolSecretSettings; + private final PagedCallSettings.Builder< + ListMeasurementProtocolSecretsRequest, + ListMeasurementProtocolSecretsResponse, + ListMeasurementProtocolSecretsPagedResponse> + listMeasurementProtocolSecretsSettings; + private final UnaryCallSettings.Builder< + CreateMeasurementProtocolSecretRequest, MeasurementProtocolSecret> + createMeasurementProtocolSecretSettings; + private final UnaryCallSettings.Builder + deleteMeasurementProtocolSecretSettings; + private final UnaryCallSettings.Builder< + UpdateMeasurementProtocolSecretRequest, MeasurementProtocolSecret> + updateMeasurementProtocolSecretSettings; + private final UnaryCallSettings.Builder< + AcknowledgeUserDataCollectionRequest, AcknowledgeUserDataCollectionResponse> + acknowledgeUserDataCollectionSettings; + private final PagedCallSettings.Builder< + SearchChangeHistoryEventsRequest, + SearchChangeHistoryEventsResponse, + SearchChangeHistoryEventsPagedResponse> + searchChangeHistoryEventsSettings; + private final UnaryCallSettings.Builder + createConversionEventSettings; + private final UnaryCallSettings.Builder + getConversionEventSettings; + private final UnaryCallSettings.Builder + deleteConversionEventSettings; + private final PagedCallSettings.Builder< + ListConversionEventsRequest, + ListConversionEventsResponse, + ListConversionEventsPagedResponse> + listConversionEventsSettings; + private final UnaryCallSettings.Builder + createCustomDimensionSettings; + private final UnaryCallSettings.Builder + updateCustomDimensionSettings; + private final PagedCallSettings.Builder< + ListCustomDimensionsRequest, + ListCustomDimensionsResponse, + ListCustomDimensionsPagedResponse> + listCustomDimensionsSettings; + private final UnaryCallSettings.Builder + archiveCustomDimensionSettings; + private final UnaryCallSettings.Builder + getCustomDimensionSettings; + private final UnaryCallSettings.Builder + createCustomMetricSettings; + private final UnaryCallSettings.Builder + updateCustomMetricSettings; + private final PagedCallSettings.Builder< + ListCustomMetricsRequest, ListCustomMetricsResponse, ListCustomMetricsPagedResponse> + listCustomMetricsSettings; + private final UnaryCallSettings.Builder + archiveCustomMetricSettings; + private final UnaryCallSettings.Builder + getCustomMetricSettings; + private final UnaryCallSettings.Builder + getDataRetentionSettingsSettings; + private final UnaryCallSettings.Builder< + UpdateDataRetentionSettingsRequest, DataRetentionSettings> + updateDataRetentionSettingsSettings; + private final UnaryCallSettings.Builder + createDataStreamSettings; + private final UnaryCallSettings.Builder + deleteDataStreamSettings; + private final UnaryCallSettings.Builder + updateDataStreamSettings; + private final PagedCallSettings.Builder< + ListDataStreamsRequest, ListDataStreamsResponse, ListDataStreamsPagedResponse> + listDataStreamsSettings; + private final UnaryCallSettings.Builder getDataStreamSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put( + "retry_policy_0_codes", + ImmutableSet.copyOf( + Lists.newArrayList( + StatusCode.Code.UNAVAILABLE, StatusCode.Code.UNKNOWN))); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(60000L)) + .setTotalTimeout(Duration.ofMillis(60000L)) + .build(); + definitions.put("no_retry_1_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(1000L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(60000L)) + .setTotalTimeout(Duration.ofMillis(60000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + getAccountSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listAccountsSettings = PagedCallSettings.newBuilder(LIST_ACCOUNTS_PAGE_STR_FACT); + deleteAccountSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateAccountSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + provisionAccountTicketSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listAccountSummariesSettings = + PagedCallSettings.newBuilder(LIST_ACCOUNT_SUMMARIES_PAGE_STR_FACT); + getPropertySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listPropertiesSettings = PagedCallSettings.newBuilder(LIST_PROPERTIES_PAGE_STR_FACT); + createPropertySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deletePropertySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updatePropertySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createFirebaseLinkSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteFirebaseLinkSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listFirebaseLinksSettings = PagedCallSettings.newBuilder(LIST_FIREBASE_LINKS_PAGE_STR_FACT); + createGoogleAdsLinkSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateGoogleAdsLinkSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteGoogleAdsLinkSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listGoogleAdsLinksSettings = + PagedCallSettings.newBuilder(LIST_GOOGLE_ADS_LINKS_PAGE_STR_FACT); + getDataSharingSettingsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getMeasurementProtocolSecretSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listMeasurementProtocolSecretsSettings = + PagedCallSettings.newBuilder(LIST_MEASUREMENT_PROTOCOL_SECRETS_PAGE_STR_FACT); + createMeasurementProtocolSecretSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteMeasurementProtocolSecretSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateMeasurementProtocolSecretSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + acknowledgeUserDataCollectionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + searchChangeHistoryEventsSettings = + PagedCallSettings.newBuilder(SEARCH_CHANGE_HISTORY_EVENTS_PAGE_STR_FACT); + createConversionEventSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getConversionEventSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteConversionEventSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listConversionEventsSettings = + PagedCallSettings.newBuilder(LIST_CONVERSION_EVENTS_PAGE_STR_FACT); + createCustomDimensionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateCustomDimensionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listCustomDimensionsSettings = + PagedCallSettings.newBuilder(LIST_CUSTOM_DIMENSIONS_PAGE_STR_FACT); + archiveCustomDimensionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getCustomDimensionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createCustomMetricSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateCustomMetricSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listCustomMetricsSettings = PagedCallSettings.newBuilder(LIST_CUSTOM_METRICS_PAGE_STR_FACT); + archiveCustomMetricSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getCustomMetricSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getDataRetentionSettingsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateDataRetentionSettingsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createDataStreamSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteDataStreamSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateDataStreamSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listDataStreamsSettings = PagedCallSettings.newBuilder(LIST_DATA_STREAMS_PAGE_STR_FACT); + getDataStreamSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + getAccountSettings, + listAccountsSettings, + deleteAccountSettings, + updateAccountSettings, + provisionAccountTicketSettings, + listAccountSummariesSettings, + getPropertySettings, + listPropertiesSettings, + createPropertySettings, + deletePropertySettings, + updatePropertySettings, + createFirebaseLinkSettings, + deleteFirebaseLinkSettings, + listFirebaseLinksSettings, + createGoogleAdsLinkSettings, + updateGoogleAdsLinkSettings, + deleteGoogleAdsLinkSettings, + listGoogleAdsLinksSettings, + getDataSharingSettingsSettings, + getMeasurementProtocolSecretSettings, + listMeasurementProtocolSecretsSettings, + createMeasurementProtocolSecretSettings, + deleteMeasurementProtocolSecretSettings, + updateMeasurementProtocolSecretSettings, + acknowledgeUserDataCollectionSettings, + searchChangeHistoryEventsSettings, + createConversionEventSettings, + getConversionEventSettings, + deleteConversionEventSettings, + listConversionEventsSettings, + createCustomDimensionSettings, + updateCustomDimensionSettings, + listCustomDimensionsSettings, + archiveCustomDimensionSettings, + getCustomDimensionSettings, + createCustomMetricSettings, + updateCustomMetricSettings, + listCustomMetricsSettings, + archiveCustomMetricSettings, + getCustomMetricSettings, + getDataRetentionSettingsSettings, + updateDataRetentionSettingsSettings, + createDataStreamSettings, + deleteDataStreamSettings, + updateDataStreamSettings, + listDataStreamsSettings, + getDataStreamSettings); + initDefaults(this); + } + + protected Builder(AnalyticsAdminServiceStubSettings settings) { + super(settings); + + getAccountSettings = settings.getAccountSettings.toBuilder(); + listAccountsSettings = settings.listAccountsSettings.toBuilder(); + deleteAccountSettings = settings.deleteAccountSettings.toBuilder(); + updateAccountSettings = settings.updateAccountSettings.toBuilder(); + provisionAccountTicketSettings = settings.provisionAccountTicketSettings.toBuilder(); + listAccountSummariesSettings = settings.listAccountSummariesSettings.toBuilder(); + getPropertySettings = settings.getPropertySettings.toBuilder(); + listPropertiesSettings = settings.listPropertiesSettings.toBuilder(); + createPropertySettings = settings.createPropertySettings.toBuilder(); + deletePropertySettings = settings.deletePropertySettings.toBuilder(); + updatePropertySettings = settings.updatePropertySettings.toBuilder(); + createFirebaseLinkSettings = settings.createFirebaseLinkSettings.toBuilder(); + deleteFirebaseLinkSettings = settings.deleteFirebaseLinkSettings.toBuilder(); + listFirebaseLinksSettings = settings.listFirebaseLinksSettings.toBuilder(); + createGoogleAdsLinkSettings = settings.createGoogleAdsLinkSettings.toBuilder(); + updateGoogleAdsLinkSettings = settings.updateGoogleAdsLinkSettings.toBuilder(); + deleteGoogleAdsLinkSettings = settings.deleteGoogleAdsLinkSettings.toBuilder(); + listGoogleAdsLinksSettings = settings.listGoogleAdsLinksSettings.toBuilder(); + getDataSharingSettingsSettings = settings.getDataSharingSettingsSettings.toBuilder(); + getMeasurementProtocolSecretSettings = + settings.getMeasurementProtocolSecretSettings.toBuilder(); + listMeasurementProtocolSecretsSettings = + settings.listMeasurementProtocolSecretsSettings.toBuilder(); + createMeasurementProtocolSecretSettings = + settings.createMeasurementProtocolSecretSettings.toBuilder(); + deleteMeasurementProtocolSecretSettings = + settings.deleteMeasurementProtocolSecretSettings.toBuilder(); + updateMeasurementProtocolSecretSettings = + settings.updateMeasurementProtocolSecretSettings.toBuilder(); + acknowledgeUserDataCollectionSettings = + settings.acknowledgeUserDataCollectionSettings.toBuilder(); + searchChangeHistoryEventsSettings = settings.searchChangeHistoryEventsSettings.toBuilder(); + createConversionEventSettings = settings.createConversionEventSettings.toBuilder(); + getConversionEventSettings = settings.getConversionEventSettings.toBuilder(); + deleteConversionEventSettings = settings.deleteConversionEventSettings.toBuilder(); + listConversionEventsSettings = settings.listConversionEventsSettings.toBuilder(); + createCustomDimensionSettings = settings.createCustomDimensionSettings.toBuilder(); + updateCustomDimensionSettings = settings.updateCustomDimensionSettings.toBuilder(); + listCustomDimensionsSettings = settings.listCustomDimensionsSettings.toBuilder(); + archiveCustomDimensionSettings = settings.archiveCustomDimensionSettings.toBuilder(); + getCustomDimensionSettings = settings.getCustomDimensionSettings.toBuilder(); + createCustomMetricSettings = settings.createCustomMetricSettings.toBuilder(); + updateCustomMetricSettings = settings.updateCustomMetricSettings.toBuilder(); + listCustomMetricsSettings = settings.listCustomMetricsSettings.toBuilder(); + archiveCustomMetricSettings = settings.archiveCustomMetricSettings.toBuilder(); + getCustomMetricSettings = settings.getCustomMetricSettings.toBuilder(); + getDataRetentionSettingsSettings = settings.getDataRetentionSettingsSettings.toBuilder(); + updateDataRetentionSettingsSettings = + settings.updateDataRetentionSettingsSettings.toBuilder(); + createDataStreamSettings = settings.createDataStreamSettings.toBuilder(); + deleteDataStreamSettings = settings.deleteDataStreamSettings.toBuilder(); + updateDataStreamSettings = settings.updateDataStreamSettings.toBuilder(); + listDataStreamsSettings = settings.listDataStreamsSettings.toBuilder(); + getDataStreamSettings = settings.getDataStreamSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + getAccountSettings, + listAccountsSettings, + deleteAccountSettings, + updateAccountSettings, + provisionAccountTicketSettings, + listAccountSummariesSettings, + getPropertySettings, + listPropertiesSettings, + createPropertySettings, + deletePropertySettings, + updatePropertySettings, + createFirebaseLinkSettings, + deleteFirebaseLinkSettings, + listFirebaseLinksSettings, + createGoogleAdsLinkSettings, + updateGoogleAdsLinkSettings, + deleteGoogleAdsLinkSettings, + listGoogleAdsLinksSettings, + getDataSharingSettingsSettings, + getMeasurementProtocolSecretSettings, + listMeasurementProtocolSecretsSettings, + createMeasurementProtocolSecretSettings, + deleteMeasurementProtocolSecretSettings, + updateMeasurementProtocolSecretSettings, + acknowledgeUserDataCollectionSettings, + searchChangeHistoryEventsSettings, + createConversionEventSettings, + getConversionEventSettings, + deleteConversionEventSettings, + listConversionEventsSettings, + createCustomDimensionSettings, + updateCustomDimensionSettings, + listCustomDimensionsSettings, + archiveCustomDimensionSettings, + getCustomDimensionSettings, + createCustomMetricSettings, + updateCustomMetricSettings, + listCustomMetricsSettings, + archiveCustomMetricSettings, + getCustomMetricSettings, + getDataRetentionSettingsSettings, + updateDataRetentionSettingsSettings, + createDataStreamSettings, + deleteDataStreamSettings, + updateDataStreamSettings, + listDataStreamsSettings, + getDataStreamSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .getAccountSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .listAccountsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .deleteAccountSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .updateAccountSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .provisionAccountTicketSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .listAccountSummariesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getPropertySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .listPropertiesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .createPropertySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .deletePropertySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .updatePropertySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .createFirebaseLinkSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .deleteFirebaseLinkSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .listFirebaseLinksSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .createGoogleAdsLinkSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .updateGoogleAdsLinkSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .deleteGoogleAdsLinkSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .listGoogleAdsLinksSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .getDataSharingSettingsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getMeasurementProtocolSecretSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listMeasurementProtocolSecretsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createMeasurementProtocolSecretSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteMeasurementProtocolSecretSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updateMeasurementProtocolSecretSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .acknowledgeUserDataCollectionSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .searchChangeHistoryEventsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createConversionEventSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getConversionEventSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteConversionEventSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listConversionEventsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createCustomDimensionSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updateCustomDimensionSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listCustomDimensionsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .archiveCustomDimensionSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getCustomDimensionSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createCustomMetricSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updateCustomMetricSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listCustomMetricsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .archiveCustomMetricSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getCustomMetricSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getDataRetentionSettingsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updateDataRetentionSettingsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createDataStreamSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteDataStreamSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updateDataStreamSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listDataStreamsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getDataStreamSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to getAccount. */ + public UnaryCallSettings.Builder getAccountSettings() { + return getAccountSettings; + } + + /** Returns the builder for the settings used for calls to listAccounts. */ + public PagedCallSettings.Builder< + ListAccountsRequest, ListAccountsResponse, ListAccountsPagedResponse> + listAccountsSettings() { + return listAccountsSettings; + } + + /** Returns the builder for the settings used for calls to deleteAccount. */ + public UnaryCallSettings.Builder deleteAccountSettings() { + return deleteAccountSettings; + } + + /** Returns the builder for the settings used for calls to updateAccount. */ + public UnaryCallSettings.Builder updateAccountSettings() { + return updateAccountSettings; + } + + /** Returns the builder for the settings used for calls to provisionAccountTicket. */ + public UnaryCallSettings.Builder + provisionAccountTicketSettings() { + return provisionAccountTicketSettings; + } + + /** Returns the builder for the settings used for calls to listAccountSummaries. */ + public PagedCallSettings.Builder< + ListAccountSummariesRequest, + ListAccountSummariesResponse, + ListAccountSummariesPagedResponse> + listAccountSummariesSettings() { + return listAccountSummariesSettings; + } + + /** Returns the builder for the settings used for calls to getProperty. */ + public UnaryCallSettings.Builder getPropertySettings() { + return getPropertySettings; + } + + /** Returns the builder for the settings used for calls to listProperties. */ + public PagedCallSettings.Builder< + ListPropertiesRequest, ListPropertiesResponse, ListPropertiesPagedResponse> + listPropertiesSettings() { + return listPropertiesSettings; + } + + /** Returns the builder for the settings used for calls to createProperty. */ + public UnaryCallSettings.Builder createPropertySettings() { + return createPropertySettings; + } + + /** Returns the builder for the settings used for calls to deleteProperty. */ + public UnaryCallSettings.Builder deletePropertySettings() { + return deletePropertySettings; + } + + /** Returns the builder for the settings used for calls to updateProperty. */ + public UnaryCallSettings.Builder updatePropertySettings() { + return updatePropertySettings; + } + + /** Returns the builder for the settings used for calls to createFirebaseLink. */ + public UnaryCallSettings.Builder + createFirebaseLinkSettings() { + return createFirebaseLinkSettings; + } + + /** Returns the builder for the settings used for calls to deleteFirebaseLink. */ + public UnaryCallSettings.Builder + deleteFirebaseLinkSettings() { + return deleteFirebaseLinkSettings; + } + + /** Returns the builder for the settings used for calls to listFirebaseLinks. */ + public PagedCallSettings.Builder< + ListFirebaseLinksRequest, ListFirebaseLinksResponse, ListFirebaseLinksPagedResponse> + listFirebaseLinksSettings() { + return listFirebaseLinksSettings; + } + + /** Returns the builder for the settings used for calls to createGoogleAdsLink. */ + public UnaryCallSettings.Builder + createGoogleAdsLinkSettings() { + return createGoogleAdsLinkSettings; + } + + /** Returns the builder for the settings used for calls to updateGoogleAdsLink. */ + public UnaryCallSettings.Builder + updateGoogleAdsLinkSettings() { + return updateGoogleAdsLinkSettings; + } + + /** Returns the builder for the settings used for calls to deleteGoogleAdsLink. */ + public UnaryCallSettings.Builder + deleteGoogleAdsLinkSettings() { + return deleteGoogleAdsLinkSettings; + } + + /** Returns the builder for the settings used for calls to listGoogleAdsLinks. */ + public PagedCallSettings.Builder< + ListGoogleAdsLinksRequest, ListGoogleAdsLinksResponse, ListGoogleAdsLinksPagedResponse> + listGoogleAdsLinksSettings() { + return listGoogleAdsLinksSettings; + } + + /** Returns the builder for the settings used for calls to getDataSharingSettings. */ + public UnaryCallSettings.Builder + getDataSharingSettingsSettings() { + return getDataSharingSettingsSettings; + } + + /** Returns the builder for the settings used for calls to getMeasurementProtocolSecret. */ + public UnaryCallSettings.Builder + getMeasurementProtocolSecretSettings() { + return getMeasurementProtocolSecretSettings; + } + + /** Returns the builder for the settings used for calls to listMeasurementProtocolSecrets. */ + public PagedCallSettings.Builder< + ListMeasurementProtocolSecretsRequest, + ListMeasurementProtocolSecretsResponse, + ListMeasurementProtocolSecretsPagedResponse> + listMeasurementProtocolSecretsSettings() { + return listMeasurementProtocolSecretsSettings; + } + + /** Returns the builder for the settings used for calls to createMeasurementProtocolSecret. */ + public UnaryCallSettings.Builder< + CreateMeasurementProtocolSecretRequest, MeasurementProtocolSecret> + createMeasurementProtocolSecretSettings() { + return createMeasurementProtocolSecretSettings; + } + + /** Returns the builder for the settings used for calls to deleteMeasurementProtocolSecret. */ + public UnaryCallSettings.Builder + deleteMeasurementProtocolSecretSettings() { + return deleteMeasurementProtocolSecretSettings; + } + + /** Returns the builder for the settings used for calls to updateMeasurementProtocolSecret. */ + public UnaryCallSettings.Builder< + UpdateMeasurementProtocolSecretRequest, MeasurementProtocolSecret> + updateMeasurementProtocolSecretSettings() { + return updateMeasurementProtocolSecretSettings; + } + + /** Returns the builder for the settings used for calls to acknowledgeUserDataCollection. */ + public UnaryCallSettings.Builder< + AcknowledgeUserDataCollectionRequest, AcknowledgeUserDataCollectionResponse> + acknowledgeUserDataCollectionSettings() { + return acknowledgeUserDataCollectionSettings; + } + + /** Returns the builder for the settings used for calls to searchChangeHistoryEvents. */ + public PagedCallSettings.Builder< + SearchChangeHistoryEventsRequest, + SearchChangeHistoryEventsResponse, + SearchChangeHistoryEventsPagedResponse> + searchChangeHistoryEventsSettings() { + return searchChangeHistoryEventsSettings; + } + + /** Returns the builder for the settings used for calls to createConversionEvent. */ + public UnaryCallSettings.Builder + createConversionEventSettings() { + return createConversionEventSettings; + } + + /** Returns the builder for the settings used for calls to getConversionEvent. */ + public UnaryCallSettings.Builder + getConversionEventSettings() { + return getConversionEventSettings; + } + + /** Returns the builder for the settings used for calls to deleteConversionEvent. */ + public UnaryCallSettings.Builder + deleteConversionEventSettings() { + return deleteConversionEventSettings; + } + + /** Returns the builder for the settings used for calls to listConversionEvents. */ + public PagedCallSettings.Builder< + ListConversionEventsRequest, + ListConversionEventsResponse, + ListConversionEventsPagedResponse> + listConversionEventsSettings() { + return listConversionEventsSettings; + } + + /** Returns the builder for the settings used for calls to createCustomDimension. */ + public UnaryCallSettings.Builder + createCustomDimensionSettings() { + return createCustomDimensionSettings; + } + + /** Returns the builder for the settings used for calls to updateCustomDimension. */ + public UnaryCallSettings.Builder + updateCustomDimensionSettings() { + return updateCustomDimensionSettings; + } + + /** Returns the builder for the settings used for calls to listCustomDimensions. */ + public PagedCallSettings.Builder< + ListCustomDimensionsRequest, + ListCustomDimensionsResponse, + ListCustomDimensionsPagedResponse> + listCustomDimensionsSettings() { + return listCustomDimensionsSettings; + } + + /** Returns the builder for the settings used for calls to archiveCustomDimension. */ + public UnaryCallSettings.Builder + archiveCustomDimensionSettings() { + return archiveCustomDimensionSettings; + } + + /** Returns the builder for the settings used for calls to getCustomDimension. */ + public UnaryCallSettings.Builder + getCustomDimensionSettings() { + return getCustomDimensionSettings; + } + + /** Returns the builder for the settings used for calls to createCustomMetric. */ + public UnaryCallSettings.Builder + createCustomMetricSettings() { + return createCustomMetricSettings; + } + + /** Returns the builder for the settings used for calls to updateCustomMetric. */ + public UnaryCallSettings.Builder + updateCustomMetricSettings() { + return updateCustomMetricSettings; + } + + /** Returns the builder for the settings used for calls to listCustomMetrics. */ + public PagedCallSettings.Builder< + ListCustomMetricsRequest, ListCustomMetricsResponse, ListCustomMetricsPagedResponse> + listCustomMetricsSettings() { + return listCustomMetricsSettings; + } + + /** Returns the builder for the settings used for calls to archiveCustomMetric. */ + public UnaryCallSettings.Builder + archiveCustomMetricSettings() { + return archiveCustomMetricSettings; + } + + /** Returns the builder for the settings used for calls to getCustomMetric. */ + public UnaryCallSettings.Builder + getCustomMetricSettings() { + return getCustomMetricSettings; + } + + /** Returns the builder for the settings used for calls to getDataRetentionSettings. */ + public UnaryCallSettings.Builder + getDataRetentionSettingsSettings() { + return getDataRetentionSettingsSettings; + } + + /** Returns the builder for the settings used for calls to updateDataRetentionSettings. */ + public UnaryCallSettings.Builder + updateDataRetentionSettingsSettings() { + return updateDataRetentionSettingsSettings; + } + + /** Returns the builder for the settings used for calls to createDataStream. */ + public UnaryCallSettings.Builder + createDataStreamSettings() { + return createDataStreamSettings; + } + + /** Returns the builder for the settings used for calls to deleteDataStream. */ + public UnaryCallSettings.Builder deleteDataStreamSettings() { + return deleteDataStreamSettings; + } + + /** Returns the builder for the settings used for calls to updateDataStream. */ + public UnaryCallSettings.Builder + updateDataStreamSettings() { + return updateDataStreamSettings; + } + + /** Returns the builder for the settings used for calls to listDataStreams. */ + public PagedCallSettings.Builder< + ListDataStreamsRequest, ListDataStreamsResponse, ListDataStreamsPagedResponse> + listDataStreamsSettings() { + return listDataStreamsSettings; + } + + /** Returns the builder for the settings used for calls to getDataStream. */ + public UnaryCallSettings.Builder getDataStreamSettings() { + return getDataStreamSettings; + } + + @Override + public AnalyticsAdminServiceStubSettings build() throws IOException { + return new AnalyticsAdminServiceStubSettings(this); + } + } +} diff --git a/java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1beta/stub/GrpcAnalyticsAdminServiceCallableFactory.java b/java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1beta/stub/GrpcAnalyticsAdminServiceCallableFactory.java new file mode 100644 index 000000000000..a852df0271d0 --- /dev/null +++ b/java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1beta/stub/GrpcAnalyticsAdminServiceCallableFactory.java @@ -0,0 +1,115 @@ +/* + * Copyright 2022 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.admin.v1beta.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the AnalyticsAdminService service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcAnalyticsAdminServiceCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1beta/stub/GrpcAnalyticsAdminServiceStub.java b/java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1beta/stub/GrpcAnalyticsAdminServiceStub.java new file mode 100644 index 000000000000..47f5763135cb --- /dev/null +++ b/java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1beta/stub/GrpcAnalyticsAdminServiceStub.java @@ -0,0 +1,1920 @@ +/* + * Copyright 2022 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.admin.v1beta.stub; + +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListAccountSummariesPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListAccountsPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListConversionEventsPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListCustomDimensionsPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListCustomMetricsPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListDataStreamsPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListFirebaseLinksPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListGoogleAdsLinksPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListMeasurementProtocolSecretsPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListPropertiesPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.SearchChangeHistoryEventsPagedResponse; + +import com.google.analytics.admin.v1beta.Account; +import com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest; +import com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse; +import com.google.analytics.admin.v1beta.ArchiveCustomDimensionRequest; +import com.google.analytics.admin.v1beta.ArchiveCustomMetricRequest; +import com.google.analytics.admin.v1beta.ConversionEvent; +import com.google.analytics.admin.v1beta.CreateConversionEventRequest; +import com.google.analytics.admin.v1beta.CreateCustomDimensionRequest; +import com.google.analytics.admin.v1beta.CreateCustomMetricRequest; +import com.google.analytics.admin.v1beta.CreateDataStreamRequest; +import com.google.analytics.admin.v1beta.CreateFirebaseLinkRequest; +import com.google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest; +import com.google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest; +import com.google.analytics.admin.v1beta.CreatePropertyRequest; +import com.google.analytics.admin.v1beta.CustomDimension; +import com.google.analytics.admin.v1beta.CustomMetric; +import com.google.analytics.admin.v1beta.DataRetentionSettings; +import com.google.analytics.admin.v1beta.DataSharingSettings; +import com.google.analytics.admin.v1beta.DataStream; +import com.google.analytics.admin.v1beta.DeleteAccountRequest; +import com.google.analytics.admin.v1beta.DeleteConversionEventRequest; +import com.google.analytics.admin.v1beta.DeleteDataStreamRequest; +import com.google.analytics.admin.v1beta.DeleteFirebaseLinkRequest; +import com.google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest; +import com.google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest; +import com.google.analytics.admin.v1beta.DeletePropertyRequest; +import com.google.analytics.admin.v1beta.FirebaseLink; +import com.google.analytics.admin.v1beta.GetAccountRequest; +import com.google.analytics.admin.v1beta.GetConversionEventRequest; +import com.google.analytics.admin.v1beta.GetCustomDimensionRequest; +import com.google.analytics.admin.v1beta.GetCustomMetricRequest; +import com.google.analytics.admin.v1beta.GetDataRetentionSettingsRequest; +import com.google.analytics.admin.v1beta.GetDataSharingSettingsRequest; +import com.google.analytics.admin.v1beta.GetDataStreamRequest; +import com.google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest; +import com.google.analytics.admin.v1beta.GetPropertyRequest; +import com.google.analytics.admin.v1beta.GoogleAdsLink; +import com.google.analytics.admin.v1beta.ListAccountSummariesRequest; +import com.google.analytics.admin.v1beta.ListAccountSummariesResponse; +import com.google.analytics.admin.v1beta.ListAccountsRequest; +import com.google.analytics.admin.v1beta.ListAccountsResponse; +import com.google.analytics.admin.v1beta.ListConversionEventsRequest; +import com.google.analytics.admin.v1beta.ListConversionEventsResponse; +import com.google.analytics.admin.v1beta.ListCustomDimensionsRequest; +import com.google.analytics.admin.v1beta.ListCustomDimensionsResponse; +import com.google.analytics.admin.v1beta.ListCustomMetricsRequest; +import com.google.analytics.admin.v1beta.ListCustomMetricsResponse; +import com.google.analytics.admin.v1beta.ListDataStreamsRequest; +import com.google.analytics.admin.v1beta.ListDataStreamsResponse; +import com.google.analytics.admin.v1beta.ListFirebaseLinksRequest; +import com.google.analytics.admin.v1beta.ListFirebaseLinksResponse; +import com.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest; +import com.google.analytics.admin.v1beta.ListGoogleAdsLinksResponse; +import com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest; +import com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse; +import com.google.analytics.admin.v1beta.ListPropertiesRequest; +import com.google.analytics.admin.v1beta.ListPropertiesResponse; +import com.google.analytics.admin.v1beta.MeasurementProtocolSecret; +import com.google.analytics.admin.v1beta.Property; +import com.google.analytics.admin.v1beta.ProvisionAccountTicketRequest; +import com.google.analytics.admin.v1beta.ProvisionAccountTicketResponse; +import com.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest; +import com.google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse; +import com.google.analytics.admin.v1beta.UpdateAccountRequest; +import com.google.analytics.admin.v1beta.UpdateCustomDimensionRequest; +import com.google.analytics.admin.v1beta.UpdateCustomMetricRequest; +import com.google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest; +import com.google.analytics.admin.v1beta.UpdateDataStreamRequest; +import com.google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest; +import com.google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest; +import com.google.analytics.admin.v1beta.UpdatePropertyRequest; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the AnalyticsAdminService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub { + private static final MethodDescriptor getAccountMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.analytics.admin.v1beta.AnalyticsAdminService/GetAccount") + .setRequestMarshaller(ProtoUtils.marshaller(GetAccountRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Account.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listAccountsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.analytics.admin.v1beta.AnalyticsAdminService/ListAccounts") + .setRequestMarshaller(ProtoUtils.marshaller(ListAccountsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListAccountsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor deleteAccountMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.analytics.admin.v1beta.AnalyticsAdminService/DeleteAccount") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteAccountRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateAccountMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/UpdateAccount") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateAccountRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Account.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + ProvisionAccountTicketRequest, ProvisionAccountTicketResponse> + provisionAccountTicketMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/ProvisionAccountTicket") + .setRequestMarshaller( + ProtoUtils.marshaller(ProvisionAccountTicketRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ProvisionAccountTicketResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listAccountSummariesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/ListAccountSummaries") + .setRequestMarshaller( + ProtoUtils.marshaller(ListAccountSummariesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListAccountSummariesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getPropertyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.analytics.admin.v1beta.AnalyticsAdminService/GetProperty") + .setRequestMarshaller(ProtoUtils.marshaller(GetPropertyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Property.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listPropertiesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/ListProperties") + .setRequestMarshaller( + ProtoUtils.marshaller(ListPropertiesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListPropertiesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createPropertyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/CreateProperty") + .setRequestMarshaller( + ProtoUtils.marshaller(CreatePropertyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Property.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deletePropertyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/DeleteProperty") + .setRequestMarshaller( + ProtoUtils.marshaller(DeletePropertyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Property.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updatePropertyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/UpdateProperty") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdatePropertyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Property.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createFirebaseLinkMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/CreateFirebaseLink") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateFirebaseLinkRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(FirebaseLink.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteFirebaseLinkMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/DeleteFirebaseLink") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteFirebaseLinkRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listFirebaseLinksMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/ListFirebaseLinks") + .setRequestMarshaller( + ProtoUtils.marshaller(ListFirebaseLinksRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListFirebaseLinksResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createGoogleAdsLinkMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/CreateGoogleAdsLink") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateGoogleAdsLinkRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(GoogleAdsLink.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateGoogleAdsLinkMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/UpdateGoogleAdsLink") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateGoogleAdsLinkRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(GoogleAdsLink.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteGoogleAdsLinkMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/DeleteGoogleAdsLink") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteGoogleAdsLinkRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listGoogleAdsLinksMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/ListGoogleAdsLinks") + .setRequestMarshaller( + ProtoUtils.marshaller(ListGoogleAdsLinksRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListGoogleAdsLinksResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getDataSharingSettingsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/GetDataSharingSettings") + .setRequestMarshaller( + ProtoUtils.marshaller(GetDataSharingSettingsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(DataSharingSettings.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + GetMeasurementProtocolSecretRequest, MeasurementProtocolSecret> + getMeasurementProtocolSecretMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/GetMeasurementProtocolSecret") + .setRequestMarshaller( + ProtoUtils.marshaller(GetMeasurementProtocolSecretRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(MeasurementProtocolSecret.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + ListMeasurementProtocolSecretsRequest, ListMeasurementProtocolSecretsResponse> + listMeasurementProtocolSecretsMethodDescriptor = + MethodDescriptor + . + newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/ListMeasurementProtocolSecrets") + .setRequestMarshaller( + ProtoUtils.marshaller(ListMeasurementProtocolSecretsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller( + ListMeasurementProtocolSecretsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + CreateMeasurementProtocolSecretRequest, MeasurementProtocolSecret> + createMeasurementProtocolSecretMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/CreateMeasurementProtocolSecret") + .setRequestMarshaller( + ProtoUtils.marshaller( + CreateMeasurementProtocolSecretRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(MeasurementProtocolSecret.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteMeasurementProtocolSecretMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/DeleteMeasurementProtocolSecret") + .setRequestMarshaller( + ProtoUtils.marshaller( + DeleteMeasurementProtocolSecretRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + UpdateMeasurementProtocolSecretRequest, MeasurementProtocolSecret> + updateMeasurementProtocolSecretMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/UpdateMeasurementProtocolSecret") + .setRequestMarshaller( + ProtoUtils.marshaller( + UpdateMeasurementProtocolSecretRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(MeasurementProtocolSecret.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + AcknowledgeUserDataCollectionRequest, AcknowledgeUserDataCollectionResponse> + acknowledgeUserDataCollectionMethodDescriptor = + MethodDescriptor + . + newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/AcknowledgeUserDataCollection") + .setRequestMarshaller( + ProtoUtils.marshaller(AcknowledgeUserDataCollectionRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(AcknowledgeUserDataCollectionResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + SearchChangeHistoryEventsRequest, SearchChangeHistoryEventsResponse> + searchChangeHistoryEventsMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/SearchChangeHistoryEvents") + .setRequestMarshaller( + ProtoUtils.marshaller(SearchChangeHistoryEventsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(SearchChangeHistoryEventsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createConversionEventMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/CreateConversionEvent") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateConversionEventRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ConversionEvent.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getConversionEventMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/GetConversionEvent") + .setRequestMarshaller( + ProtoUtils.marshaller(GetConversionEventRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ConversionEvent.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteConversionEventMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/DeleteConversionEvent") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteConversionEventRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listConversionEventsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/ListConversionEvents") + .setRequestMarshaller( + ProtoUtils.marshaller(ListConversionEventsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListConversionEventsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createCustomDimensionMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/CreateCustomDimension") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateCustomDimensionRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(CustomDimension.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateCustomDimensionMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/UpdateCustomDimension") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateCustomDimensionRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(CustomDimension.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listCustomDimensionsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/ListCustomDimensions") + .setRequestMarshaller( + ProtoUtils.marshaller(ListCustomDimensionsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListCustomDimensionsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + archiveCustomDimensionMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/ArchiveCustomDimension") + .setRequestMarshaller( + ProtoUtils.marshaller(ArchiveCustomDimensionRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getCustomDimensionMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/GetCustomDimension") + .setRequestMarshaller( + ProtoUtils.marshaller(GetCustomDimensionRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(CustomDimension.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createCustomMetricMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/CreateCustomMetric") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateCustomMetricRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(CustomMetric.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateCustomMetricMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/UpdateCustomMetric") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateCustomMetricRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(CustomMetric.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listCustomMetricsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/ListCustomMetrics") + .setRequestMarshaller( + ProtoUtils.marshaller(ListCustomMetricsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListCustomMetricsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + archiveCustomMetricMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/ArchiveCustomMetric") + .setRequestMarshaller( + ProtoUtils.marshaller(ArchiveCustomMetricRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getCustomMetricMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/GetCustomMetric") + .setRequestMarshaller( + ProtoUtils.marshaller(GetCustomMetricRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(CustomMetric.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getDataRetentionSettingsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/GetDataRetentionSettings") + .setRequestMarshaller( + ProtoUtils.marshaller(GetDataRetentionSettingsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(DataRetentionSettings.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateDataRetentionSettingsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/UpdateDataRetentionSettings") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateDataRetentionSettingsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(DataRetentionSettings.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createDataStreamMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/CreateDataStream") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateDataStreamRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(DataStream.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteDataStreamMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/DeleteDataStream") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteDataStreamRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateDataStreamMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/UpdateDataStream") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateDataStreamRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(DataStream.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listDataStreamsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/ListDataStreams") + .setRequestMarshaller( + ProtoUtils.marshaller(ListDataStreamsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListDataStreamsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getDataStreamMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/GetDataStream") + .setRequestMarshaller( + ProtoUtils.marshaller(GetDataStreamRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(DataStream.getDefaultInstance())) + .build(); + + private final UnaryCallable getAccountCallable; + private final UnaryCallable listAccountsCallable; + private final UnaryCallable + listAccountsPagedCallable; + private final UnaryCallable deleteAccountCallable; + private final UnaryCallable updateAccountCallable; + private final UnaryCallable + provisionAccountTicketCallable; + private final UnaryCallable + listAccountSummariesCallable; + private final UnaryCallable + listAccountSummariesPagedCallable; + private final UnaryCallable getPropertyCallable; + private final UnaryCallable listPropertiesCallable; + private final UnaryCallable + listPropertiesPagedCallable; + private final UnaryCallable createPropertyCallable; + private final UnaryCallable deletePropertyCallable; + private final UnaryCallable updatePropertyCallable; + private final UnaryCallable createFirebaseLinkCallable; + private final UnaryCallable deleteFirebaseLinkCallable; + private final UnaryCallable + listFirebaseLinksCallable; + private final UnaryCallable + listFirebaseLinksPagedCallable; + private final UnaryCallable + createGoogleAdsLinkCallable; + private final UnaryCallable + updateGoogleAdsLinkCallable; + private final UnaryCallable deleteGoogleAdsLinkCallable; + private final UnaryCallable + listGoogleAdsLinksCallable; + private final UnaryCallable + listGoogleAdsLinksPagedCallable; + private final UnaryCallable + getDataSharingSettingsCallable; + private final UnaryCallable + getMeasurementProtocolSecretCallable; + private final UnaryCallable< + ListMeasurementProtocolSecretsRequest, ListMeasurementProtocolSecretsResponse> + listMeasurementProtocolSecretsCallable; + private final UnaryCallable< + ListMeasurementProtocolSecretsRequest, ListMeasurementProtocolSecretsPagedResponse> + listMeasurementProtocolSecretsPagedCallable; + private final UnaryCallable + createMeasurementProtocolSecretCallable; + private final UnaryCallable + deleteMeasurementProtocolSecretCallable; + private final UnaryCallable + updateMeasurementProtocolSecretCallable; + private final UnaryCallable< + AcknowledgeUserDataCollectionRequest, AcknowledgeUserDataCollectionResponse> + acknowledgeUserDataCollectionCallable; + private final UnaryCallable + searchChangeHistoryEventsCallable; + private final UnaryCallable< + SearchChangeHistoryEventsRequest, SearchChangeHistoryEventsPagedResponse> + searchChangeHistoryEventsPagedCallable; + private final UnaryCallable + createConversionEventCallable; + private final UnaryCallable + getConversionEventCallable; + private final UnaryCallable deleteConversionEventCallable; + private final UnaryCallable + listConversionEventsCallable; + private final UnaryCallable + listConversionEventsPagedCallable; + private final UnaryCallable + createCustomDimensionCallable; + private final UnaryCallable + updateCustomDimensionCallable; + private final UnaryCallable + listCustomDimensionsCallable; + private final UnaryCallable + listCustomDimensionsPagedCallable; + private final UnaryCallable archiveCustomDimensionCallable; + private final UnaryCallable + getCustomDimensionCallable; + private final UnaryCallable createCustomMetricCallable; + private final UnaryCallable updateCustomMetricCallable; + private final UnaryCallable + listCustomMetricsCallable; + private final UnaryCallable + listCustomMetricsPagedCallable; + private final UnaryCallable archiveCustomMetricCallable; + private final UnaryCallable getCustomMetricCallable; + private final UnaryCallable + getDataRetentionSettingsCallable; + private final UnaryCallable + updateDataRetentionSettingsCallable; + private final UnaryCallable createDataStreamCallable; + private final UnaryCallable deleteDataStreamCallable; + private final UnaryCallable updateDataStreamCallable; + private final UnaryCallable + listDataStreamsCallable; + private final UnaryCallable + listDataStreamsPagedCallable; + private final UnaryCallable getDataStreamCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcAnalyticsAdminServiceStub create( + AnalyticsAdminServiceStubSettings settings) throws IOException { + return new GrpcAnalyticsAdminServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcAnalyticsAdminServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcAnalyticsAdminServiceStub( + AnalyticsAdminServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcAnalyticsAdminServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcAnalyticsAdminServiceStub( + AnalyticsAdminServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcAnalyticsAdminServiceStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected GrpcAnalyticsAdminServiceStub( + AnalyticsAdminServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcAnalyticsAdminServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcAnalyticsAdminServiceStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected GrpcAnalyticsAdminServiceStub( + AnalyticsAdminServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings getAccountTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getAccountMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings listAccountsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listAccountsMethodDescriptor) + .build(); + GrpcCallSettings deleteAccountTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteAccountMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings updateAccountTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateAccountMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("account.name", String.valueOf(request.getAccount().getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + provisionAccountTicketTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(provisionAccountTicketMethodDescriptor) + .build(); + GrpcCallSettings + listAccountSummariesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listAccountSummariesMethodDescriptor) + .build(); + GrpcCallSettings getPropertyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getPropertyMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + listPropertiesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listPropertiesMethodDescriptor) + .build(); + GrpcCallSettings createPropertyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createPropertyMethodDescriptor) + .build(); + GrpcCallSettings deletePropertyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deletePropertyMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings updatePropertyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updatePropertyMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("property.name", String.valueOf(request.getProperty().getName())); + return params.build(); + }) + .build(); + GrpcCallSettings createFirebaseLinkTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createFirebaseLinkMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings deleteFirebaseLinkTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteFirebaseLinkMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + listFirebaseLinksTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listFirebaseLinksMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings + createGoogleAdsLinkTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createGoogleAdsLinkMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings + updateGoogleAdsLinkTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateGoogleAdsLinkMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "google_ads_link.name", + String.valueOf(request.getGoogleAdsLink().getName())); + return params.build(); + }) + .build(); + GrpcCallSettings deleteGoogleAdsLinkTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteGoogleAdsLinkMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + listGoogleAdsLinksTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listGoogleAdsLinksMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings + getDataSharingSettingsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getDataSharingSettingsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + getMeasurementProtocolSecretTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(getMeasurementProtocolSecretMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + listMeasurementProtocolSecretsTransportSettings = + GrpcCallSettings + . + newBuilder() + .setMethodDescriptor(listMeasurementProtocolSecretsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings + createMeasurementProtocolSecretTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(createMeasurementProtocolSecretMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings + deleteMeasurementProtocolSecretTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteMeasurementProtocolSecretMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + updateMeasurementProtocolSecretTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(updateMeasurementProtocolSecretMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "measurement_protocol_secret.name", + String.valueOf(request.getMeasurementProtocolSecret().getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + acknowledgeUserDataCollectionTransportSettings = + GrpcCallSettings + . + newBuilder() + .setMethodDescriptor(acknowledgeUserDataCollectionMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("property", String.valueOf(request.getProperty())); + return params.build(); + }) + .build(); + GrpcCallSettings + searchChangeHistoryEventsTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(searchChangeHistoryEventsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("account", String.valueOf(request.getAccount())); + return params.build(); + }) + .build(); + GrpcCallSettings + createConversionEventTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createConversionEventMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings + getConversionEventTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getConversionEventMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings deleteConversionEventTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteConversionEventMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + listConversionEventsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listConversionEventsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings + createCustomDimensionTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createCustomDimensionMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings + updateCustomDimensionTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateCustomDimensionMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "custom_dimension.name", + String.valueOf(request.getCustomDimension().getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + listCustomDimensionsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listCustomDimensionsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings archiveCustomDimensionTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(archiveCustomDimensionMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + getCustomDimensionTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getCustomDimensionMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings createCustomMetricTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createCustomMetricMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings updateCustomMetricTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateCustomMetricMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "custom_metric.name", String.valueOf(request.getCustomMetric().getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + listCustomMetricsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listCustomMetricsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings archiveCustomMetricTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(archiveCustomMetricMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings getCustomMetricTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getCustomMetricMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + getDataRetentionSettingsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getDataRetentionSettingsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + updateDataRetentionSettingsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateDataRetentionSettingsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "data_retention_settings.name", + String.valueOf(request.getDataRetentionSettings().getName())); + return params.build(); + }) + .build(); + GrpcCallSettings createDataStreamTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createDataStreamMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings deleteDataStreamTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteDataStreamMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings updateDataStreamTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateDataStreamMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("data_stream.name", String.valueOf(request.getDataStream().getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + listDataStreamsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listDataStreamsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings getDataStreamTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getDataStreamMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + + this.getAccountCallable = + callableFactory.createUnaryCallable( + getAccountTransportSettings, settings.getAccountSettings(), clientContext); + this.listAccountsCallable = + callableFactory.createUnaryCallable( + listAccountsTransportSettings, settings.listAccountsSettings(), clientContext); + this.listAccountsPagedCallable = + callableFactory.createPagedCallable( + listAccountsTransportSettings, settings.listAccountsSettings(), clientContext); + this.deleteAccountCallable = + callableFactory.createUnaryCallable( + deleteAccountTransportSettings, settings.deleteAccountSettings(), clientContext); + this.updateAccountCallable = + callableFactory.createUnaryCallable( + updateAccountTransportSettings, settings.updateAccountSettings(), clientContext); + this.provisionAccountTicketCallable = + callableFactory.createUnaryCallable( + provisionAccountTicketTransportSettings, + settings.provisionAccountTicketSettings(), + clientContext); + this.listAccountSummariesCallable = + callableFactory.createUnaryCallable( + listAccountSummariesTransportSettings, + settings.listAccountSummariesSettings(), + clientContext); + this.listAccountSummariesPagedCallable = + callableFactory.createPagedCallable( + listAccountSummariesTransportSettings, + settings.listAccountSummariesSettings(), + clientContext); + this.getPropertyCallable = + callableFactory.createUnaryCallable( + getPropertyTransportSettings, settings.getPropertySettings(), clientContext); + this.listPropertiesCallable = + callableFactory.createUnaryCallable( + listPropertiesTransportSettings, settings.listPropertiesSettings(), clientContext); + this.listPropertiesPagedCallable = + callableFactory.createPagedCallable( + listPropertiesTransportSettings, settings.listPropertiesSettings(), clientContext); + this.createPropertyCallable = + callableFactory.createUnaryCallable( + createPropertyTransportSettings, settings.createPropertySettings(), clientContext); + this.deletePropertyCallable = + callableFactory.createUnaryCallable( + deletePropertyTransportSettings, settings.deletePropertySettings(), clientContext); + this.updatePropertyCallable = + callableFactory.createUnaryCallable( + updatePropertyTransportSettings, settings.updatePropertySettings(), clientContext); + this.createFirebaseLinkCallable = + callableFactory.createUnaryCallable( + createFirebaseLinkTransportSettings, + settings.createFirebaseLinkSettings(), + clientContext); + this.deleteFirebaseLinkCallable = + callableFactory.createUnaryCallable( + deleteFirebaseLinkTransportSettings, + settings.deleteFirebaseLinkSettings(), + clientContext); + this.listFirebaseLinksCallable = + callableFactory.createUnaryCallable( + listFirebaseLinksTransportSettings, + settings.listFirebaseLinksSettings(), + clientContext); + this.listFirebaseLinksPagedCallable = + callableFactory.createPagedCallable( + listFirebaseLinksTransportSettings, + settings.listFirebaseLinksSettings(), + clientContext); + this.createGoogleAdsLinkCallable = + callableFactory.createUnaryCallable( + createGoogleAdsLinkTransportSettings, + settings.createGoogleAdsLinkSettings(), + clientContext); + this.updateGoogleAdsLinkCallable = + callableFactory.createUnaryCallable( + updateGoogleAdsLinkTransportSettings, + settings.updateGoogleAdsLinkSettings(), + clientContext); + this.deleteGoogleAdsLinkCallable = + callableFactory.createUnaryCallable( + deleteGoogleAdsLinkTransportSettings, + settings.deleteGoogleAdsLinkSettings(), + clientContext); + this.listGoogleAdsLinksCallable = + callableFactory.createUnaryCallable( + listGoogleAdsLinksTransportSettings, + settings.listGoogleAdsLinksSettings(), + clientContext); + this.listGoogleAdsLinksPagedCallable = + callableFactory.createPagedCallable( + listGoogleAdsLinksTransportSettings, + settings.listGoogleAdsLinksSettings(), + clientContext); + this.getDataSharingSettingsCallable = + callableFactory.createUnaryCallable( + getDataSharingSettingsTransportSettings, + settings.getDataSharingSettingsSettings(), + clientContext); + this.getMeasurementProtocolSecretCallable = + callableFactory.createUnaryCallable( + getMeasurementProtocolSecretTransportSettings, + settings.getMeasurementProtocolSecretSettings(), + clientContext); + this.listMeasurementProtocolSecretsCallable = + callableFactory.createUnaryCallable( + listMeasurementProtocolSecretsTransportSettings, + settings.listMeasurementProtocolSecretsSettings(), + clientContext); + this.listMeasurementProtocolSecretsPagedCallable = + callableFactory.createPagedCallable( + listMeasurementProtocolSecretsTransportSettings, + settings.listMeasurementProtocolSecretsSettings(), + clientContext); + this.createMeasurementProtocolSecretCallable = + callableFactory.createUnaryCallable( + createMeasurementProtocolSecretTransportSettings, + settings.createMeasurementProtocolSecretSettings(), + clientContext); + this.deleteMeasurementProtocolSecretCallable = + callableFactory.createUnaryCallable( + deleteMeasurementProtocolSecretTransportSettings, + settings.deleteMeasurementProtocolSecretSettings(), + clientContext); + this.updateMeasurementProtocolSecretCallable = + callableFactory.createUnaryCallable( + updateMeasurementProtocolSecretTransportSettings, + settings.updateMeasurementProtocolSecretSettings(), + clientContext); + this.acknowledgeUserDataCollectionCallable = + callableFactory.createUnaryCallable( + acknowledgeUserDataCollectionTransportSettings, + settings.acknowledgeUserDataCollectionSettings(), + clientContext); + this.searchChangeHistoryEventsCallable = + callableFactory.createUnaryCallable( + searchChangeHistoryEventsTransportSettings, + settings.searchChangeHistoryEventsSettings(), + clientContext); + this.searchChangeHistoryEventsPagedCallable = + callableFactory.createPagedCallable( + searchChangeHistoryEventsTransportSettings, + settings.searchChangeHistoryEventsSettings(), + clientContext); + this.createConversionEventCallable = + callableFactory.createUnaryCallable( + createConversionEventTransportSettings, + settings.createConversionEventSettings(), + clientContext); + this.getConversionEventCallable = + callableFactory.createUnaryCallable( + getConversionEventTransportSettings, + settings.getConversionEventSettings(), + clientContext); + this.deleteConversionEventCallable = + callableFactory.createUnaryCallable( + deleteConversionEventTransportSettings, + settings.deleteConversionEventSettings(), + clientContext); + this.listConversionEventsCallable = + callableFactory.createUnaryCallable( + listConversionEventsTransportSettings, + settings.listConversionEventsSettings(), + clientContext); + this.listConversionEventsPagedCallable = + callableFactory.createPagedCallable( + listConversionEventsTransportSettings, + settings.listConversionEventsSettings(), + clientContext); + this.createCustomDimensionCallable = + callableFactory.createUnaryCallable( + createCustomDimensionTransportSettings, + settings.createCustomDimensionSettings(), + clientContext); + this.updateCustomDimensionCallable = + callableFactory.createUnaryCallable( + updateCustomDimensionTransportSettings, + settings.updateCustomDimensionSettings(), + clientContext); + this.listCustomDimensionsCallable = + callableFactory.createUnaryCallable( + listCustomDimensionsTransportSettings, + settings.listCustomDimensionsSettings(), + clientContext); + this.listCustomDimensionsPagedCallable = + callableFactory.createPagedCallable( + listCustomDimensionsTransportSettings, + settings.listCustomDimensionsSettings(), + clientContext); + this.archiveCustomDimensionCallable = + callableFactory.createUnaryCallable( + archiveCustomDimensionTransportSettings, + settings.archiveCustomDimensionSettings(), + clientContext); + this.getCustomDimensionCallable = + callableFactory.createUnaryCallable( + getCustomDimensionTransportSettings, + settings.getCustomDimensionSettings(), + clientContext); + this.createCustomMetricCallable = + callableFactory.createUnaryCallable( + createCustomMetricTransportSettings, + settings.createCustomMetricSettings(), + clientContext); + this.updateCustomMetricCallable = + callableFactory.createUnaryCallable( + updateCustomMetricTransportSettings, + settings.updateCustomMetricSettings(), + clientContext); + this.listCustomMetricsCallable = + callableFactory.createUnaryCallable( + listCustomMetricsTransportSettings, + settings.listCustomMetricsSettings(), + clientContext); + this.listCustomMetricsPagedCallable = + callableFactory.createPagedCallable( + listCustomMetricsTransportSettings, + settings.listCustomMetricsSettings(), + clientContext); + this.archiveCustomMetricCallable = + callableFactory.createUnaryCallable( + archiveCustomMetricTransportSettings, + settings.archiveCustomMetricSettings(), + clientContext); + this.getCustomMetricCallable = + callableFactory.createUnaryCallable( + getCustomMetricTransportSettings, settings.getCustomMetricSettings(), clientContext); + this.getDataRetentionSettingsCallable = + callableFactory.createUnaryCallable( + getDataRetentionSettingsTransportSettings, + settings.getDataRetentionSettingsSettings(), + clientContext); + this.updateDataRetentionSettingsCallable = + callableFactory.createUnaryCallable( + updateDataRetentionSettingsTransportSettings, + settings.updateDataRetentionSettingsSettings(), + clientContext); + this.createDataStreamCallable = + callableFactory.createUnaryCallable( + createDataStreamTransportSettings, settings.createDataStreamSettings(), clientContext); + this.deleteDataStreamCallable = + callableFactory.createUnaryCallable( + deleteDataStreamTransportSettings, settings.deleteDataStreamSettings(), clientContext); + this.updateDataStreamCallable = + callableFactory.createUnaryCallable( + updateDataStreamTransportSettings, settings.updateDataStreamSettings(), clientContext); + this.listDataStreamsCallable = + callableFactory.createUnaryCallable( + listDataStreamsTransportSettings, settings.listDataStreamsSettings(), clientContext); + this.listDataStreamsPagedCallable = + callableFactory.createPagedCallable( + listDataStreamsTransportSettings, settings.listDataStreamsSettings(), clientContext); + this.getDataStreamCallable = + callableFactory.createUnaryCallable( + getDataStreamTransportSettings, settings.getDataStreamSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable getAccountCallable() { + return getAccountCallable; + } + + @Override + public UnaryCallable listAccountsCallable() { + return listAccountsCallable; + } + + @Override + public UnaryCallable listAccountsPagedCallable() { + return listAccountsPagedCallable; + } + + @Override + public UnaryCallable deleteAccountCallable() { + return deleteAccountCallable; + } + + @Override + public UnaryCallable updateAccountCallable() { + return updateAccountCallable; + } + + @Override + public UnaryCallable + provisionAccountTicketCallable() { + return provisionAccountTicketCallable; + } + + @Override + public UnaryCallable + listAccountSummariesCallable() { + return listAccountSummariesCallable; + } + + @Override + public UnaryCallable + listAccountSummariesPagedCallable() { + return listAccountSummariesPagedCallable; + } + + @Override + public UnaryCallable getPropertyCallable() { + return getPropertyCallable; + } + + @Override + public UnaryCallable listPropertiesCallable() { + return listPropertiesCallable; + } + + @Override + public UnaryCallable + listPropertiesPagedCallable() { + return listPropertiesPagedCallable; + } + + @Override + public UnaryCallable createPropertyCallable() { + return createPropertyCallable; + } + + @Override + public UnaryCallable deletePropertyCallable() { + return deletePropertyCallable; + } + + @Override + public UnaryCallable updatePropertyCallable() { + return updatePropertyCallable; + } + + @Override + public UnaryCallable createFirebaseLinkCallable() { + return createFirebaseLinkCallable; + } + + @Override + public UnaryCallable deleteFirebaseLinkCallable() { + return deleteFirebaseLinkCallable; + } + + @Override + public UnaryCallable + listFirebaseLinksCallable() { + return listFirebaseLinksCallable; + } + + @Override + public UnaryCallable + listFirebaseLinksPagedCallable() { + return listFirebaseLinksPagedCallable; + } + + @Override + public UnaryCallable createGoogleAdsLinkCallable() { + return createGoogleAdsLinkCallable; + } + + @Override + public UnaryCallable updateGoogleAdsLinkCallable() { + return updateGoogleAdsLinkCallable; + } + + @Override + public UnaryCallable deleteGoogleAdsLinkCallable() { + return deleteGoogleAdsLinkCallable; + } + + @Override + public UnaryCallable + listGoogleAdsLinksCallable() { + return listGoogleAdsLinksCallable; + } + + @Override + public UnaryCallable + listGoogleAdsLinksPagedCallable() { + return listGoogleAdsLinksPagedCallable; + } + + @Override + public UnaryCallable + getDataSharingSettingsCallable() { + return getDataSharingSettingsCallable; + } + + @Override + public UnaryCallable + getMeasurementProtocolSecretCallable() { + return getMeasurementProtocolSecretCallable; + } + + @Override + public UnaryCallable< + ListMeasurementProtocolSecretsRequest, ListMeasurementProtocolSecretsResponse> + listMeasurementProtocolSecretsCallable() { + return listMeasurementProtocolSecretsCallable; + } + + @Override + public UnaryCallable< + ListMeasurementProtocolSecretsRequest, ListMeasurementProtocolSecretsPagedResponse> + listMeasurementProtocolSecretsPagedCallable() { + return listMeasurementProtocolSecretsPagedCallable; + } + + @Override + public UnaryCallable + createMeasurementProtocolSecretCallable() { + return createMeasurementProtocolSecretCallable; + } + + @Override + public UnaryCallable + deleteMeasurementProtocolSecretCallable() { + return deleteMeasurementProtocolSecretCallable; + } + + @Override + public UnaryCallable + updateMeasurementProtocolSecretCallable() { + return updateMeasurementProtocolSecretCallable; + } + + @Override + public UnaryCallable + acknowledgeUserDataCollectionCallable() { + return acknowledgeUserDataCollectionCallable; + } + + @Override + public UnaryCallable + searchChangeHistoryEventsCallable() { + return searchChangeHistoryEventsCallable; + } + + @Override + public UnaryCallable + searchChangeHistoryEventsPagedCallable() { + return searchChangeHistoryEventsPagedCallable; + } + + @Override + public UnaryCallable + createConversionEventCallable() { + return createConversionEventCallable; + } + + @Override + public UnaryCallable getConversionEventCallable() { + return getConversionEventCallable; + } + + @Override + public UnaryCallable deleteConversionEventCallable() { + return deleteConversionEventCallable; + } + + @Override + public UnaryCallable + listConversionEventsCallable() { + return listConversionEventsCallable; + } + + @Override + public UnaryCallable + listConversionEventsPagedCallable() { + return listConversionEventsPagedCallable; + } + + @Override + public UnaryCallable + createCustomDimensionCallable() { + return createCustomDimensionCallable; + } + + @Override + public UnaryCallable + updateCustomDimensionCallable() { + return updateCustomDimensionCallable; + } + + @Override + public UnaryCallable + listCustomDimensionsCallable() { + return listCustomDimensionsCallable; + } + + @Override + public UnaryCallable + listCustomDimensionsPagedCallable() { + return listCustomDimensionsPagedCallable; + } + + @Override + public UnaryCallable archiveCustomDimensionCallable() { + return archiveCustomDimensionCallable; + } + + @Override + public UnaryCallable getCustomDimensionCallable() { + return getCustomDimensionCallable; + } + + @Override + public UnaryCallable createCustomMetricCallable() { + return createCustomMetricCallable; + } + + @Override + public UnaryCallable updateCustomMetricCallable() { + return updateCustomMetricCallable; + } + + @Override + public UnaryCallable + listCustomMetricsCallable() { + return listCustomMetricsCallable; + } + + @Override + public UnaryCallable + listCustomMetricsPagedCallable() { + return listCustomMetricsPagedCallable; + } + + @Override + public UnaryCallable archiveCustomMetricCallable() { + return archiveCustomMetricCallable; + } + + @Override + public UnaryCallable getCustomMetricCallable() { + return getCustomMetricCallable; + } + + @Override + public UnaryCallable + getDataRetentionSettingsCallable() { + return getDataRetentionSettingsCallable; + } + + @Override + public UnaryCallable + updateDataRetentionSettingsCallable() { + return updateDataRetentionSettingsCallable; + } + + @Override + public UnaryCallable createDataStreamCallable() { + return createDataStreamCallable; + } + + @Override + public UnaryCallable deleteDataStreamCallable() { + return deleteDataStreamCallable; + } + + @Override + public UnaryCallable updateDataStreamCallable() { + return updateDataStreamCallable; + } + + @Override + public UnaryCallable listDataStreamsCallable() { + return listDataStreamsCallable; + } + + @Override + public UnaryCallable + listDataStreamsPagedCallable() { + return listDataStreamsPagedCallable; + } + + @Override + public UnaryCallable getDataStreamCallable() { + return getDataStreamCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1beta/stub/HttpJsonAnalyticsAdminServiceCallableFactory.java b/java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1beta/stub/HttpJsonAnalyticsAdminServiceCallableFactory.java new file mode 100644 index 000000000000..b4534a4d6322 --- /dev/null +++ b/java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1beta/stub/HttpJsonAnalyticsAdminServiceCallableFactory.java @@ -0,0 +1,105 @@ +/* + * Copyright 2022 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.admin.v1beta.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the AnalyticsAdminService service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonAnalyticsAdminServiceCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1beta/stub/HttpJsonAnalyticsAdminServiceStub.java b/java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1beta/stub/HttpJsonAnalyticsAdminServiceStub.java new file mode 100644 index 000000000000..eda3b4565abd --- /dev/null +++ b/java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1beta/stub/HttpJsonAnalyticsAdminServiceStub.java @@ -0,0 +1,2958 @@ +/* + * Copyright 2022 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.admin.v1beta.stub; + +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListAccountSummariesPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListAccountsPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListConversionEventsPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListCustomDimensionsPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListCustomMetricsPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListDataStreamsPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListFirebaseLinksPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListGoogleAdsLinksPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListMeasurementProtocolSecretsPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListPropertiesPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.SearchChangeHistoryEventsPagedResponse; + +import com.google.analytics.admin.v1beta.Account; +import com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest; +import com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse; +import com.google.analytics.admin.v1beta.ArchiveCustomDimensionRequest; +import com.google.analytics.admin.v1beta.ArchiveCustomMetricRequest; +import com.google.analytics.admin.v1beta.ConversionEvent; +import com.google.analytics.admin.v1beta.CreateConversionEventRequest; +import com.google.analytics.admin.v1beta.CreateCustomDimensionRequest; +import com.google.analytics.admin.v1beta.CreateCustomMetricRequest; +import com.google.analytics.admin.v1beta.CreateDataStreamRequest; +import com.google.analytics.admin.v1beta.CreateFirebaseLinkRequest; +import com.google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest; +import com.google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest; +import com.google.analytics.admin.v1beta.CreatePropertyRequest; +import com.google.analytics.admin.v1beta.CustomDimension; +import com.google.analytics.admin.v1beta.CustomMetric; +import com.google.analytics.admin.v1beta.DataRetentionSettings; +import com.google.analytics.admin.v1beta.DataSharingSettings; +import com.google.analytics.admin.v1beta.DataStream; +import com.google.analytics.admin.v1beta.DeleteAccountRequest; +import com.google.analytics.admin.v1beta.DeleteConversionEventRequest; +import com.google.analytics.admin.v1beta.DeleteDataStreamRequest; +import com.google.analytics.admin.v1beta.DeleteFirebaseLinkRequest; +import com.google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest; +import com.google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest; +import com.google.analytics.admin.v1beta.DeletePropertyRequest; +import com.google.analytics.admin.v1beta.FirebaseLink; +import com.google.analytics.admin.v1beta.GetAccountRequest; +import com.google.analytics.admin.v1beta.GetConversionEventRequest; +import com.google.analytics.admin.v1beta.GetCustomDimensionRequest; +import com.google.analytics.admin.v1beta.GetCustomMetricRequest; +import com.google.analytics.admin.v1beta.GetDataRetentionSettingsRequest; +import com.google.analytics.admin.v1beta.GetDataSharingSettingsRequest; +import com.google.analytics.admin.v1beta.GetDataStreamRequest; +import com.google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest; +import com.google.analytics.admin.v1beta.GetPropertyRequest; +import com.google.analytics.admin.v1beta.GoogleAdsLink; +import com.google.analytics.admin.v1beta.ListAccountSummariesRequest; +import com.google.analytics.admin.v1beta.ListAccountSummariesResponse; +import com.google.analytics.admin.v1beta.ListAccountsRequest; +import com.google.analytics.admin.v1beta.ListAccountsResponse; +import com.google.analytics.admin.v1beta.ListConversionEventsRequest; +import com.google.analytics.admin.v1beta.ListConversionEventsResponse; +import com.google.analytics.admin.v1beta.ListCustomDimensionsRequest; +import com.google.analytics.admin.v1beta.ListCustomDimensionsResponse; +import com.google.analytics.admin.v1beta.ListCustomMetricsRequest; +import com.google.analytics.admin.v1beta.ListCustomMetricsResponse; +import com.google.analytics.admin.v1beta.ListDataStreamsRequest; +import com.google.analytics.admin.v1beta.ListDataStreamsResponse; +import com.google.analytics.admin.v1beta.ListFirebaseLinksRequest; +import com.google.analytics.admin.v1beta.ListFirebaseLinksResponse; +import com.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest; +import com.google.analytics.admin.v1beta.ListGoogleAdsLinksResponse; +import com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest; +import com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse; +import com.google.analytics.admin.v1beta.ListPropertiesRequest; +import com.google.analytics.admin.v1beta.ListPropertiesResponse; +import com.google.analytics.admin.v1beta.MeasurementProtocolSecret; +import com.google.analytics.admin.v1beta.Property; +import com.google.analytics.admin.v1beta.ProvisionAccountTicketRequest; +import com.google.analytics.admin.v1beta.ProvisionAccountTicketResponse; +import com.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest; +import com.google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse; +import com.google.analytics.admin.v1beta.UpdateAccountRequest; +import com.google.analytics.admin.v1beta.UpdateCustomDimensionRequest; +import com.google.analytics.admin.v1beta.UpdateCustomMetricRequest; +import com.google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest; +import com.google.analytics.admin.v1beta.UpdateDataStreamRequest; +import com.google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest; +import com.google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest; +import com.google.analytics.admin.v1beta.UpdatePropertyRequest; +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.protobuf.Empty; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the AnalyticsAdminService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub { + private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); + + private static final ApiMethodDescriptor getAccountMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.analytics.admin.v1beta.AnalyticsAdminService/GetAccount") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{name=accounts/*}", + 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(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Account.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listAccountsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.analytics.admin.v1beta.AnalyticsAdminService/ListAccounts") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/accounts", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + 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, "showDeleted", request.getShowDeleted()); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListAccountsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteAccountMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/DeleteAccount") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{name=accounts/*}", + 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(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateAccountMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/UpdateAccount") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{account.name=accounts/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "account.name", request.getAccount().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create().toBody("account", request.getAccount())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Account.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + ProvisionAccountTicketRequest, ProvisionAccountTicketResponse> + provisionAccountTicketMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/ProvisionAccountTicket") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/accounts:provisionAccountTicket", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create().toBody("*", request.toBuilder().build())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ProvisionAccountTicketResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + ListAccountSummariesRequest, ListAccountSummariesResponse> + listAccountSummariesMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/ListAccountSummaries") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/accountSummaries", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListAccountSummariesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getPropertyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.analytics.admin.v1beta.AnalyticsAdminService/GetProperty") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{name=properties/*}", + 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(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Property.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listPropertiesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/ListProperties") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/properties", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam( + fields, "showDeleted", request.getShowDeleted()); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListPropertiesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createPropertyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/CreateProperty") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/properties", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("property", request.getProperty())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Property.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deletePropertyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/DeleteProperty") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{name=properties/*}", + 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(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Property.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updatePropertyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/UpdateProperty") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{property.name=properties/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "property.name", request.getProperty().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("property", request.getProperty())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Property.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createFirebaseLinkMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/CreateFirebaseLink") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{parent=properties/*}/firebaseLinks", + 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(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("firebaseLink", request.getFirebaseLink())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(FirebaseLink.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteFirebaseLinkMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/DeleteFirebaseLink") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{name=properties/*/firebaseLinks/*}", + 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(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listFirebaseLinksMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/ListFirebaseLinks") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{parent=properties/*}/firebaseLinks", + 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()); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListFirebaseLinksResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createGoogleAdsLinkMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/CreateGoogleAdsLink") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{parent=properties/*}/googleAdsLinks", + 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(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("googleAdsLink", request.getGoogleAdsLink())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(GoogleAdsLink.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateGoogleAdsLinkMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/UpdateGoogleAdsLink") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{googleAdsLink.name=properties/*/googleAdsLinks/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "googleAdsLink.name", request.getGoogleAdsLink().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("googleAdsLink", request.getGoogleAdsLink())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(GoogleAdsLink.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteGoogleAdsLinkMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/DeleteGoogleAdsLink") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{name=properties/*/googleAdsLinks/*}", + 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(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listGoogleAdsLinksMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/ListGoogleAdsLinks") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{parent=properties/*}/googleAdsLinks", + 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()); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListGoogleAdsLinksResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getDataSharingSettingsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/GetDataSharingSettings") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{name=accounts/*/dataSharingSettings}", + 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(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(DataSharingSettings.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + GetMeasurementProtocolSecretRequest, MeasurementProtocolSecret> + getMeasurementProtocolSecretMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/GetMeasurementProtocolSecret") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{name=properties/*/dataStreams/*/measurementProtocolSecrets/*}", + 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(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(MeasurementProtocolSecret.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + ListMeasurementProtocolSecretsRequest, ListMeasurementProtocolSecretsResponse> + listMeasurementProtocolSecretsMethodDescriptor = + ApiMethodDescriptor + . + newBuilder() + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/ListMeasurementProtocolSecrets") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{parent=properties/*/dataStreams/*}/measurementProtocolSecrets", + 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()); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance( + ListMeasurementProtocolSecretsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + CreateMeasurementProtocolSecretRequest, MeasurementProtocolSecret> + createMeasurementProtocolSecretMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/CreateMeasurementProtocolSecret") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{parent=properties/*/dataStreams/*}/measurementProtocolSecrets", + 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(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody( + "measurementProtocolSecret", + request.getMeasurementProtocolSecret())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(MeasurementProtocolSecret.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteMeasurementProtocolSecretMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/DeleteMeasurementProtocolSecret") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{name=properties/*/dataStreams/*/measurementProtocolSecrets/*}", + 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(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + UpdateMeasurementProtocolSecretRequest, MeasurementProtocolSecret> + updateMeasurementProtocolSecretMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/UpdateMeasurementProtocolSecret") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{measurementProtocolSecret.name=properties/*/dataStreams/*/measurementProtocolSecrets/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, + "measurementProtocolSecret.name", + request.getMeasurementProtocolSecret().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody( + "measurementProtocolSecret", + request.getMeasurementProtocolSecret())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(MeasurementProtocolSecret.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + AcknowledgeUserDataCollectionRequest, AcknowledgeUserDataCollectionResponse> + acknowledgeUserDataCollectionMethodDescriptor = + ApiMethodDescriptor + . + newBuilder() + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/AcknowledgeUserDataCollection") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{property=properties/*}:acknowledgeUserDataCollection", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "property", request.getProperty()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearProperty().build())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance( + AcknowledgeUserDataCollectionResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + SearchChangeHistoryEventsRequest, SearchChangeHistoryEventsResponse> + searchChangeHistoryEventsMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/SearchChangeHistoryEvents") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{account=accounts/*}:searchChangeHistoryEvents", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "account", request.getAccount()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearAccount().build())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(SearchChangeHistoryEventsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createConversionEventMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/CreateConversionEvent") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{parent=properties/*}/conversionEvents", + 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(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("conversionEvent", request.getConversionEvent())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ConversionEvent.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getConversionEventMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/GetConversionEvent") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{name=properties/*/conversionEvents/*}", + 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(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ConversionEvent.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteConversionEventMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/DeleteConversionEvent") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{name=properties/*/conversionEvents/*}", + 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(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + ListConversionEventsRequest, ListConversionEventsResponse> + listConversionEventsMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/ListConversionEvents") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{parent=properties/*}/conversionEvents", + 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()); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListConversionEventsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createCustomDimensionMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/CreateCustomDimension") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{parent=properties/*}/customDimensions", + 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(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("customDimension", request.getCustomDimension())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(CustomDimension.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateCustomDimensionMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/UpdateCustomDimension") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{customDimension.name=properties/*/customDimensions/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, + "customDimension.name", + request.getCustomDimension().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("customDimension", request.getCustomDimension())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(CustomDimension.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + ListCustomDimensionsRequest, ListCustomDimensionsResponse> + listCustomDimensionsMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/ListCustomDimensions") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{parent=properties/*}/customDimensions", + 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()); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListCustomDimensionsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + archiveCustomDimensionMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/ArchiveCustomDimension") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{name=properties/*/customDimensions/*}:archive", + 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(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getCustomDimensionMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/GetCustomDimension") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{name=properties/*/customDimensions/*}", + 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(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(CustomDimension.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createCustomMetricMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/CreateCustomMetric") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{parent=properties/*}/customMetrics", + 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(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("customMetric", request.getCustomMetric())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(CustomMetric.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateCustomMetricMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/UpdateCustomMetric") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{customMetric.name=properties/*/customMetrics/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "customMetric.name", request.getCustomMetric().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("customMetric", request.getCustomMetric())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(CustomMetric.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listCustomMetricsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/ListCustomMetrics") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{parent=properties/*}/customMetrics", + 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()); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListCustomMetricsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + archiveCustomMetricMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/ArchiveCustomMetric") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{name=properties/*/customMetrics/*}:archive", + 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(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getCustomMetricMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/GetCustomMetric") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{name=properties/*/customMetrics/*}", + 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(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(CustomMetric.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getDataRetentionSettingsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/GetDataRetentionSettings") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{name=properties/*/dataRetentionSettings}", + 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(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(DataRetentionSettings.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + UpdateDataRetentionSettingsRequest, DataRetentionSettings> + updateDataRetentionSettingsMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/UpdateDataRetentionSettings") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{dataRetentionSettings.name=properties/*/dataRetentionSettings}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, + "dataRetentionSettings.name", + request.getDataRetentionSettings().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody( + "dataRetentionSettings", request.getDataRetentionSettings())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(DataRetentionSettings.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createDataStreamMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/CreateDataStream") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{parent=properties/*}/dataStreams", + 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(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("dataStream", request.getDataStream())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(DataStream.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteDataStreamMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/DeleteDataStream") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{name=properties/*/dataStreams/*}", + 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(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateDataStreamMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/UpdateDataStream") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{dataStream.name=properties/*/dataStreams/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "dataStream.name", request.getDataStream().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("dataStream", request.getDataStream())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(DataStream.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listDataStreamsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/ListDataStreams") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{parent=properties/*}/dataStreams", + 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()); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListDataStreamsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getDataStreamMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.analytics.admin.v1beta.AnalyticsAdminService/GetDataStream") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{name=properties/*/dataStreams/*}", + 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(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(DataStream.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable getAccountCallable; + private final UnaryCallable listAccountsCallable; + private final UnaryCallable + listAccountsPagedCallable; + private final UnaryCallable deleteAccountCallable; + private final UnaryCallable updateAccountCallable; + private final UnaryCallable + provisionAccountTicketCallable; + private final UnaryCallable + listAccountSummariesCallable; + private final UnaryCallable + listAccountSummariesPagedCallable; + private final UnaryCallable getPropertyCallable; + private final UnaryCallable listPropertiesCallable; + private final UnaryCallable + listPropertiesPagedCallable; + private final UnaryCallable createPropertyCallable; + private final UnaryCallable deletePropertyCallable; + private final UnaryCallable updatePropertyCallable; + private final UnaryCallable createFirebaseLinkCallable; + private final UnaryCallable deleteFirebaseLinkCallable; + private final UnaryCallable + listFirebaseLinksCallable; + private final UnaryCallable + listFirebaseLinksPagedCallable; + private final UnaryCallable + createGoogleAdsLinkCallable; + private final UnaryCallable + updateGoogleAdsLinkCallable; + private final UnaryCallable deleteGoogleAdsLinkCallable; + private final UnaryCallable + listGoogleAdsLinksCallable; + private final UnaryCallable + listGoogleAdsLinksPagedCallable; + private final UnaryCallable + getDataSharingSettingsCallable; + private final UnaryCallable + getMeasurementProtocolSecretCallable; + private final UnaryCallable< + ListMeasurementProtocolSecretsRequest, ListMeasurementProtocolSecretsResponse> + listMeasurementProtocolSecretsCallable; + private final UnaryCallable< + ListMeasurementProtocolSecretsRequest, ListMeasurementProtocolSecretsPagedResponse> + listMeasurementProtocolSecretsPagedCallable; + private final UnaryCallable + createMeasurementProtocolSecretCallable; + private final UnaryCallable + deleteMeasurementProtocolSecretCallable; + private final UnaryCallable + updateMeasurementProtocolSecretCallable; + private final UnaryCallable< + AcknowledgeUserDataCollectionRequest, AcknowledgeUserDataCollectionResponse> + acknowledgeUserDataCollectionCallable; + private final UnaryCallable + searchChangeHistoryEventsCallable; + private final UnaryCallable< + SearchChangeHistoryEventsRequest, SearchChangeHistoryEventsPagedResponse> + searchChangeHistoryEventsPagedCallable; + private final UnaryCallable + createConversionEventCallable; + private final UnaryCallable + getConversionEventCallable; + private final UnaryCallable deleteConversionEventCallable; + private final UnaryCallable + listConversionEventsCallable; + private final UnaryCallable + listConversionEventsPagedCallable; + private final UnaryCallable + createCustomDimensionCallable; + private final UnaryCallable + updateCustomDimensionCallable; + private final UnaryCallable + listCustomDimensionsCallable; + private final UnaryCallable + listCustomDimensionsPagedCallable; + private final UnaryCallable archiveCustomDimensionCallable; + private final UnaryCallable + getCustomDimensionCallable; + private final UnaryCallable createCustomMetricCallable; + private final UnaryCallable updateCustomMetricCallable; + private final UnaryCallable + listCustomMetricsCallable; + private final UnaryCallable + listCustomMetricsPagedCallable; + private final UnaryCallable archiveCustomMetricCallable; + private final UnaryCallable getCustomMetricCallable; + private final UnaryCallable + getDataRetentionSettingsCallable; + private final UnaryCallable + updateDataRetentionSettingsCallable; + private final UnaryCallable createDataStreamCallable; + private final UnaryCallable deleteDataStreamCallable; + private final UnaryCallable updateDataStreamCallable; + private final UnaryCallable + listDataStreamsCallable; + private final UnaryCallable + listDataStreamsPagedCallable; + private final UnaryCallable getDataStreamCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonAnalyticsAdminServiceStub create( + AnalyticsAdminServiceStubSettings settings) throws IOException { + return new HttpJsonAnalyticsAdminServiceStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonAnalyticsAdminServiceStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonAnalyticsAdminServiceStub( + AnalyticsAdminServiceStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonAnalyticsAdminServiceStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonAnalyticsAdminServiceStub( + AnalyticsAdminServiceStubSettings.newHttpJsonBuilder().build(), + clientContext, + callableFactory); + } + + /** + * Constructs an instance of HttpJsonAnalyticsAdminServiceStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonAnalyticsAdminServiceStub( + AnalyticsAdminServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonAnalyticsAdminServiceCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonAnalyticsAdminServiceStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonAnalyticsAdminServiceStub( + AnalyticsAdminServiceStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + HttpJsonCallSettings getAccountTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getAccountMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings listAccountsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listAccountsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings deleteAccountTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteAccountMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings updateAccountTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateAccountMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + provisionAccountTicketTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(provisionAccountTicketMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + listAccountSummariesTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(listAccountSummariesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getPropertyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getPropertyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + listPropertiesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listPropertiesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings createPropertyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createPropertyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings deletePropertyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deletePropertyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings updatePropertyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updatePropertyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + createFirebaseLinkTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createFirebaseLinkMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings deleteFirebaseLinkTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteFirebaseLinkMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + listFirebaseLinksTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listFirebaseLinksMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + createGoogleAdsLinkTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createGoogleAdsLinkMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + updateGoogleAdsLinkTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateGoogleAdsLinkMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings deleteGoogleAdsLinkTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteGoogleAdsLinkMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + listGoogleAdsLinksTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listGoogleAdsLinksMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + getDataSharingSettingsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getDataSharingSettingsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + getMeasurementProtocolSecretTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(getMeasurementProtocolSecretMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings< + ListMeasurementProtocolSecretsRequest, ListMeasurementProtocolSecretsResponse> + listMeasurementProtocolSecretsTransportSettings = + HttpJsonCallSettings + . + newBuilder() + .setMethodDescriptor(listMeasurementProtocolSecretsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + createMeasurementProtocolSecretTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(createMeasurementProtocolSecretMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + deleteMeasurementProtocolSecretTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteMeasurementProtocolSecretMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + updateMeasurementProtocolSecretTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(updateMeasurementProtocolSecretMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings< + AcknowledgeUserDataCollectionRequest, AcknowledgeUserDataCollectionResponse> + acknowledgeUserDataCollectionTransportSettings = + HttpJsonCallSettings + . + newBuilder() + .setMethodDescriptor(acknowledgeUserDataCollectionMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + searchChangeHistoryEventsTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(searchChangeHistoryEventsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + createConversionEventTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createConversionEventMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + getConversionEventTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getConversionEventMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + deleteConversionEventTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteConversionEventMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + listConversionEventsTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(listConversionEventsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + createCustomDimensionTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createCustomDimensionMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + updateCustomDimensionTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateCustomDimensionMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + listCustomDimensionsTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(listCustomDimensionsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + archiveCustomDimensionTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(archiveCustomDimensionMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + getCustomDimensionTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getCustomDimensionMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + createCustomMetricTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createCustomMetricMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + updateCustomMetricTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateCustomMetricMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + listCustomMetricsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listCustomMetricsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings archiveCustomMetricTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(archiveCustomMetricMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getCustomMetricTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getCustomMetricMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + getDataRetentionSettingsTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(getDataRetentionSettingsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + updateDataRetentionSettingsTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(updateDataRetentionSettingsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings createDataStreamTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createDataStreamMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings deleteDataStreamTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteDataStreamMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings updateDataStreamTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateDataStreamMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + listDataStreamsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listDataStreamsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getDataStreamTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getDataStreamMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + + this.getAccountCallable = + callableFactory.createUnaryCallable( + getAccountTransportSettings, settings.getAccountSettings(), clientContext); + this.listAccountsCallable = + callableFactory.createUnaryCallable( + listAccountsTransportSettings, settings.listAccountsSettings(), clientContext); + this.listAccountsPagedCallable = + callableFactory.createPagedCallable( + listAccountsTransportSettings, settings.listAccountsSettings(), clientContext); + this.deleteAccountCallable = + callableFactory.createUnaryCallable( + deleteAccountTransportSettings, settings.deleteAccountSettings(), clientContext); + this.updateAccountCallable = + callableFactory.createUnaryCallable( + updateAccountTransportSettings, settings.updateAccountSettings(), clientContext); + this.provisionAccountTicketCallable = + callableFactory.createUnaryCallable( + provisionAccountTicketTransportSettings, + settings.provisionAccountTicketSettings(), + clientContext); + this.listAccountSummariesCallable = + callableFactory.createUnaryCallable( + listAccountSummariesTransportSettings, + settings.listAccountSummariesSettings(), + clientContext); + this.listAccountSummariesPagedCallable = + callableFactory.createPagedCallable( + listAccountSummariesTransportSettings, + settings.listAccountSummariesSettings(), + clientContext); + this.getPropertyCallable = + callableFactory.createUnaryCallable( + getPropertyTransportSettings, settings.getPropertySettings(), clientContext); + this.listPropertiesCallable = + callableFactory.createUnaryCallable( + listPropertiesTransportSettings, settings.listPropertiesSettings(), clientContext); + this.listPropertiesPagedCallable = + callableFactory.createPagedCallable( + listPropertiesTransportSettings, settings.listPropertiesSettings(), clientContext); + this.createPropertyCallable = + callableFactory.createUnaryCallable( + createPropertyTransportSettings, settings.createPropertySettings(), clientContext); + this.deletePropertyCallable = + callableFactory.createUnaryCallable( + deletePropertyTransportSettings, settings.deletePropertySettings(), clientContext); + this.updatePropertyCallable = + callableFactory.createUnaryCallable( + updatePropertyTransportSettings, settings.updatePropertySettings(), clientContext); + this.createFirebaseLinkCallable = + callableFactory.createUnaryCallable( + createFirebaseLinkTransportSettings, + settings.createFirebaseLinkSettings(), + clientContext); + this.deleteFirebaseLinkCallable = + callableFactory.createUnaryCallable( + deleteFirebaseLinkTransportSettings, + settings.deleteFirebaseLinkSettings(), + clientContext); + this.listFirebaseLinksCallable = + callableFactory.createUnaryCallable( + listFirebaseLinksTransportSettings, + settings.listFirebaseLinksSettings(), + clientContext); + this.listFirebaseLinksPagedCallable = + callableFactory.createPagedCallable( + listFirebaseLinksTransportSettings, + settings.listFirebaseLinksSettings(), + clientContext); + this.createGoogleAdsLinkCallable = + callableFactory.createUnaryCallable( + createGoogleAdsLinkTransportSettings, + settings.createGoogleAdsLinkSettings(), + clientContext); + this.updateGoogleAdsLinkCallable = + callableFactory.createUnaryCallable( + updateGoogleAdsLinkTransportSettings, + settings.updateGoogleAdsLinkSettings(), + clientContext); + this.deleteGoogleAdsLinkCallable = + callableFactory.createUnaryCallable( + deleteGoogleAdsLinkTransportSettings, + settings.deleteGoogleAdsLinkSettings(), + clientContext); + this.listGoogleAdsLinksCallable = + callableFactory.createUnaryCallable( + listGoogleAdsLinksTransportSettings, + settings.listGoogleAdsLinksSettings(), + clientContext); + this.listGoogleAdsLinksPagedCallable = + callableFactory.createPagedCallable( + listGoogleAdsLinksTransportSettings, + settings.listGoogleAdsLinksSettings(), + clientContext); + this.getDataSharingSettingsCallable = + callableFactory.createUnaryCallable( + getDataSharingSettingsTransportSettings, + settings.getDataSharingSettingsSettings(), + clientContext); + this.getMeasurementProtocolSecretCallable = + callableFactory.createUnaryCallable( + getMeasurementProtocolSecretTransportSettings, + settings.getMeasurementProtocolSecretSettings(), + clientContext); + this.listMeasurementProtocolSecretsCallable = + callableFactory.createUnaryCallable( + listMeasurementProtocolSecretsTransportSettings, + settings.listMeasurementProtocolSecretsSettings(), + clientContext); + this.listMeasurementProtocolSecretsPagedCallable = + callableFactory.createPagedCallable( + listMeasurementProtocolSecretsTransportSettings, + settings.listMeasurementProtocolSecretsSettings(), + clientContext); + this.createMeasurementProtocolSecretCallable = + callableFactory.createUnaryCallable( + createMeasurementProtocolSecretTransportSettings, + settings.createMeasurementProtocolSecretSettings(), + clientContext); + this.deleteMeasurementProtocolSecretCallable = + callableFactory.createUnaryCallable( + deleteMeasurementProtocolSecretTransportSettings, + settings.deleteMeasurementProtocolSecretSettings(), + clientContext); + this.updateMeasurementProtocolSecretCallable = + callableFactory.createUnaryCallable( + updateMeasurementProtocolSecretTransportSettings, + settings.updateMeasurementProtocolSecretSettings(), + clientContext); + this.acknowledgeUserDataCollectionCallable = + callableFactory.createUnaryCallable( + acknowledgeUserDataCollectionTransportSettings, + settings.acknowledgeUserDataCollectionSettings(), + clientContext); + this.searchChangeHistoryEventsCallable = + callableFactory.createUnaryCallable( + searchChangeHistoryEventsTransportSettings, + settings.searchChangeHistoryEventsSettings(), + clientContext); + this.searchChangeHistoryEventsPagedCallable = + callableFactory.createPagedCallable( + searchChangeHistoryEventsTransportSettings, + settings.searchChangeHistoryEventsSettings(), + clientContext); + this.createConversionEventCallable = + callableFactory.createUnaryCallable( + createConversionEventTransportSettings, + settings.createConversionEventSettings(), + clientContext); + this.getConversionEventCallable = + callableFactory.createUnaryCallable( + getConversionEventTransportSettings, + settings.getConversionEventSettings(), + clientContext); + this.deleteConversionEventCallable = + callableFactory.createUnaryCallable( + deleteConversionEventTransportSettings, + settings.deleteConversionEventSettings(), + clientContext); + this.listConversionEventsCallable = + callableFactory.createUnaryCallable( + listConversionEventsTransportSettings, + settings.listConversionEventsSettings(), + clientContext); + this.listConversionEventsPagedCallable = + callableFactory.createPagedCallable( + listConversionEventsTransportSettings, + settings.listConversionEventsSettings(), + clientContext); + this.createCustomDimensionCallable = + callableFactory.createUnaryCallable( + createCustomDimensionTransportSettings, + settings.createCustomDimensionSettings(), + clientContext); + this.updateCustomDimensionCallable = + callableFactory.createUnaryCallable( + updateCustomDimensionTransportSettings, + settings.updateCustomDimensionSettings(), + clientContext); + this.listCustomDimensionsCallable = + callableFactory.createUnaryCallable( + listCustomDimensionsTransportSettings, + settings.listCustomDimensionsSettings(), + clientContext); + this.listCustomDimensionsPagedCallable = + callableFactory.createPagedCallable( + listCustomDimensionsTransportSettings, + settings.listCustomDimensionsSettings(), + clientContext); + this.archiveCustomDimensionCallable = + callableFactory.createUnaryCallable( + archiveCustomDimensionTransportSettings, + settings.archiveCustomDimensionSettings(), + clientContext); + this.getCustomDimensionCallable = + callableFactory.createUnaryCallable( + getCustomDimensionTransportSettings, + settings.getCustomDimensionSettings(), + clientContext); + this.createCustomMetricCallable = + callableFactory.createUnaryCallable( + createCustomMetricTransportSettings, + settings.createCustomMetricSettings(), + clientContext); + this.updateCustomMetricCallable = + callableFactory.createUnaryCallable( + updateCustomMetricTransportSettings, + settings.updateCustomMetricSettings(), + clientContext); + this.listCustomMetricsCallable = + callableFactory.createUnaryCallable( + listCustomMetricsTransportSettings, + settings.listCustomMetricsSettings(), + clientContext); + this.listCustomMetricsPagedCallable = + callableFactory.createPagedCallable( + listCustomMetricsTransportSettings, + settings.listCustomMetricsSettings(), + clientContext); + this.archiveCustomMetricCallable = + callableFactory.createUnaryCallable( + archiveCustomMetricTransportSettings, + settings.archiveCustomMetricSettings(), + clientContext); + this.getCustomMetricCallable = + callableFactory.createUnaryCallable( + getCustomMetricTransportSettings, settings.getCustomMetricSettings(), clientContext); + this.getDataRetentionSettingsCallable = + callableFactory.createUnaryCallable( + getDataRetentionSettingsTransportSettings, + settings.getDataRetentionSettingsSettings(), + clientContext); + this.updateDataRetentionSettingsCallable = + callableFactory.createUnaryCallable( + updateDataRetentionSettingsTransportSettings, + settings.updateDataRetentionSettingsSettings(), + clientContext); + this.createDataStreamCallable = + callableFactory.createUnaryCallable( + createDataStreamTransportSettings, settings.createDataStreamSettings(), clientContext); + this.deleteDataStreamCallable = + callableFactory.createUnaryCallable( + deleteDataStreamTransportSettings, settings.deleteDataStreamSettings(), clientContext); + this.updateDataStreamCallable = + callableFactory.createUnaryCallable( + updateDataStreamTransportSettings, settings.updateDataStreamSettings(), clientContext); + this.listDataStreamsCallable = + callableFactory.createUnaryCallable( + listDataStreamsTransportSettings, settings.listDataStreamsSettings(), clientContext); + this.listDataStreamsPagedCallable = + callableFactory.createPagedCallable( + listDataStreamsTransportSettings, settings.listDataStreamsSettings(), clientContext); + this.getDataStreamCallable = + callableFactory.createUnaryCallable( + getDataStreamTransportSettings, settings.getDataStreamSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(getAccountMethodDescriptor); + methodDescriptors.add(listAccountsMethodDescriptor); + methodDescriptors.add(deleteAccountMethodDescriptor); + methodDescriptors.add(updateAccountMethodDescriptor); + methodDescriptors.add(provisionAccountTicketMethodDescriptor); + methodDescriptors.add(listAccountSummariesMethodDescriptor); + methodDescriptors.add(getPropertyMethodDescriptor); + methodDescriptors.add(listPropertiesMethodDescriptor); + methodDescriptors.add(createPropertyMethodDescriptor); + methodDescriptors.add(deletePropertyMethodDescriptor); + methodDescriptors.add(updatePropertyMethodDescriptor); + methodDescriptors.add(createFirebaseLinkMethodDescriptor); + methodDescriptors.add(deleteFirebaseLinkMethodDescriptor); + methodDescriptors.add(listFirebaseLinksMethodDescriptor); + methodDescriptors.add(createGoogleAdsLinkMethodDescriptor); + methodDescriptors.add(updateGoogleAdsLinkMethodDescriptor); + methodDescriptors.add(deleteGoogleAdsLinkMethodDescriptor); + methodDescriptors.add(listGoogleAdsLinksMethodDescriptor); + methodDescriptors.add(getDataSharingSettingsMethodDescriptor); + methodDescriptors.add(getMeasurementProtocolSecretMethodDescriptor); + methodDescriptors.add(listMeasurementProtocolSecretsMethodDescriptor); + methodDescriptors.add(createMeasurementProtocolSecretMethodDescriptor); + methodDescriptors.add(deleteMeasurementProtocolSecretMethodDescriptor); + methodDescriptors.add(updateMeasurementProtocolSecretMethodDescriptor); + methodDescriptors.add(acknowledgeUserDataCollectionMethodDescriptor); + methodDescriptors.add(searchChangeHistoryEventsMethodDescriptor); + methodDescriptors.add(createConversionEventMethodDescriptor); + methodDescriptors.add(getConversionEventMethodDescriptor); + methodDescriptors.add(deleteConversionEventMethodDescriptor); + methodDescriptors.add(listConversionEventsMethodDescriptor); + methodDescriptors.add(createCustomDimensionMethodDescriptor); + methodDescriptors.add(updateCustomDimensionMethodDescriptor); + methodDescriptors.add(listCustomDimensionsMethodDescriptor); + methodDescriptors.add(archiveCustomDimensionMethodDescriptor); + methodDescriptors.add(getCustomDimensionMethodDescriptor); + methodDescriptors.add(createCustomMetricMethodDescriptor); + methodDescriptors.add(updateCustomMetricMethodDescriptor); + methodDescriptors.add(listCustomMetricsMethodDescriptor); + methodDescriptors.add(archiveCustomMetricMethodDescriptor); + methodDescriptors.add(getCustomMetricMethodDescriptor); + methodDescriptors.add(getDataRetentionSettingsMethodDescriptor); + methodDescriptors.add(updateDataRetentionSettingsMethodDescriptor); + methodDescriptors.add(createDataStreamMethodDescriptor); + methodDescriptors.add(deleteDataStreamMethodDescriptor); + methodDescriptors.add(updateDataStreamMethodDescriptor); + methodDescriptors.add(listDataStreamsMethodDescriptor); + methodDescriptors.add(getDataStreamMethodDescriptor); + return methodDescriptors; + } + + @Override + public UnaryCallable getAccountCallable() { + return getAccountCallable; + } + + @Override + public UnaryCallable listAccountsCallable() { + return listAccountsCallable; + } + + @Override + public UnaryCallable listAccountsPagedCallable() { + return listAccountsPagedCallable; + } + + @Override + public UnaryCallable deleteAccountCallable() { + return deleteAccountCallable; + } + + @Override + public UnaryCallable updateAccountCallable() { + return updateAccountCallable; + } + + @Override + public UnaryCallable + provisionAccountTicketCallable() { + return provisionAccountTicketCallable; + } + + @Override + public UnaryCallable + listAccountSummariesCallable() { + return listAccountSummariesCallable; + } + + @Override + public UnaryCallable + listAccountSummariesPagedCallable() { + return listAccountSummariesPagedCallable; + } + + @Override + public UnaryCallable getPropertyCallable() { + return getPropertyCallable; + } + + @Override + public UnaryCallable listPropertiesCallable() { + return listPropertiesCallable; + } + + @Override + public UnaryCallable + listPropertiesPagedCallable() { + return listPropertiesPagedCallable; + } + + @Override + public UnaryCallable createPropertyCallable() { + return createPropertyCallable; + } + + @Override + public UnaryCallable deletePropertyCallable() { + return deletePropertyCallable; + } + + @Override + public UnaryCallable updatePropertyCallable() { + return updatePropertyCallable; + } + + @Override + public UnaryCallable createFirebaseLinkCallable() { + return createFirebaseLinkCallable; + } + + @Override + public UnaryCallable deleteFirebaseLinkCallable() { + return deleteFirebaseLinkCallable; + } + + @Override + public UnaryCallable + listFirebaseLinksCallable() { + return listFirebaseLinksCallable; + } + + @Override + public UnaryCallable + listFirebaseLinksPagedCallable() { + return listFirebaseLinksPagedCallable; + } + + @Override + public UnaryCallable createGoogleAdsLinkCallable() { + return createGoogleAdsLinkCallable; + } + + @Override + public UnaryCallable updateGoogleAdsLinkCallable() { + return updateGoogleAdsLinkCallable; + } + + @Override + public UnaryCallable deleteGoogleAdsLinkCallable() { + return deleteGoogleAdsLinkCallable; + } + + @Override + public UnaryCallable + listGoogleAdsLinksCallable() { + return listGoogleAdsLinksCallable; + } + + @Override + public UnaryCallable + listGoogleAdsLinksPagedCallable() { + return listGoogleAdsLinksPagedCallable; + } + + @Override + public UnaryCallable + getDataSharingSettingsCallable() { + return getDataSharingSettingsCallable; + } + + @Override + public UnaryCallable + getMeasurementProtocolSecretCallable() { + return getMeasurementProtocolSecretCallable; + } + + @Override + public UnaryCallable< + ListMeasurementProtocolSecretsRequest, ListMeasurementProtocolSecretsResponse> + listMeasurementProtocolSecretsCallable() { + return listMeasurementProtocolSecretsCallable; + } + + @Override + public UnaryCallable< + ListMeasurementProtocolSecretsRequest, ListMeasurementProtocolSecretsPagedResponse> + listMeasurementProtocolSecretsPagedCallable() { + return listMeasurementProtocolSecretsPagedCallable; + } + + @Override + public UnaryCallable + createMeasurementProtocolSecretCallable() { + return createMeasurementProtocolSecretCallable; + } + + @Override + public UnaryCallable + deleteMeasurementProtocolSecretCallable() { + return deleteMeasurementProtocolSecretCallable; + } + + @Override + public UnaryCallable + updateMeasurementProtocolSecretCallable() { + return updateMeasurementProtocolSecretCallable; + } + + @Override + public UnaryCallable + acknowledgeUserDataCollectionCallable() { + return acknowledgeUserDataCollectionCallable; + } + + @Override + public UnaryCallable + searchChangeHistoryEventsCallable() { + return searchChangeHistoryEventsCallable; + } + + @Override + public UnaryCallable + searchChangeHistoryEventsPagedCallable() { + return searchChangeHistoryEventsPagedCallable; + } + + @Override + public UnaryCallable + createConversionEventCallable() { + return createConversionEventCallable; + } + + @Override + public UnaryCallable getConversionEventCallable() { + return getConversionEventCallable; + } + + @Override + public UnaryCallable deleteConversionEventCallable() { + return deleteConversionEventCallable; + } + + @Override + public UnaryCallable + listConversionEventsCallable() { + return listConversionEventsCallable; + } + + @Override + public UnaryCallable + listConversionEventsPagedCallable() { + return listConversionEventsPagedCallable; + } + + @Override + public UnaryCallable + createCustomDimensionCallable() { + return createCustomDimensionCallable; + } + + @Override + public UnaryCallable + updateCustomDimensionCallable() { + return updateCustomDimensionCallable; + } + + @Override + public UnaryCallable + listCustomDimensionsCallable() { + return listCustomDimensionsCallable; + } + + @Override + public UnaryCallable + listCustomDimensionsPagedCallable() { + return listCustomDimensionsPagedCallable; + } + + @Override + public UnaryCallable archiveCustomDimensionCallable() { + return archiveCustomDimensionCallable; + } + + @Override + public UnaryCallable getCustomDimensionCallable() { + return getCustomDimensionCallable; + } + + @Override + public UnaryCallable createCustomMetricCallable() { + return createCustomMetricCallable; + } + + @Override + public UnaryCallable updateCustomMetricCallable() { + return updateCustomMetricCallable; + } + + @Override + public UnaryCallable + listCustomMetricsCallable() { + return listCustomMetricsCallable; + } + + @Override + public UnaryCallable + listCustomMetricsPagedCallable() { + return listCustomMetricsPagedCallable; + } + + @Override + public UnaryCallable archiveCustomMetricCallable() { + return archiveCustomMetricCallable; + } + + @Override + public UnaryCallable getCustomMetricCallable() { + return getCustomMetricCallable; + } + + @Override + public UnaryCallable + getDataRetentionSettingsCallable() { + return getDataRetentionSettingsCallable; + } + + @Override + public UnaryCallable + updateDataRetentionSettingsCallable() { + return updateDataRetentionSettingsCallable; + } + + @Override + public UnaryCallable createDataStreamCallable() { + return createDataStreamCallable; + } + + @Override + public UnaryCallable deleteDataStreamCallable() { + return deleteDataStreamCallable; + } + + @Override + public UnaryCallable updateDataStreamCallable() { + return updateDataStreamCallable; + } + + @Override + public UnaryCallable listDataStreamsCallable() { + return listDataStreamsCallable; + } + + @Override + public UnaryCallable + listDataStreamsPagedCallable() { + return listDataStreamsPagedCallable; + } + + @Override + public UnaryCallable getDataStreamCallable() { + return getDataStreamCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-analytics-admin/google-analytics-admin/src/test/java/com/google/analytics/admin/v1beta/AnalyticsAdminServiceClientHttpJsonTest.java b/java-analytics-admin/google-analytics-admin/src/test/java/com/google/analytics/admin/v1beta/AnalyticsAdminServiceClientHttpJsonTest.java new file mode 100644 index 000000000000..bde4ff366787 --- /dev/null +++ b/java-analytics-admin/google-analytics-admin/src/test/java/com/google/analytics/admin/v1beta/AnalyticsAdminServiceClientHttpJsonTest.java @@ -0,0 +1,4094 @@ +/* + * Copyright 2022 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.admin.v1beta; + +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListAccountSummariesPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListAccountsPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListConversionEventsPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListCustomDimensionsPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListCustomMetricsPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListDataStreamsPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListFirebaseLinksPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListGoogleAdsLinksPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListMeasurementProtocolSecretsPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListPropertiesPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.SearchChangeHistoryEventsPagedResponse; + +import com.google.analytics.admin.v1beta.stub.HttpJsonAnalyticsAdminServiceStub; +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.common.collect.Lists; +import com.google.protobuf.BoolValue; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class AnalyticsAdminServiceClientHttpJsonTest { + private static MockHttpService mockService; + private static AnalyticsAdminServiceClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonAnalyticsAdminServiceStub.getMethodDescriptors(), + AnalyticsAdminServiceSettings.getDefaultEndpoint()); + AnalyticsAdminServiceSettings settings = + AnalyticsAdminServiceSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + AnalyticsAdminServiceSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = AnalyticsAdminServiceClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void getAccountTest() throws Exception { + Account expectedResponse = + Account.newBuilder() + .setName(AccountName.of("[ACCOUNT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setRegionCode("regionCode-1991004415") + .setDeleted(true) + .build(); + mockService.addResponse(expectedResponse); + + AccountName name = AccountName.of("[ACCOUNT]"); + + Account actualResponse = client.getAccount(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 getAccountExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AccountName name = AccountName.of("[ACCOUNT]"); + client.getAccount(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAccountTest2() throws Exception { + Account expectedResponse = + Account.newBuilder() + .setName(AccountName.of("[ACCOUNT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setRegionCode("regionCode-1991004415") + .setDeleted(true) + .build(); + mockService.addResponse(expectedResponse); + + String name = "accounts/account-3500"; + + Account actualResponse = client.getAccount(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 getAccountExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "accounts/account-3500"; + client.getAccount(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAccountsTest() throws Exception { + Account responsesElement = Account.newBuilder().build(); + ListAccountsResponse expectedResponse = + ListAccountsResponse.newBuilder() + .setNextPageToken("") + .addAllAccounts(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ListAccountsRequest request = + ListAccountsRequest.newBuilder() + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setShowDeleted(true) + .build(); + + ListAccountsPagedResponse pagedListResponse = client.listAccounts(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAccountsList().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 listAccountsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ListAccountsRequest request = + ListAccountsRequest.newBuilder() + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setShowDeleted(true) + .build(); + client.listAccounts(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteAccountTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + AccountName name = AccountName.of("[ACCOUNT]"); + + client.deleteAccount(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteAccountExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AccountName name = AccountName.of("[ACCOUNT]"); + client.deleteAccount(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteAccountTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = "accounts/account-3500"; + + client.deleteAccount(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteAccountExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "accounts/account-3500"; + client.deleteAccount(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateAccountTest() throws Exception { + Account expectedResponse = + Account.newBuilder() + .setName(AccountName.of("[ACCOUNT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setRegionCode("regionCode-1991004415") + .setDeleted(true) + .build(); + mockService.addResponse(expectedResponse); + + Account account = + Account.newBuilder() + .setName(AccountName.of("[ACCOUNT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setRegionCode("regionCode-1991004415") + .setDeleted(true) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Account actualResponse = client.updateAccount(account, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateAccountExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Account account = + Account.newBuilder() + .setName(AccountName.of("[ACCOUNT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setRegionCode("regionCode-1991004415") + .setDeleted(true) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateAccount(account, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void provisionAccountTicketTest() throws Exception { + ProvisionAccountTicketResponse expectedResponse = + ProvisionAccountTicketResponse.newBuilder() + .setAccountTicketId("accountTicketId-1576709484") + .build(); + mockService.addResponse(expectedResponse); + + ProvisionAccountTicketRequest request = + ProvisionAccountTicketRequest.newBuilder() + .setAccount(Account.newBuilder().build()) + .setRedirectUri("redirectUri1970337776") + .build(); + + ProvisionAccountTicketResponse actualResponse = client.provisionAccountTicket(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void provisionAccountTicketExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProvisionAccountTicketRequest request = + ProvisionAccountTicketRequest.newBuilder() + .setAccount(Account.newBuilder().build()) + .setRedirectUri("redirectUri1970337776") + .build(); + client.provisionAccountTicket(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAccountSummariesTest() throws Exception { + AccountSummary responsesElement = AccountSummary.newBuilder().build(); + ListAccountSummariesResponse expectedResponse = + ListAccountSummariesResponse.newBuilder() + .setNextPageToken("") + .addAllAccountSummaries(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ListAccountSummariesRequest request = + ListAccountSummariesRequest.newBuilder() + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListAccountSummariesPagedResponse pagedListResponse = client.listAccountSummaries(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAccountSummariesList().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 listAccountSummariesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ListAccountSummariesRequest request = + ListAccountSummariesRequest.newBuilder() + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listAccountSummaries(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getPropertyTest() throws Exception { + Property expectedResponse = + Property.newBuilder() + .setName(PropertyName.of("[PROPERTY]").toString()) + .setPropertyType(PropertyType.forNumber(0)) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setParent("parent-995424086") + .setDisplayName("displayName1714148973") + .setIndustryCategory(IndustryCategory.forNumber(0)) + .setTimeZone("timeZone-2077180903") + .setCurrencyCode("currencyCode1004773790") + .setServiceLevel(ServiceLevel.forNumber(0)) + .setDeleteTime(Timestamp.newBuilder().build()) + .setExpireTime(Timestamp.newBuilder().build()) + .setAccount(AccountName.of("[ACCOUNT]").toString()) + .build(); + mockService.addResponse(expectedResponse); + + PropertyName name = PropertyName.of("[PROPERTY]"); + + Property actualResponse = client.getProperty(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 getPropertyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PropertyName name = PropertyName.of("[PROPERTY]"); + client.getProperty(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getPropertyTest2() throws Exception { + Property expectedResponse = + Property.newBuilder() + .setName(PropertyName.of("[PROPERTY]").toString()) + .setPropertyType(PropertyType.forNumber(0)) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setParent("parent-995424086") + .setDisplayName("displayName1714148973") + .setIndustryCategory(IndustryCategory.forNumber(0)) + .setTimeZone("timeZone-2077180903") + .setCurrencyCode("currencyCode1004773790") + .setServiceLevel(ServiceLevel.forNumber(0)) + .setDeleteTime(Timestamp.newBuilder().build()) + .setExpireTime(Timestamp.newBuilder().build()) + .setAccount(AccountName.of("[ACCOUNT]").toString()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "properties/propertie-7337"; + + Property actualResponse = client.getProperty(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 getPropertyExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "properties/propertie-7337"; + client.getProperty(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listPropertiesTest() throws Exception { + Property responsesElement = Property.newBuilder().build(); + ListPropertiesResponse expectedResponse = + ListPropertiesResponse.newBuilder() + .setNextPageToken("") + .addAllProperties(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ListPropertiesRequest request = + ListPropertiesRequest.newBuilder() + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setShowDeleted(true) + .build(); + + ListPropertiesPagedResponse pagedListResponse = client.listProperties(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPropertiesList().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 listPropertiesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ListPropertiesRequest request = + ListPropertiesRequest.newBuilder() + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setShowDeleted(true) + .build(); + client.listProperties(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createPropertyTest() throws Exception { + Property expectedResponse = + Property.newBuilder() + .setName(PropertyName.of("[PROPERTY]").toString()) + .setPropertyType(PropertyType.forNumber(0)) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setParent("parent-995424086") + .setDisplayName("displayName1714148973") + .setIndustryCategory(IndustryCategory.forNumber(0)) + .setTimeZone("timeZone-2077180903") + .setCurrencyCode("currencyCode1004773790") + .setServiceLevel(ServiceLevel.forNumber(0)) + .setDeleteTime(Timestamp.newBuilder().build()) + .setExpireTime(Timestamp.newBuilder().build()) + .setAccount(AccountName.of("[ACCOUNT]").toString()) + .build(); + mockService.addResponse(expectedResponse); + + Property property = Property.newBuilder().build(); + + Property actualResponse = client.createProperty(property); + 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 createPropertyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Property property = Property.newBuilder().build(); + client.createProperty(property); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deletePropertyTest() throws Exception { + Property expectedResponse = + Property.newBuilder() + .setName(PropertyName.of("[PROPERTY]").toString()) + .setPropertyType(PropertyType.forNumber(0)) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setParent("parent-995424086") + .setDisplayName("displayName1714148973") + .setIndustryCategory(IndustryCategory.forNumber(0)) + .setTimeZone("timeZone-2077180903") + .setCurrencyCode("currencyCode1004773790") + .setServiceLevel(ServiceLevel.forNumber(0)) + .setDeleteTime(Timestamp.newBuilder().build()) + .setExpireTime(Timestamp.newBuilder().build()) + .setAccount(AccountName.of("[ACCOUNT]").toString()) + .build(); + mockService.addResponse(expectedResponse); + + PropertyName name = PropertyName.of("[PROPERTY]"); + + Property actualResponse = client.deleteProperty(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 deletePropertyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PropertyName name = PropertyName.of("[PROPERTY]"); + client.deleteProperty(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deletePropertyTest2() throws Exception { + Property expectedResponse = + Property.newBuilder() + .setName(PropertyName.of("[PROPERTY]").toString()) + .setPropertyType(PropertyType.forNumber(0)) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setParent("parent-995424086") + .setDisplayName("displayName1714148973") + .setIndustryCategory(IndustryCategory.forNumber(0)) + .setTimeZone("timeZone-2077180903") + .setCurrencyCode("currencyCode1004773790") + .setServiceLevel(ServiceLevel.forNumber(0)) + .setDeleteTime(Timestamp.newBuilder().build()) + .setExpireTime(Timestamp.newBuilder().build()) + .setAccount(AccountName.of("[ACCOUNT]").toString()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "properties/propertie-7337"; + + Property actualResponse = client.deleteProperty(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 deletePropertyExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "properties/propertie-7337"; + client.deleteProperty(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updatePropertyTest() throws Exception { + Property expectedResponse = + Property.newBuilder() + .setName(PropertyName.of("[PROPERTY]").toString()) + .setPropertyType(PropertyType.forNumber(0)) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setParent("parent-995424086") + .setDisplayName("displayName1714148973") + .setIndustryCategory(IndustryCategory.forNumber(0)) + .setTimeZone("timeZone-2077180903") + .setCurrencyCode("currencyCode1004773790") + .setServiceLevel(ServiceLevel.forNumber(0)) + .setDeleteTime(Timestamp.newBuilder().build()) + .setExpireTime(Timestamp.newBuilder().build()) + .setAccount(AccountName.of("[ACCOUNT]").toString()) + .build(); + mockService.addResponse(expectedResponse); + + Property property = + Property.newBuilder() + .setName(PropertyName.of("[PROPERTY]").toString()) + .setPropertyType(PropertyType.forNumber(0)) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setParent("parent-995424086") + .setDisplayName("displayName1714148973") + .setIndustryCategory(IndustryCategory.forNumber(0)) + .setTimeZone("timeZone-2077180903") + .setCurrencyCode("currencyCode1004773790") + .setServiceLevel(ServiceLevel.forNumber(0)) + .setDeleteTime(Timestamp.newBuilder().build()) + .setExpireTime(Timestamp.newBuilder().build()) + .setAccount(AccountName.of("[ACCOUNT]").toString()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Property actualResponse = client.updateProperty(property, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updatePropertyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Property property = + Property.newBuilder() + .setName(PropertyName.of("[PROPERTY]").toString()) + .setPropertyType(PropertyType.forNumber(0)) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setParent("parent-995424086") + .setDisplayName("displayName1714148973") + .setIndustryCategory(IndustryCategory.forNumber(0)) + .setTimeZone("timeZone-2077180903") + .setCurrencyCode("currencyCode1004773790") + .setServiceLevel(ServiceLevel.forNumber(0)) + .setDeleteTime(Timestamp.newBuilder().build()) + .setExpireTime(Timestamp.newBuilder().build()) + .setAccount(AccountName.of("[ACCOUNT]").toString()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateProperty(property, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createFirebaseLinkTest() throws Exception { + FirebaseLink expectedResponse = + FirebaseLink.newBuilder() + .setName(FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]").toString()) + .setProject("project-309310695") + .setCreateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + PropertyName parent = PropertyName.of("[PROPERTY]"); + FirebaseLink firebaseLink = FirebaseLink.newBuilder().build(); + + FirebaseLink actualResponse = client.createFirebaseLink(parent, firebaseLink); + 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 createFirebaseLinkExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PropertyName parent = PropertyName.of("[PROPERTY]"); + FirebaseLink firebaseLink = FirebaseLink.newBuilder().build(); + client.createFirebaseLink(parent, firebaseLink); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createFirebaseLinkTest2() throws Exception { + FirebaseLink expectedResponse = + FirebaseLink.newBuilder() + .setName(FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]").toString()) + .setProject("project-309310695") + .setCreateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "properties/propertie-2024"; + FirebaseLink firebaseLink = FirebaseLink.newBuilder().build(); + + FirebaseLink actualResponse = client.createFirebaseLink(parent, firebaseLink); + 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 createFirebaseLinkExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "properties/propertie-2024"; + FirebaseLink firebaseLink = FirebaseLink.newBuilder().build(); + client.createFirebaseLink(parent, firebaseLink); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteFirebaseLinkTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + FirebaseLinkName name = FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]"); + + client.deleteFirebaseLink(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteFirebaseLinkExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + FirebaseLinkName name = FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]"); + client.deleteFirebaseLink(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteFirebaseLinkTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = "properties/propertie-2649/firebaseLinks/firebaseLink-2649"; + + client.deleteFirebaseLink(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteFirebaseLinkExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "properties/propertie-2649/firebaseLinks/firebaseLink-2649"; + client.deleteFirebaseLink(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listFirebaseLinksTest() throws Exception { + FirebaseLink responsesElement = FirebaseLink.newBuilder().build(); + ListFirebaseLinksResponse expectedResponse = + ListFirebaseLinksResponse.newBuilder() + .setNextPageToken("") + .addAllFirebaseLinks(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + PropertyName parent = PropertyName.of("[PROPERTY]"); + + ListFirebaseLinksPagedResponse pagedListResponse = client.listFirebaseLinks(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getFirebaseLinksList().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 listFirebaseLinksExceptionTest() 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.listFirebaseLinks(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listFirebaseLinksTest2() throws Exception { + FirebaseLink responsesElement = FirebaseLink.newBuilder().build(); + ListFirebaseLinksResponse expectedResponse = + ListFirebaseLinksResponse.newBuilder() + .setNextPageToken("") + .addAllFirebaseLinks(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "properties/propertie-2024"; + + ListFirebaseLinksPagedResponse pagedListResponse = client.listFirebaseLinks(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getFirebaseLinksList().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 listFirebaseLinksExceptionTest2() 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.listFirebaseLinks(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createGoogleAdsLinkTest() throws Exception { + GoogleAdsLink expectedResponse = + GoogleAdsLink.newBuilder() + .setName(GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]").toString()) + .setCustomerId("customerId-1581184615") + .setCanManageClients(true) + .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setCreatorEmailAddress("creatorEmailAddress67752708") + .build(); + mockService.addResponse(expectedResponse); + + PropertyName parent = PropertyName.of("[PROPERTY]"); + GoogleAdsLink googleAdsLink = GoogleAdsLink.newBuilder().build(); + + GoogleAdsLink actualResponse = client.createGoogleAdsLink(parent, googleAdsLink); + 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 createGoogleAdsLinkExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PropertyName parent = PropertyName.of("[PROPERTY]"); + GoogleAdsLink googleAdsLink = GoogleAdsLink.newBuilder().build(); + client.createGoogleAdsLink(parent, googleAdsLink); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createGoogleAdsLinkTest2() throws Exception { + GoogleAdsLink expectedResponse = + GoogleAdsLink.newBuilder() + .setName(GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]").toString()) + .setCustomerId("customerId-1581184615") + .setCanManageClients(true) + .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setCreatorEmailAddress("creatorEmailAddress67752708") + .build(); + mockService.addResponse(expectedResponse); + + String parent = "properties/propertie-2024"; + GoogleAdsLink googleAdsLink = GoogleAdsLink.newBuilder().build(); + + GoogleAdsLink actualResponse = client.createGoogleAdsLink(parent, googleAdsLink); + 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 createGoogleAdsLinkExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "properties/propertie-2024"; + GoogleAdsLink googleAdsLink = GoogleAdsLink.newBuilder().build(); + client.createGoogleAdsLink(parent, googleAdsLink); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateGoogleAdsLinkTest() throws Exception { + GoogleAdsLink expectedResponse = + GoogleAdsLink.newBuilder() + .setName(GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]").toString()) + .setCustomerId("customerId-1581184615") + .setCanManageClients(true) + .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setCreatorEmailAddress("creatorEmailAddress67752708") + .build(); + mockService.addResponse(expectedResponse); + + GoogleAdsLink googleAdsLink = + GoogleAdsLink.newBuilder() + .setName(GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]").toString()) + .setCustomerId("customerId-1581184615") + .setCanManageClients(true) + .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setCreatorEmailAddress("creatorEmailAddress67752708") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + GoogleAdsLink actualResponse = client.updateGoogleAdsLink(googleAdsLink, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateGoogleAdsLinkExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + GoogleAdsLink googleAdsLink = + GoogleAdsLink.newBuilder() + .setName(GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]").toString()) + .setCustomerId("customerId-1581184615") + .setCanManageClients(true) + .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setCreatorEmailAddress("creatorEmailAddress67752708") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateGoogleAdsLink(googleAdsLink, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteGoogleAdsLinkTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + GoogleAdsLinkName name = GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]"); + + client.deleteGoogleAdsLink(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteGoogleAdsLinkExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + GoogleAdsLinkName name = GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]"); + client.deleteGoogleAdsLink(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteGoogleAdsLinkTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = "properties/propertie-1267/googleAdsLinks/googleAdsLink-1267"; + + client.deleteGoogleAdsLink(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteGoogleAdsLinkExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "properties/propertie-1267/googleAdsLinks/googleAdsLink-1267"; + client.deleteGoogleAdsLink(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listGoogleAdsLinksTest() throws Exception { + GoogleAdsLink responsesElement = GoogleAdsLink.newBuilder().build(); + ListGoogleAdsLinksResponse expectedResponse = + ListGoogleAdsLinksResponse.newBuilder() + .setNextPageToken("") + .addAllGoogleAdsLinks(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + PropertyName parent = PropertyName.of("[PROPERTY]"); + + ListGoogleAdsLinksPagedResponse pagedListResponse = client.listGoogleAdsLinks(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getGoogleAdsLinksList().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 listGoogleAdsLinksExceptionTest() 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.listGoogleAdsLinks(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listGoogleAdsLinksTest2() throws Exception { + GoogleAdsLink responsesElement = GoogleAdsLink.newBuilder().build(); + ListGoogleAdsLinksResponse expectedResponse = + ListGoogleAdsLinksResponse.newBuilder() + .setNextPageToken("") + .addAllGoogleAdsLinks(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "properties/propertie-2024"; + + ListGoogleAdsLinksPagedResponse pagedListResponse = client.listGoogleAdsLinks(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getGoogleAdsLinksList().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 listGoogleAdsLinksExceptionTest2() 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.listGoogleAdsLinks(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDataSharingSettingsTest() throws Exception { + DataSharingSettings expectedResponse = + DataSharingSettings.newBuilder() + .setName(DataSharingSettingsName.of("[ACCOUNT]").toString()) + .setSharingWithGoogleSupportEnabled(true) + .setSharingWithGoogleAssignedSalesEnabled(true) + .setSharingWithGoogleAnySalesEnabled(true) + .setSharingWithGoogleProductsEnabled(true) + .setSharingWithOthersEnabled(true) + .build(); + mockService.addResponse(expectedResponse); + + DataSharingSettingsName name = DataSharingSettingsName.of("[ACCOUNT]"); + + DataSharingSettings actualResponse = client.getDataSharingSettings(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 getDataSharingSettingsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DataSharingSettingsName name = DataSharingSettingsName.of("[ACCOUNT]"); + client.getDataSharingSettings(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDataSharingSettingsTest2() throws Exception { + DataSharingSettings expectedResponse = + DataSharingSettings.newBuilder() + .setName(DataSharingSettingsName.of("[ACCOUNT]").toString()) + .setSharingWithGoogleSupportEnabled(true) + .setSharingWithGoogleAssignedSalesEnabled(true) + .setSharingWithGoogleAnySalesEnabled(true) + .setSharingWithGoogleProductsEnabled(true) + .setSharingWithOthersEnabled(true) + .build(); + mockService.addResponse(expectedResponse); + + String name = "accounts/account-7122/dataSharingSettings"; + + DataSharingSettings actualResponse = client.getDataSharingSettings(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 getDataSharingSettingsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "accounts/account-7122/dataSharingSettings"; + client.getDataSharingSettings(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getMeasurementProtocolSecretTest() throws Exception { + MeasurementProtocolSecret expectedResponse = + MeasurementProtocolSecret.newBuilder() + .setName( + MeasurementProtocolSecretName.of( + "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]") + .toString()) + .setDisplayName("displayName1714148973") + .setSecretValue("secretValue-2044460895") + .build(); + mockService.addResponse(expectedResponse); + + MeasurementProtocolSecretName name = + MeasurementProtocolSecretName.of( + "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]"); + + MeasurementProtocolSecret actualResponse = client.getMeasurementProtocolSecret(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 getMeasurementProtocolSecretExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + MeasurementProtocolSecretName name = + MeasurementProtocolSecretName.of( + "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]"); + client.getMeasurementProtocolSecret(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getMeasurementProtocolSecretTest2() throws Exception { + MeasurementProtocolSecret expectedResponse = + MeasurementProtocolSecret.newBuilder() + .setName( + MeasurementProtocolSecretName.of( + "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]") + .toString()) + .setDisplayName("displayName1714148973") + .setSecretValue("secretValue-2044460895") + .build(); + mockService.addResponse(expectedResponse); + + String name = + "properties/propertie-6357/dataStreams/dataStream-6357/measurementProtocolSecrets/measurementProtocolSecret-6357"; + + MeasurementProtocolSecret actualResponse = client.getMeasurementProtocolSecret(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 getMeasurementProtocolSecretExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "properties/propertie-6357/dataStreams/dataStream-6357/measurementProtocolSecrets/measurementProtocolSecret-6357"; + client.getMeasurementProtocolSecret(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listMeasurementProtocolSecretsTest() throws Exception { + MeasurementProtocolSecret responsesElement = MeasurementProtocolSecret.newBuilder().build(); + ListMeasurementProtocolSecretsResponse expectedResponse = + ListMeasurementProtocolSecretsResponse.newBuilder() + .setNextPageToken("") + .addAllMeasurementProtocolSecrets(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); + + ListMeasurementProtocolSecretsPagedResponse pagedListResponse = + client.listMeasurementProtocolSecrets(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals( + expectedResponse.getMeasurementProtocolSecretsList().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 listMeasurementProtocolSecretsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); + client.listMeasurementProtocolSecrets(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listMeasurementProtocolSecretsTest2() throws Exception { + MeasurementProtocolSecret responsesElement = MeasurementProtocolSecret.newBuilder().build(); + ListMeasurementProtocolSecretsResponse expectedResponse = + ListMeasurementProtocolSecretsResponse.newBuilder() + .setNextPageToken("") + .addAllMeasurementProtocolSecrets(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "properties/propertie-9651/dataStreams/dataStream-9651"; + + ListMeasurementProtocolSecretsPagedResponse pagedListResponse = + client.listMeasurementProtocolSecrets(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals( + expectedResponse.getMeasurementProtocolSecretsList().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 listMeasurementProtocolSecretsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "properties/propertie-9651/dataStreams/dataStream-9651"; + client.listMeasurementProtocolSecrets(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createMeasurementProtocolSecretTest() throws Exception { + MeasurementProtocolSecret expectedResponse = + MeasurementProtocolSecret.newBuilder() + .setName( + MeasurementProtocolSecretName.of( + "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]") + .toString()) + .setDisplayName("displayName1714148973") + .setSecretValue("secretValue-2044460895") + .build(); + mockService.addResponse(expectedResponse); + + DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); + MeasurementProtocolSecret measurementProtocolSecret = + MeasurementProtocolSecret.newBuilder().build(); + + MeasurementProtocolSecret actualResponse = + client.createMeasurementProtocolSecret(parent, measurementProtocolSecret); + 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 createMeasurementProtocolSecretExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); + MeasurementProtocolSecret measurementProtocolSecret = + MeasurementProtocolSecret.newBuilder().build(); + client.createMeasurementProtocolSecret(parent, measurementProtocolSecret); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createMeasurementProtocolSecretTest2() throws Exception { + MeasurementProtocolSecret expectedResponse = + MeasurementProtocolSecret.newBuilder() + .setName( + MeasurementProtocolSecretName.of( + "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]") + .toString()) + .setDisplayName("displayName1714148973") + .setSecretValue("secretValue-2044460895") + .build(); + mockService.addResponse(expectedResponse); + + String parent = "properties/propertie-9651/dataStreams/dataStream-9651"; + MeasurementProtocolSecret measurementProtocolSecret = + MeasurementProtocolSecret.newBuilder().build(); + + MeasurementProtocolSecret actualResponse = + client.createMeasurementProtocolSecret(parent, measurementProtocolSecret); + 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 createMeasurementProtocolSecretExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "properties/propertie-9651/dataStreams/dataStream-9651"; + MeasurementProtocolSecret measurementProtocolSecret = + MeasurementProtocolSecret.newBuilder().build(); + client.createMeasurementProtocolSecret(parent, measurementProtocolSecret); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteMeasurementProtocolSecretTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + MeasurementProtocolSecretName name = + MeasurementProtocolSecretName.of( + "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]"); + + client.deleteMeasurementProtocolSecret(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteMeasurementProtocolSecretExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + MeasurementProtocolSecretName name = + MeasurementProtocolSecretName.of( + "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]"); + client.deleteMeasurementProtocolSecret(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteMeasurementProtocolSecretTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = + "properties/propertie-6357/dataStreams/dataStream-6357/measurementProtocolSecrets/measurementProtocolSecret-6357"; + + client.deleteMeasurementProtocolSecret(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteMeasurementProtocolSecretExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "properties/propertie-6357/dataStreams/dataStream-6357/measurementProtocolSecrets/measurementProtocolSecret-6357"; + client.deleteMeasurementProtocolSecret(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateMeasurementProtocolSecretTest() throws Exception { + MeasurementProtocolSecret expectedResponse = + MeasurementProtocolSecret.newBuilder() + .setName( + MeasurementProtocolSecretName.of( + "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]") + .toString()) + .setDisplayName("displayName1714148973") + .setSecretValue("secretValue-2044460895") + .build(); + mockService.addResponse(expectedResponse); + + MeasurementProtocolSecret measurementProtocolSecret = + MeasurementProtocolSecret.newBuilder() + .setName( + MeasurementProtocolSecretName.of( + "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]") + .toString()) + .setDisplayName("displayName1714148973") + .setSecretValue("secretValue-2044460895") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + MeasurementProtocolSecret actualResponse = + client.updateMeasurementProtocolSecret(measurementProtocolSecret, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateMeasurementProtocolSecretExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + MeasurementProtocolSecret measurementProtocolSecret = + MeasurementProtocolSecret.newBuilder() + .setName( + MeasurementProtocolSecretName.of( + "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]") + .toString()) + .setDisplayName("displayName1714148973") + .setSecretValue("secretValue-2044460895") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateMeasurementProtocolSecret(measurementProtocolSecret, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void acknowledgeUserDataCollectionTest() throws Exception { + AcknowledgeUserDataCollectionResponse expectedResponse = + AcknowledgeUserDataCollectionResponse.newBuilder().build(); + mockService.addResponse(expectedResponse); + + AcknowledgeUserDataCollectionRequest request = + AcknowledgeUserDataCollectionRequest.newBuilder() + .setProperty(PropertyName.of("[PROPERTY]").toString()) + .setAcknowledgement("acknowledgement1769490938") + .build(); + + AcknowledgeUserDataCollectionResponse actualResponse = + client.acknowledgeUserDataCollection(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void acknowledgeUserDataCollectionExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AcknowledgeUserDataCollectionRequest request = + AcknowledgeUserDataCollectionRequest.newBuilder() + .setProperty(PropertyName.of("[PROPERTY]").toString()) + .setAcknowledgement("acknowledgement1769490938") + .build(); + client.acknowledgeUserDataCollection(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void searchChangeHistoryEventsTest() throws Exception { + ChangeHistoryEvent responsesElement = ChangeHistoryEvent.newBuilder().build(); + SearchChangeHistoryEventsResponse expectedResponse = + SearchChangeHistoryEventsResponse.newBuilder() + .setNextPageToken("") + .addAllChangeHistoryEvents(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + SearchChangeHistoryEventsRequest request = + SearchChangeHistoryEventsRequest.newBuilder() + .setAccount(AccountName.of("[ACCOUNT]").toString()) + .setProperty(PropertyName.of("[PROPERTY]").toString()) + .addAllResourceType(new ArrayList()) + .addAllAction(new ArrayList()) + .addAllActorEmail(new ArrayList()) + .setEarliestChangeTime(Timestamp.newBuilder().build()) + .setLatestChangeTime(Timestamp.newBuilder().build()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + SearchChangeHistoryEventsPagedResponse pagedListResponse = + client.searchChangeHistoryEvents(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getChangeHistoryEventsList().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 searchChangeHistoryEventsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SearchChangeHistoryEventsRequest request = + SearchChangeHistoryEventsRequest.newBuilder() + .setAccount(AccountName.of("[ACCOUNT]").toString()) + .setProperty(PropertyName.of("[PROPERTY]").toString()) + .addAllResourceType(new ArrayList()) + .addAllAction(new ArrayList()) + .addAllActorEmail(new ArrayList()) + .setEarliestChangeTime(Timestamp.newBuilder().build()) + .setLatestChangeTime(Timestamp.newBuilder().build()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.searchChangeHistoryEvents(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createConversionEventTest() throws Exception { + ConversionEvent expectedResponse = + ConversionEvent.newBuilder() + .setName(ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]").toString()) + .setEventName("eventName31228997") + .setCreateTime(Timestamp.newBuilder().build()) + .setDeletable(true) + .setCustom(true) + .build(); + mockService.addResponse(expectedResponse); + + PropertyName parent = PropertyName.of("[PROPERTY]"); + ConversionEvent conversionEvent = ConversionEvent.newBuilder().build(); + + ConversionEvent actualResponse = client.createConversionEvent(parent, conversionEvent); + 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 createConversionEventExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PropertyName parent = PropertyName.of("[PROPERTY]"); + ConversionEvent conversionEvent = ConversionEvent.newBuilder().build(); + client.createConversionEvent(parent, conversionEvent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createConversionEventTest2() throws Exception { + ConversionEvent expectedResponse = + ConversionEvent.newBuilder() + .setName(ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]").toString()) + .setEventName("eventName31228997") + .setCreateTime(Timestamp.newBuilder().build()) + .setDeletable(true) + .setCustom(true) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "properties/propertie-2024"; + ConversionEvent conversionEvent = ConversionEvent.newBuilder().build(); + + ConversionEvent actualResponse = client.createConversionEvent(parent, conversionEvent); + 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 createConversionEventExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "properties/propertie-2024"; + ConversionEvent conversionEvent = ConversionEvent.newBuilder().build(); + client.createConversionEvent(parent, conversionEvent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getConversionEventTest() throws Exception { + ConversionEvent expectedResponse = + ConversionEvent.newBuilder() + .setName(ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]").toString()) + .setEventName("eventName31228997") + .setCreateTime(Timestamp.newBuilder().build()) + .setDeletable(true) + .setCustom(true) + .build(); + mockService.addResponse(expectedResponse); + + ConversionEventName name = ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]"); + + ConversionEvent actualResponse = client.getConversionEvent(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 getConversionEventExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ConversionEventName name = ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]"); + client.getConversionEvent(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getConversionEventTest2() throws Exception { + ConversionEvent expectedResponse = + ConversionEvent.newBuilder() + .setName(ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]").toString()) + .setEventName("eventName31228997") + .setCreateTime(Timestamp.newBuilder().build()) + .setDeletable(true) + .setCustom(true) + .build(); + mockService.addResponse(expectedResponse); + + String name = "properties/propertie-4144/conversionEvents/conversionEvent-4144"; + + ConversionEvent actualResponse = client.getConversionEvent(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 getConversionEventExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "properties/propertie-4144/conversionEvents/conversionEvent-4144"; + client.getConversionEvent(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteConversionEventTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + ConversionEventName name = ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]"); + + client.deleteConversionEvent(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteConversionEventExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ConversionEventName name = ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]"); + client.deleteConversionEvent(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteConversionEventTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = "properties/propertie-4144/conversionEvents/conversionEvent-4144"; + + client.deleteConversionEvent(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteConversionEventExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "properties/propertie-4144/conversionEvents/conversionEvent-4144"; + client.deleteConversionEvent(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listConversionEventsTest() throws Exception { + ConversionEvent responsesElement = ConversionEvent.newBuilder().build(); + ListConversionEventsResponse expectedResponse = + ListConversionEventsResponse.newBuilder() + .setNextPageToken("") + .addAllConversionEvents(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + PropertyName parent = PropertyName.of("[PROPERTY]"); + + ListConversionEventsPagedResponse pagedListResponse = client.listConversionEvents(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getConversionEventsList().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 listConversionEventsExceptionTest() 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.listConversionEvents(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listConversionEventsTest2() throws Exception { + ConversionEvent responsesElement = ConversionEvent.newBuilder().build(); + ListConversionEventsResponse expectedResponse = + ListConversionEventsResponse.newBuilder() + .setNextPageToken("") + .addAllConversionEvents(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "properties/propertie-2024"; + + ListConversionEventsPagedResponse pagedListResponse = client.listConversionEvents(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getConversionEventsList().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 listConversionEventsExceptionTest2() 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.listConversionEvents(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createCustomDimensionTest() throws Exception { + CustomDimension expectedResponse = + CustomDimension.newBuilder() + .setName(CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]").toString()) + .setParameterName("parameterName-379607596") + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDisallowAdsPersonalization(true) + .build(); + mockService.addResponse(expectedResponse); + + PropertyName parent = PropertyName.of("[PROPERTY]"); + CustomDimension customDimension = CustomDimension.newBuilder().build(); + + CustomDimension actualResponse = client.createCustomDimension(parent, customDimension); + 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 createCustomDimensionExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PropertyName parent = PropertyName.of("[PROPERTY]"); + CustomDimension customDimension = CustomDimension.newBuilder().build(); + client.createCustomDimension(parent, customDimension); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createCustomDimensionTest2() throws Exception { + CustomDimension expectedResponse = + CustomDimension.newBuilder() + .setName(CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]").toString()) + .setParameterName("parameterName-379607596") + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDisallowAdsPersonalization(true) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "properties/propertie-2024"; + CustomDimension customDimension = CustomDimension.newBuilder().build(); + + CustomDimension actualResponse = client.createCustomDimension(parent, customDimension); + 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 createCustomDimensionExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "properties/propertie-2024"; + CustomDimension customDimension = CustomDimension.newBuilder().build(); + client.createCustomDimension(parent, customDimension); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateCustomDimensionTest() throws Exception { + CustomDimension expectedResponse = + CustomDimension.newBuilder() + .setName(CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]").toString()) + .setParameterName("parameterName-379607596") + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDisallowAdsPersonalization(true) + .build(); + mockService.addResponse(expectedResponse); + + CustomDimension customDimension = + CustomDimension.newBuilder() + .setName(CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]").toString()) + .setParameterName("parameterName-379607596") + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDisallowAdsPersonalization(true) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + CustomDimension actualResponse = client.updateCustomDimension(customDimension, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateCustomDimensionExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + CustomDimension customDimension = + CustomDimension.newBuilder() + .setName(CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]").toString()) + .setParameterName("parameterName-379607596") + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDisallowAdsPersonalization(true) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateCustomDimension(customDimension, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listCustomDimensionsTest() throws Exception { + CustomDimension responsesElement = CustomDimension.newBuilder().build(); + ListCustomDimensionsResponse expectedResponse = + ListCustomDimensionsResponse.newBuilder() + .setNextPageToken("") + .addAllCustomDimensions(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + PropertyName parent = PropertyName.of("[PROPERTY]"); + + ListCustomDimensionsPagedResponse pagedListResponse = client.listCustomDimensions(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getCustomDimensionsList().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 listCustomDimensionsExceptionTest() 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.listCustomDimensions(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listCustomDimensionsTest2() throws Exception { + CustomDimension responsesElement = CustomDimension.newBuilder().build(); + ListCustomDimensionsResponse expectedResponse = + ListCustomDimensionsResponse.newBuilder() + .setNextPageToken("") + .addAllCustomDimensions(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "properties/propertie-2024"; + + ListCustomDimensionsPagedResponse pagedListResponse = client.listCustomDimensions(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getCustomDimensionsList().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 listCustomDimensionsExceptionTest2() 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.listCustomDimensions(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void archiveCustomDimensionTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + CustomDimensionName name = CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]"); + + client.archiveCustomDimension(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void archiveCustomDimensionExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + CustomDimensionName name = CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]"); + client.archiveCustomDimension(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void archiveCustomDimensionTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = "properties/propertie-447/customDimensions/customDimension-447"; + + client.archiveCustomDimension(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void archiveCustomDimensionExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "properties/propertie-447/customDimensions/customDimension-447"; + client.archiveCustomDimension(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getCustomDimensionTest() throws Exception { + CustomDimension expectedResponse = + CustomDimension.newBuilder() + .setName(CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]").toString()) + .setParameterName("parameterName-379607596") + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDisallowAdsPersonalization(true) + .build(); + mockService.addResponse(expectedResponse); + + CustomDimensionName name = CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]"); + + CustomDimension actualResponse = client.getCustomDimension(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 getCustomDimensionExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + CustomDimensionName name = CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]"); + client.getCustomDimension(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getCustomDimensionTest2() throws Exception { + CustomDimension expectedResponse = + CustomDimension.newBuilder() + .setName(CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]").toString()) + .setParameterName("parameterName-379607596") + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDisallowAdsPersonalization(true) + .build(); + mockService.addResponse(expectedResponse); + + String name = "properties/propertie-447/customDimensions/customDimension-447"; + + CustomDimension actualResponse = client.getCustomDimension(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 getCustomDimensionExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "properties/propertie-447/customDimensions/customDimension-447"; + client.getCustomDimension(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createCustomMetricTest() throws Exception { + CustomMetric expectedResponse = + CustomMetric.newBuilder() + .setName(CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]").toString()) + .setParameterName("parameterName-379607596") + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllRestrictedMetricType(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + PropertyName parent = PropertyName.of("[PROPERTY]"); + CustomMetric customMetric = CustomMetric.newBuilder().build(); + + CustomMetric actualResponse = client.createCustomMetric(parent, customMetric); + 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 createCustomMetricExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PropertyName parent = PropertyName.of("[PROPERTY]"); + CustomMetric customMetric = CustomMetric.newBuilder().build(); + client.createCustomMetric(parent, customMetric); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createCustomMetricTest2() throws Exception { + CustomMetric expectedResponse = + CustomMetric.newBuilder() + .setName(CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]").toString()) + .setParameterName("parameterName-379607596") + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllRestrictedMetricType(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "properties/propertie-2024"; + CustomMetric customMetric = CustomMetric.newBuilder().build(); + + CustomMetric actualResponse = client.createCustomMetric(parent, customMetric); + 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 createCustomMetricExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "properties/propertie-2024"; + CustomMetric customMetric = CustomMetric.newBuilder().build(); + client.createCustomMetric(parent, customMetric); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateCustomMetricTest() throws Exception { + CustomMetric expectedResponse = + CustomMetric.newBuilder() + .setName(CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]").toString()) + .setParameterName("parameterName-379607596") + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllRestrictedMetricType(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + CustomMetric customMetric = + CustomMetric.newBuilder() + .setName(CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]").toString()) + .setParameterName("parameterName-379607596") + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllRestrictedMetricType(new ArrayList()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + CustomMetric actualResponse = client.updateCustomMetric(customMetric, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateCustomMetricExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + CustomMetric customMetric = + CustomMetric.newBuilder() + .setName(CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]").toString()) + .setParameterName("parameterName-379607596") + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllRestrictedMetricType(new ArrayList()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateCustomMetric(customMetric, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listCustomMetricsTest() throws Exception { + CustomMetric responsesElement = CustomMetric.newBuilder().build(); + ListCustomMetricsResponse expectedResponse = + ListCustomMetricsResponse.newBuilder() + .setNextPageToken("") + .addAllCustomMetrics(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + PropertyName parent = PropertyName.of("[PROPERTY]"); + + ListCustomMetricsPagedResponse pagedListResponse = client.listCustomMetrics(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getCustomMetricsList().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 listCustomMetricsExceptionTest() 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.listCustomMetrics(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listCustomMetricsTest2() throws Exception { + CustomMetric responsesElement = CustomMetric.newBuilder().build(); + ListCustomMetricsResponse expectedResponse = + ListCustomMetricsResponse.newBuilder() + .setNextPageToken("") + .addAllCustomMetrics(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "properties/propertie-2024"; + + ListCustomMetricsPagedResponse pagedListResponse = client.listCustomMetrics(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getCustomMetricsList().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 listCustomMetricsExceptionTest2() 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.listCustomMetrics(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void archiveCustomMetricTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + CustomMetricName name = CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]"); + + client.archiveCustomMetric(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void archiveCustomMetricExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + CustomMetricName name = CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]"); + client.archiveCustomMetric(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void archiveCustomMetricTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = "properties/propertie-2999/customMetrics/customMetric-2999"; + + client.archiveCustomMetric(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void archiveCustomMetricExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "properties/propertie-2999/customMetrics/customMetric-2999"; + client.archiveCustomMetric(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getCustomMetricTest() throws Exception { + CustomMetric expectedResponse = + CustomMetric.newBuilder() + .setName(CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]").toString()) + .setParameterName("parameterName-379607596") + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllRestrictedMetricType(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + CustomMetricName name = CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]"); + + CustomMetric actualResponse = client.getCustomMetric(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 getCustomMetricExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + CustomMetricName name = CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]"); + client.getCustomMetric(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getCustomMetricTest2() throws Exception { + CustomMetric expectedResponse = + CustomMetric.newBuilder() + .setName(CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]").toString()) + .setParameterName("parameterName-379607596") + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllRestrictedMetricType(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "properties/propertie-2999/customMetrics/customMetric-2999"; + + CustomMetric actualResponse = client.getCustomMetric(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 getCustomMetricExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "properties/propertie-2999/customMetrics/customMetric-2999"; + client.getCustomMetric(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDataRetentionSettingsTest() throws Exception { + DataRetentionSettings expectedResponse = + DataRetentionSettings.newBuilder() + .setName(DataRetentionSettingsName.of("[PROPERTY]").toString()) + .setResetUserDataOnNewActivity(true) + .build(); + mockService.addResponse(expectedResponse); + + DataRetentionSettingsName name = DataRetentionSettingsName.of("[PROPERTY]"); + + DataRetentionSettings actualResponse = client.getDataRetentionSettings(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 getDataRetentionSettingsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DataRetentionSettingsName name = DataRetentionSettingsName.of("[PROPERTY]"); + client.getDataRetentionSettings(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDataRetentionSettingsTest2() throws Exception { + DataRetentionSettings expectedResponse = + DataRetentionSettings.newBuilder() + .setName(DataRetentionSettingsName.of("[PROPERTY]").toString()) + .setResetUserDataOnNewActivity(true) + .build(); + mockService.addResponse(expectedResponse); + + String name = "properties/propertie-2463/dataRetentionSettings"; + + DataRetentionSettings actualResponse = client.getDataRetentionSettings(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 getDataRetentionSettingsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "properties/propertie-2463/dataRetentionSettings"; + client.getDataRetentionSettings(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateDataRetentionSettingsTest() throws Exception { + DataRetentionSettings expectedResponse = + DataRetentionSettings.newBuilder() + .setName(DataRetentionSettingsName.of("[PROPERTY]").toString()) + .setResetUserDataOnNewActivity(true) + .build(); + mockService.addResponse(expectedResponse); + + DataRetentionSettings dataRetentionSettings = + DataRetentionSettings.newBuilder() + .setName(DataRetentionSettingsName.of("[PROPERTY]").toString()) + .setResetUserDataOnNewActivity(true) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + DataRetentionSettings actualResponse = + client.updateDataRetentionSettings(dataRetentionSettings, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateDataRetentionSettingsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DataRetentionSettings dataRetentionSettings = + DataRetentionSettings.newBuilder() + .setName(DataRetentionSettingsName.of("[PROPERTY]").toString()) + .setResetUserDataOnNewActivity(true) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateDataRetentionSettings(dataRetentionSettings, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createDataStreamTest() throws Exception { + DataStream expectedResponse = + DataStream.newBuilder() + .setName(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + PropertyName parent = PropertyName.of("[PROPERTY]"); + DataStream dataStream = DataStream.newBuilder().build(); + + DataStream actualResponse = client.createDataStream(parent, dataStream); + 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 createDataStreamExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PropertyName parent = PropertyName.of("[PROPERTY]"); + DataStream dataStream = DataStream.newBuilder().build(); + client.createDataStream(parent, dataStream); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createDataStreamTest2() throws Exception { + DataStream expectedResponse = + DataStream.newBuilder() + .setName(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "properties/propertie-2024"; + DataStream dataStream = DataStream.newBuilder().build(); + + DataStream actualResponse = client.createDataStream(parent, dataStream); + 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 createDataStreamExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "properties/propertie-2024"; + DataStream dataStream = DataStream.newBuilder().build(); + client.createDataStream(parent, dataStream); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteDataStreamTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + DataStreamName name = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); + + client.deleteDataStream(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteDataStreamExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DataStreamName name = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); + client.deleteDataStream(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteDataStreamTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = "properties/propertie-9806/dataStreams/dataStream-9806"; + + client.deleteDataStream(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteDataStreamExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "properties/propertie-9806/dataStreams/dataStream-9806"; + client.deleteDataStream(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateDataStreamTest() throws Exception { + DataStream expectedResponse = + DataStream.newBuilder() + .setName(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + DataStream dataStream = + DataStream.newBuilder() + .setName(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + DataStream actualResponse = client.updateDataStream(dataStream, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateDataStreamExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DataStream dataStream = + DataStream.newBuilder() + .setName(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateDataStream(dataStream, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDataStreamsTest() throws Exception { + DataStream responsesElement = DataStream.newBuilder().build(); + ListDataStreamsResponse expectedResponse = + ListDataStreamsResponse.newBuilder() + .setNextPageToken("") + .addAllDataStreams(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + PropertyName parent = PropertyName.of("[PROPERTY]"); + + ListDataStreamsPagedResponse pagedListResponse = client.listDataStreams(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDataStreamsList().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 listDataStreamsExceptionTest() 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.listDataStreams(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDataStreamsTest2() throws Exception { + DataStream responsesElement = DataStream.newBuilder().build(); + ListDataStreamsResponse expectedResponse = + ListDataStreamsResponse.newBuilder() + .setNextPageToken("") + .addAllDataStreams(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "properties/propertie-2024"; + + ListDataStreamsPagedResponse pagedListResponse = client.listDataStreams(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDataStreamsList().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 listDataStreamsExceptionTest2() 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.listDataStreams(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDataStreamTest() throws Exception { + DataStream expectedResponse = + DataStream.newBuilder() + .setName(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + DataStreamName name = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); + + DataStream actualResponse = client.getDataStream(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 getDataStreamExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DataStreamName name = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); + client.getDataStream(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDataStreamTest2() throws Exception { + DataStream expectedResponse = + DataStream.newBuilder() + .setName(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "properties/propertie-9806/dataStreams/dataStream-9806"; + + DataStream actualResponse = client.getDataStream(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 getDataStreamExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "properties/propertie-9806/dataStreams/dataStream-9806"; + client.getDataStream(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-analytics-admin/google-analytics-admin/src/test/java/com/google/analytics/admin/v1beta/AnalyticsAdminServiceClientTest.java b/java-analytics-admin/google-analytics-admin/src/test/java/com/google/analytics/admin/v1beta/AnalyticsAdminServiceClientTest.java new file mode 100644 index 000000000000..fafaf453731c --- /dev/null +++ b/java-analytics-admin/google-analytics-admin/src/test/java/com/google/analytics/admin/v1beta/AnalyticsAdminServiceClientTest.java @@ -0,0 +1,3563 @@ +/* + * Copyright 2022 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.admin.v1beta; + +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListAccountSummariesPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListAccountsPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListConversionEventsPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListCustomDimensionsPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListCustomMetricsPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListDataStreamsPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListFirebaseLinksPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListGoogleAdsLinksPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListMeasurementProtocolSecretsPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.ListPropertiesPagedResponse; +import static com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient.SearchChangeHistoryEventsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.common.collect.Lists; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.BoolValue; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class AnalyticsAdminServiceClientTest { + private static MockAnalyticsAdminService mockAnalyticsAdminService; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private AnalyticsAdminServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockAnalyticsAdminService = new MockAnalyticsAdminService(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockAnalyticsAdminService)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + AnalyticsAdminServiceSettings settings = + AnalyticsAdminServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = AnalyticsAdminServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void getAccountTest() throws Exception { + Account expectedResponse = + Account.newBuilder() + .setName(AccountName.of("[ACCOUNT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setRegionCode("regionCode-1991004415") + .setDeleted(true) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + AccountName name = AccountName.of("[ACCOUNT]"); + + Account actualResponse = client.getAccount(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetAccountRequest actualRequest = ((GetAccountRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getAccountExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + AccountName name = AccountName.of("[ACCOUNT]"); + client.getAccount(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAccountTest2() throws Exception { + Account expectedResponse = + Account.newBuilder() + .setName(AccountName.of("[ACCOUNT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setRegionCode("regionCode-1991004415") + .setDeleted(true) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + String name = "name3373707"; + + Account actualResponse = client.getAccount(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetAccountRequest actualRequest = ((GetAccountRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getAccountExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + String name = "name3373707"; + client.getAccount(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAccountsTest() throws Exception { + Account responsesElement = Account.newBuilder().build(); + ListAccountsResponse expectedResponse = + ListAccountsResponse.newBuilder() + .setNextPageToken("") + .addAllAccounts(Arrays.asList(responsesElement)) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + ListAccountsRequest request = + ListAccountsRequest.newBuilder() + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setShowDeleted(true) + .build(); + + ListAccountsPagedResponse pagedListResponse = client.listAccounts(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAccountsList().get(0), resources.get(0)); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAccountsRequest actualRequest = ((ListAccountsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertEquals(request.getShowDeleted(), actualRequest.getShowDeleted()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAccountsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + ListAccountsRequest request = + ListAccountsRequest.newBuilder() + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setShowDeleted(true) + .build(); + client.listAccounts(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteAccountTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + AccountName name = AccountName.of("[ACCOUNT]"); + + client.deleteAccount(name); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteAccountRequest actualRequest = ((DeleteAccountRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteAccountExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + AccountName name = AccountName.of("[ACCOUNT]"); + client.deleteAccount(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteAccountTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteAccount(name); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteAccountRequest actualRequest = ((DeleteAccountRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteAccountExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + String name = "name3373707"; + client.deleteAccount(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateAccountTest() throws Exception { + Account expectedResponse = + Account.newBuilder() + .setName(AccountName.of("[ACCOUNT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setRegionCode("regionCode-1991004415") + .setDeleted(true) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + Account account = Account.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Account actualResponse = client.updateAccount(account, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateAccountRequest actualRequest = ((UpdateAccountRequest) actualRequests.get(0)); + + Assert.assertEquals(account, actualRequest.getAccount()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateAccountExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + Account account = Account.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateAccount(account, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void provisionAccountTicketTest() throws Exception { + ProvisionAccountTicketResponse expectedResponse = + ProvisionAccountTicketResponse.newBuilder() + .setAccountTicketId("accountTicketId-1576709484") + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + ProvisionAccountTicketRequest request = + ProvisionAccountTicketRequest.newBuilder() + .setAccount(Account.newBuilder().build()) + .setRedirectUri("redirectUri1970337776") + .build(); + + ProvisionAccountTicketResponse actualResponse = client.provisionAccountTicket(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ProvisionAccountTicketRequest actualRequest = + ((ProvisionAccountTicketRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getAccount(), actualRequest.getAccount()); + Assert.assertEquals(request.getRedirectUri(), actualRequest.getRedirectUri()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void provisionAccountTicketExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + ProvisionAccountTicketRequest request = + ProvisionAccountTicketRequest.newBuilder() + .setAccount(Account.newBuilder().build()) + .setRedirectUri("redirectUri1970337776") + .build(); + client.provisionAccountTicket(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAccountSummariesTest() throws Exception { + AccountSummary responsesElement = AccountSummary.newBuilder().build(); + ListAccountSummariesResponse expectedResponse = + ListAccountSummariesResponse.newBuilder() + .setNextPageToken("") + .addAllAccountSummaries(Arrays.asList(responsesElement)) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + ListAccountSummariesRequest request = + ListAccountSummariesRequest.newBuilder() + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListAccountSummariesPagedResponse pagedListResponse = client.listAccountSummaries(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAccountSummariesList().get(0), resources.get(0)); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAccountSummariesRequest actualRequest = + ((ListAccountSummariesRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAccountSummariesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + ListAccountSummariesRequest request = + ListAccountSummariesRequest.newBuilder() + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listAccountSummaries(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getPropertyTest() throws Exception { + Property expectedResponse = + Property.newBuilder() + .setName(PropertyName.of("[PROPERTY]").toString()) + .setPropertyType(PropertyType.forNumber(0)) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setParent("parent-995424086") + .setDisplayName("displayName1714148973") + .setIndustryCategory(IndustryCategory.forNumber(0)) + .setTimeZone("timeZone-2077180903") + .setCurrencyCode("currencyCode1004773790") + .setServiceLevel(ServiceLevel.forNumber(0)) + .setDeleteTime(Timestamp.newBuilder().build()) + .setExpireTime(Timestamp.newBuilder().build()) + .setAccount(AccountName.of("[ACCOUNT]").toString()) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + PropertyName name = PropertyName.of("[PROPERTY]"); + + Property actualResponse = client.getProperty(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetPropertyRequest actualRequest = ((GetPropertyRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getPropertyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + PropertyName name = PropertyName.of("[PROPERTY]"); + client.getProperty(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getPropertyTest2() throws Exception { + Property expectedResponse = + Property.newBuilder() + .setName(PropertyName.of("[PROPERTY]").toString()) + .setPropertyType(PropertyType.forNumber(0)) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setParent("parent-995424086") + .setDisplayName("displayName1714148973") + .setIndustryCategory(IndustryCategory.forNumber(0)) + .setTimeZone("timeZone-2077180903") + .setCurrencyCode("currencyCode1004773790") + .setServiceLevel(ServiceLevel.forNumber(0)) + .setDeleteTime(Timestamp.newBuilder().build()) + .setExpireTime(Timestamp.newBuilder().build()) + .setAccount(AccountName.of("[ACCOUNT]").toString()) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + String name = "name3373707"; + + Property actualResponse = client.getProperty(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetPropertyRequest actualRequest = ((GetPropertyRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getPropertyExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + String name = "name3373707"; + client.getProperty(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listPropertiesTest() throws Exception { + Property responsesElement = Property.newBuilder().build(); + ListPropertiesResponse expectedResponse = + ListPropertiesResponse.newBuilder() + .setNextPageToken("") + .addAllProperties(Arrays.asList(responsesElement)) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + ListPropertiesRequest request = + ListPropertiesRequest.newBuilder() + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setShowDeleted(true) + .build(); + + ListPropertiesPagedResponse pagedListResponse = client.listProperties(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPropertiesList().get(0), resources.get(0)); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListPropertiesRequest actualRequest = ((ListPropertiesRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertEquals(request.getShowDeleted(), actualRequest.getShowDeleted()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listPropertiesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + ListPropertiesRequest request = + ListPropertiesRequest.newBuilder() + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setShowDeleted(true) + .build(); + client.listProperties(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createPropertyTest() throws Exception { + Property expectedResponse = + Property.newBuilder() + .setName(PropertyName.of("[PROPERTY]").toString()) + .setPropertyType(PropertyType.forNumber(0)) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setParent("parent-995424086") + .setDisplayName("displayName1714148973") + .setIndustryCategory(IndustryCategory.forNumber(0)) + .setTimeZone("timeZone-2077180903") + .setCurrencyCode("currencyCode1004773790") + .setServiceLevel(ServiceLevel.forNumber(0)) + .setDeleteTime(Timestamp.newBuilder().build()) + .setExpireTime(Timestamp.newBuilder().build()) + .setAccount(AccountName.of("[ACCOUNT]").toString()) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + Property property = Property.newBuilder().build(); + + Property actualResponse = client.createProperty(property); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreatePropertyRequest actualRequest = ((CreatePropertyRequest) actualRequests.get(0)); + + Assert.assertEquals(property, actualRequest.getProperty()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createPropertyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + Property property = Property.newBuilder().build(); + client.createProperty(property); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deletePropertyTest() throws Exception { + Property expectedResponse = + Property.newBuilder() + .setName(PropertyName.of("[PROPERTY]").toString()) + .setPropertyType(PropertyType.forNumber(0)) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setParent("parent-995424086") + .setDisplayName("displayName1714148973") + .setIndustryCategory(IndustryCategory.forNumber(0)) + .setTimeZone("timeZone-2077180903") + .setCurrencyCode("currencyCode1004773790") + .setServiceLevel(ServiceLevel.forNumber(0)) + .setDeleteTime(Timestamp.newBuilder().build()) + .setExpireTime(Timestamp.newBuilder().build()) + .setAccount(AccountName.of("[ACCOUNT]").toString()) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + PropertyName name = PropertyName.of("[PROPERTY]"); + + Property actualResponse = client.deleteProperty(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeletePropertyRequest actualRequest = ((DeletePropertyRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deletePropertyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + PropertyName name = PropertyName.of("[PROPERTY]"); + client.deleteProperty(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deletePropertyTest2() throws Exception { + Property expectedResponse = + Property.newBuilder() + .setName(PropertyName.of("[PROPERTY]").toString()) + .setPropertyType(PropertyType.forNumber(0)) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setParent("parent-995424086") + .setDisplayName("displayName1714148973") + .setIndustryCategory(IndustryCategory.forNumber(0)) + .setTimeZone("timeZone-2077180903") + .setCurrencyCode("currencyCode1004773790") + .setServiceLevel(ServiceLevel.forNumber(0)) + .setDeleteTime(Timestamp.newBuilder().build()) + .setExpireTime(Timestamp.newBuilder().build()) + .setAccount(AccountName.of("[ACCOUNT]").toString()) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + String name = "name3373707"; + + Property actualResponse = client.deleteProperty(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeletePropertyRequest actualRequest = ((DeletePropertyRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deletePropertyExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + String name = "name3373707"; + client.deleteProperty(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updatePropertyTest() throws Exception { + Property expectedResponse = + Property.newBuilder() + .setName(PropertyName.of("[PROPERTY]").toString()) + .setPropertyType(PropertyType.forNumber(0)) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setParent("parent-995424086") + .setDisplayName("displayName1714148973") + .setIndustryCategory(IndustryCategory.forNumber(0)) + .setTimeZone("timeZone-2077180903") + .setCurrencyCode("currencyCode1004773790") + .setServiceLevel(ServiceLevel.forNumber(0)) + .setDeleteTime(Timestamp.newBuilder().build()) + .setExpireTime(Timestamp.newBuilder().build()) + .setAccount(AccountName.of("[ACCOUNT]").toString()) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + Property property = Property.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Property actualResponse = client.updateProperty(property, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdatePropertyRequest actualRequest = ((UpdatePropertyRequest) actualRequests.get(0)); + + Assert.assertEquals(property, actualRequest.getProperty()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updatePropertyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + Property property = Property.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateProperty(property, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createFirebaseLinkTest() throws Exception { + FirebaseLink expectedResponse = + FirebaseLink.newBuilder() + .setName(FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]").toString()) + .setProject("project-309310695") + .setCreateTime(Timestamp.newBuilder().build()) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + PropertyName parent = PropertyName.of("[PROPERTY]"); + FirebaseLink firebaseLink = FirebaseLink.newBuilder().build(); + + FirebaseLink actualResponse = client.createFirebaseLink(parent, firebaseLink); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateFirebaseLinkRequest actualRequest = ((CreateFirebaseLinkRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(firebaseLink, actualRequest.getFirebaseLink()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createFirebaseLinkExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + PropertyName parent = PropertyName.of("[PROPERTY]"); + FirebaseLink firebaseLink = FirebaseLink.newBuilder().build(); + client.createFirebaseLink(parent, firebaseLink); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createFirebaseLinkTest2() throws Exception { + FirebaseLink expectedResponse = + FirebaseLink.newBuilder() + .setName(FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]").toString()) + .setProject("project-309310695") + .setCreateTime(Timestamp.newBuilder().build()) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + FirebaseLink firebaseLink = FirebaseLink.newBuilder().build(); + + FirebaseLink actualResponse = client.createFirebaseLink(parent, firebaseLink); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateFirebaseLinkRequest actualRequest = ((CreateFirebaseLinkRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(firebaseLink, actualRequest.getFirebaseLink()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createFirebaseLinkExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + String parent = "parent-995424086"; + FirebaseLink firebaseLink = FirebaseLink.newBuilder().build(); + client.createFirebaseLink(parent, firebaseLink); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteFirebaseLinkTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + FirebaseLinkName name = FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]"); + + client.deleteFirebaseLink(name); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteFirebaseLinkRequest actualRequest = ((DeleteFirebaseLinkRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteFirebaseLinkExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + FirebaseLinkName name = FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]"); + client.deleteFirebaseLink(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteFirebaseLinkTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteFirebaseLink(name); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteFirebaseLinkRequest actualRequest = ((DeleteFirebaseLinkRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteFirebaseLinkExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + String name = "name3373707"; + client.deleteFirebaseLink(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listFirebaseLinksTest() throws Exception { + FirebaseLink responsesElement = FirebaseLink.newBuilder().build(); + ListFirebaseLinksResponse expectedResponse = + ListFirebaseLinksResponse.newBuilder() + .setNextPageToken("") + .addAllFirebaseLinks(Arrays.asList(responsesElement)) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + PropertyName parent = PropertyName.of("[PROPERTY]"); + + ListFirebaseLinksPagedResponse pagedListResponse = client.listFirebaseLinks(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getFirebaseLinksList().get(0), resources.get(0)); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListFirebaseLinksRequest actualRequest = ((ListFirebaseLinksRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listFirebaseLinksExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + PropertyName parent = PropertyName.of("[PROPERTY]"); + client.listFirebaseLinks(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listFirebaseLinksTest2() throws Exception { + FirebaseLink responsesElement = FirebaseLink.newBuilder().build(); + ListFirebaseLinksResponse expectedResponse = + ListFirebaseLinksResponse.newBuilder() + .setNextPageToken("") + .addAllFirebaseLinks(Arrays.asList(responsesElement)) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListFirebaseLinksPagedResponse pagedListResponse = client.listFirebaseLinks(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getFirebaseLinksList().get(0), resources.get(0)); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListFirebaseLinksRequest actualRequest = ((ListFirebaseLinksRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listFirebaseLinksExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listFirebaseLinks(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createGoogleAdsLinkTest() throws Exception { + GoogleAdsLink expectedResponse = + GoogleAdsLink.newBuilder() + .setName(GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]").toString()) + .setCustomerId("customerId-1581184615") + .setCanManageClients(true) + .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setCreatorEmailAddress("creatorEmailAddress67752708") + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + PropertyName parent = PropertyName.of("[PROPERTY]"); + GoogleAdsLink googleAdsLink = GoogleAdsLink.newBuilder().build(); + + GoogleAdsLink actualResponse = client.createGoogleAdsLink(parent, googleAdsLink); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateGoogleAdsLinkRequest actualRequest = ((CreateGoogleAdsLinkRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(googleAdsLink, actualRequest.getGoogleAdsLink()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createGoogleAdsLinkExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + PropertyName parent = PropertyName.of("[PROPERTY]"); + GoogleAdsLink googleAdsLink = GoogleAdsLink.newBuilder().build(); + client.createGoogleAdsLink(parent, googleAdsLink); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createGoogleAdsLinkTest2() throws Exception { + GoogleAdsLink expectedResponse = + GoogleAdsLink.newBuilder() + .setName(GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]").toString()) + .setCustomerId("customerId-1581184615") + .setCanManageClients(true) + .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setCreatorEmailAddress("creatorEmailAddress67752708") + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + GoogleAdsLink googleAdsLink = GoogleAdsLink.newBuilder().build(); + + GoogleAdsLink actualResponse = client.createGoogleAdsLink(parent, googleAdsLink); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateGoogleAdsLinkRequest actualRequest = ((CreateGoogleAdsLinkRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(googleAdsLink, actualRequest.getGoogleAdsLink()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createGoogleAdsLinkExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + String parent = "parent-995424086"; + GoogleAdsLink googleAdsLink = GoogleAdsLink.newBuilder().build(); + client.createGoogleAdsLink(parent, googleAdsLink); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateGoogleAdsLinkTest() throws Exception { + GoogleAdsLink expectedResponse = + GoogleAdsLink.newBuilder() + .setName(GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]").toString()) + .setCustomerId("customerId-1581184615") + .setCanManageClients(true) + .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setCreatorEmailAddress("creatorEmailAddress67752708") + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + GoogleAdsLink googleAdsLink = GoogleAdsLink.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + GoogleAdsLink actualResponse = client.updateGoogleAdsLink(googleAdsLink, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateGoogleAdsLinkRequest actualRequest = ((UpdateGoogleAdsLinkRequest) actualRequests.get(0)); + + Assert.assertEquals(googleAdsLink, actualRequest.getGoogleAdsLink()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateGoogleAdsLinkExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + GoogleAdsLink googleAdsLink = GoogleAdsLink.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateGoogleAdsLink(googleAdsLink, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteGoogleAdsLinkTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + GoogleAdsLinkName name = GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]"); + + client.deleteGoogleAdsLink(name); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteGoogleAdsLinkRequest actualRequest = ((DeleteGoogleAdsLinkRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteGoogleAdsLinkExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + GoogleAdsLinkName name = GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]"); + client.deleteGoogleAdsLink(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteGoogleAdsLinkTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteGoogleAdsLink(name); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteGoogleAdsLinkRequest actualRequest = ((DeleteGoogleAdsLinkRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteGoogleAdsLinkExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + String name = "name3373707"; + client.deleteGoogleAdsLink(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listGoogleAdsLinksTest() throws Exception { + GoogleAdsLink responsesElement = GoogleAdsLink.newBuilder().build(); + ListGoogleAdsLinksResponse expectedResponse = + ListGoogleAdsLinksResponse.newBuilder() + .setNextPageToken("") + .addAllGoogleAdsLinks(Arrays.asList(responsesElement)) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + PropertyName parent = PropertyName.of("[PROPERTY]"); + + ListGoogleAdsLinksPagedResponse pagedListResponse = client.listGoogleAdsLinks(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getGoogleAdsLinksList().get(0), resources.get(0)); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListGoogleAdsLinksRequest actualRequest = ((ListGoogleAdsLinksRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listGoogleAdsLinksExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + PropertyName parent = PropertyName.of("[PROPERTY]"); + client.listGoogleAdsLinks(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listGoogleAdsLinksTest2() throws Exception { + GoogleAdsLink responsesElement = GoogleAdsLink.newBuilder().build(); + ListGoogleAdsLinksResponse expectedResponse = + ListGoogleAdsLinksResponse.newBuilder() + .setNextPageToken("") + .addAllGoogleAdsLinks(Arrays.asList(responsesElement)) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListGoogleAdsLinksPagedResponse pagedListResponse = client.listGoogleAdsLinks(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getGoogleAdsLinksList().get(0), resources.get(0)); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListGoogleAdsLinksRequest actualRequest = ((ListGoogleAdsLinksRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listGoogleAdsLinksExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listGoogleAdsLinks(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDataSharingSettingsTest() throws Exception { + DataSharingSettings expectedResponse = + DataSharingSettings.newBuilder() + .setName(DataSharingSettingsName.of("[ACCOUNT]").toString()) + .setSharingWithGoogleSupportEnabled(true) + .setSharingWithGoogleAssignedSalesEnabled(true) + .setSharingWithGoogleAnySalesEnabled(true) + .setSharingWithGoogleProductsEnabled(true) + .setSharingWithOthersEnabled(true) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + DataSharingSettingsName name = DataSharingSettingsName.of("[ACCOUNT]"); + + DataSharingSettings actualResponse = client.getDataSharingSettings(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetDataSharingSettingsRequest actualRequest = + ((GetDataSharingSettingsRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getDataSharingSettingsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + DataSharingSettingsName name = DataSharingSettingsName.of("[ACCOUNT]"); + client.getDataSharingSettings(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDataSharingSettingsTest2() throws Exception { + DataSharingSettings expectedResponse = + DataSharingSettings.newBuilder() + .setName(DataSharingSettingsName.of("[ACCOUNT]").toString()) + .setSharingWithGoogleSupportEnabled(true) + .setSharingWithGoogleAssignedSalesEnabled(true) + .setSharingWithGoogleAnySalesEnabled(true) + .setSharingWithGoogleProductsEnabled(true) + .setSharingWithOthersEnabled(true) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + String name = "name3373707"; + + DataSharingSettings actualResponse = client.getDataSharingSettings(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetDataSharingSettingsRequest actualRequest = + ((GetDataSharingSettingsRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getDataSharingSettingsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + String name = "name3373707"; + client.getDataSharingSettings(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getMeasurementProtocolSecretTest() throws Exception { + MeasurementProtocolSecret expectedResponse = + MeasurementProtocolSecret.newBuilder() + .setName( + MeasurementProtocolSecretName.of( + "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]") + .toString()) + .setDisplayName("displayName1714148973") + .setSecretValue("secretValue-2044460895") + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + MeasurementProtocolSecretName name = + MeasurementProtocolSecretName.of( + "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]"); + + MeasurementProtocolSecret actualResponse = client.getMeasurementProtocolSecret(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetMeasurementProtocolSecretRequest actualRequest = + ((GetMeasurementProtocolSecretRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getMeasurementProtocolSecretExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + MeasurementProtocolSecretName name = + MeasurementProtocolSecretName.of( + "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]"); + client.getMeasurementProtocolSecret(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getMeasurementProtocolSecretTest2() throws Exception { + MeasurementProtocolSecret expectedResponse = + MeasurementProtocolSecret.newBuilder() + .setName( + MeasurementProtocolSecretName.of( + "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]") + .toString()) + .setDisplayName("displayName1714148973") + .setSecretValue("secretValue-2044460895") + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + String name = "name3373707"; + + MeasurementProtocolSecret actualResponse = client.getMeasurementProtocolSecret(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetMeasurementProtocolSecretRequest actualRequest = + ((GetMeasurementProtocolSecretRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getMeasurementProtocolSecretExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + String name = "name3373707"; + client.getMeasurementProtocolSecret(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listMeasurementProtocolSecretsTest() throws Exception { + MeasurementProtocolSecret responsesElement = MeasurementProtocolSecret.newBuilder().build(); + ListMeasurementProtocolSecretsResponse expectedResponse = + ListMeasurementProtocolSecretsResponse.newBuilder() + .setNextPageToken("") + .addAllMeasurementProtocolSecrets(Arrays.asList(responsesElement)) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); + + ListMeasurementProtocolSecretsPagedResponse pagedListResponse = + client.listMeasurementProtocolSecrets(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals( + expectedResponse.getMeasurementProtocolSecretsList().get(0), resources.get(0)); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListMeasurementProtocolSecretsRequest actualRequest = + ((ListMeasurementProtocolSecretsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listMeasurementProtocolSecretsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); + client.listMeasurementProtocolSecrets(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listMeasurementProtocolSecretsTest2() throws Exception { + MeasurementProtocolSecret responsesElement = MeasurementProtocolSecret.newBuilder().build(); + ListMeasurementProtocolSecretsResponse expectedResponse = + ListMeasurementProtocolSecretsResponse.newBuilder() + .setNextPageToken("") + .addAllMeasurementProtocolSecrets(Arrays.asList(responsesElement)) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListMeasurementProtocolSecretsPagedResponse pagedListResponse = + client.listMeasurementProtocolSecrets(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals( + expectedResponse.getMeasurementProtocolSecretsList().get(0), resources.get(0)); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListMeasurementProtocolSecretsRequest actualRequest = + ((ListMeasurementProtocolSecretsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listMeasurementProtocolSecretsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listMeasurementProtocolSecrets(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createMeasurementProtocolSecretTest() throws Exception { + MeasurementProtocolSecret expectedResponse = + MeasurementProtocolSecret.newBuilder() + .setName( + MeasurementProtocolSecretName.of( + "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]") + .toString()) + .setDisplayName("displayName1714148973") + .setSecretValue("secretValue-2044460895") + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); + MeasurementProtocolSecret measurementProtocolSecret = + MeasurementProtocolSecret.newBuilder().build(); + + MeasurementProtocolSecret actualResponse = + client.createMeasurementProtocolSecret(parent, measurementProtocolSecret); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateMeasurementProtocolSecretRequest actualRequest = + ((CreateMeasurementProtocolSecretRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(measurementProtocolSecret, actualRequest.getMeasurementProtocolSecret()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createMeasurementProtocolSecretExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); + MeasurementProtocolSecret measurementProtocolSecret = + MeasurementProtocolSecret.newBuilder().build(); + client.createMeasurementProtocolSecret(parent, measurementProtocolSecret); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createMeasurementProtocolSecretTest2() throws Exception { + MeasurementProtocolSecret expectedResponse = + MeasurementProtocolSecret.newBuilder() + .setName( + MeasurementProtocolSecretName.of( + "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]") + .toString()) + .setDisplayName("displayName1714148973") + .setSecretValue("secretValue-2044460895") + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + MeasurementProtocolSecret measurementProtocolSecret = + MeasurementProtocolSecret.newBuilder().build(); + + MeasurementProtocolSecret actualResponse = + client.createMeasurementProtocolSecret(parent, measurementProtocolSecret); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateMeasurementProtocolSecretRequest actualRequest = + ((CreateMeasurementProtocolSecretRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(measurementProtocolSecret, actualRequest.getMeasurementProtocolSecret()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createMeasurementProtocolSecretExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + String parent = "parent-995424086"; + MeasurementProtocolSecret measurementProtocolSecret = + MeasurementProtocolSecret.newBuilder().build(); + client.createMeasurementProtocolSecret(parent, measurementProtocolSecret); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteMeasurementProtocolSecretTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + MeasurementProtocolSecretName name = + MeasurementProtocolSecretName.of( + "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]"); + + client.deleteMeasurementProtocolSecret(name); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteMeasurementProtocolSecretRequest actualRequest = + ((DeleteMeasurementProtocolSecretRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteMeasurementProtocolSecretExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + MeasurementProtocolSecretName name = + MeasurementProtocolSecretName.of( + "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]"); + client.deleteMeasurementProtocolSecret(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteMeasurementProtocolSecretTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteMeasurementProtocolSecret(name); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteMeasurementProtocolSecretRequest actualRequest = + ((DeleteMeasurementProtocolSecretRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteMeasurementProtocolSecretExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + String name = "name3373707"; + client.deleteMeasurementProtocolSecret(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateMeasurementProtocolSecretTest() throws Exception { + MeasurementProtocolSecret expectedResponse = + MeasurementProtocolSecret.newBuilder() + .setName( + MeasurementProtocolSecretName.of( + "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]") + .toString()) + .setDisplayName("displayName1714148973") + .setSecretValue("secretValue-2044460895") + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + MeasurementProtocolSecret measurementProtocolSecret = + MeasurementProtocolSecret.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + MeasurementProtocolSecret actualResponse = + client.updateMeasurementProtocolSecret(measurementProtocolSecret, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateMeasurementProtocolSecretRequest actualRequest = + ((UpdateMeasurementProtocolSecretRequest) actualRequests.get(0)); + + Assert.assertEquals(measurementProtocolSecret, actualRequest.getMeasurementProtocolSecret()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateMeasurementProtocolSecretExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + MeasurementProtocolSecret measurementProtocolSecret = + MeasurementProtocolSecret.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateMeasurementProtocolSecret(measurementProtocolSecret, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void acknowledgeUserDataCollectionTest() throws Exception { + AcknowledgeUserDataCollectionResponse expectedResponse = + AcknowledgeUserDataCollectionResponse.newBuilder().build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + AcknowledgeUserDataCollectionRequest request = + AcknowledgeUserDataCollectionRequest.newBuilder() + .setProperty(PropertyName.of("[PROPERTY]").toString()) + .setAcknowledgement("acknowledgement1769490938") + .build(); + + AcknowledgeUserDataCollectionResponse actualResponse = + client.acknowledgeUserDataCollection(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AcknowledgeUserDataCollectionRequest actualRequest = + ((AcknowledgeUserDataCollectionRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getProperty(), actualRequest.getProperty()); + Assert.assertEquals(request.getAcknowledgement(), actualRequest.getAcknowledgement()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void acknowledgeUserDataCollectionExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + AcknowledgeUserDataCollectionRequest request = + AcknowledgeUserDataCollectionRequest.newBuilder() + .setProperty(PropertyName.of("[PROPERTY]").toString()) + .setAcknowledgement("acknowledgement1769490938") + .build(); + client.acknowledgeUserDataCollection(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void searchChangeHistoryEventsTest() throws Exception { + ChangeHistoryEvent responsesElement = ChangeHistoryEvent.newBuilder().build(); + SearchChangeHistoryEventsResponse expectedResponse = + SearchChangeHistoryEventsResponse.newBuilder() + .setNextPageToken("") + .addAllChangeHistoryEvents(Arrays.asList(responsesElement)) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + SearchChangeHistoryEventsRequest request = + SearchChangeHistoryEventsRequest.newBuilder() + .setAccount(AccountName.of("[ACCOUNT]").toString()) + .setProperty(PropertyName.of("[PROPERTY]").toString()) + .addAllResourceType(new ArrayList()) + .addAllAction(new ArrayList()) + .addAllActorEmail(new ArrayList()) + .setEarliestChangeTime(Timestamp.newBuilder().build()) + .setLatestChangeTime(Timestamp.newBuilder().build()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + SearchChangeHistoryEventsPagedResponse pagedListResponse = + client.searchChangeHistoryEvents(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getChangeHistoryEventsList().get(0), resources.get(0)); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SearchChangeHistoryEventsRequest actualRequest = + ((SearchChangeHistoryEventsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getAccount(), actualRequest.getAccount()); + Assert.assertEquals(request.getProperty(), actualRequest.getProperty()); + Assert.assertEquals(request.getResourceTypeList(), actualRequest.getResourceTypeList()); + Assert.assertEquals(request.getActionList(), actualRequest.getActionList()); + Assert.assertEquals(request.getActorEmailList(), actualRequest.getActorEmailList()); + Assert.assertEquals(request.getEarliestChangeTime(), actualRequest.getEarliestChangeTime()); + Assert.assertEquals(request.getLatestChangeTime(), actualRequest.getLatestChangeTime()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void searchChangeHistoryEventsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + SearchChangeHistoryEventsRequest request = + SearchChangeHistoryEventsRequest.newBuilder() + .setAccount(AccountName.of("[ACCOUNT]").toString()) + .setProperty(PropertyName.of("[PROPERTY]").toString()) + .addAllResourceType(new ArrayList()) + .addAllAction(new ArrayList()) + .addAllActorEmail(new ArrayList()) + .setEarliestChangeTime(Timestamp.newBuilder().build()) + .setLatestChangeTime(Timestamp.newBuilder().build()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.searchChangeHistoryEvents(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createConversionEventTest() throws Exception { + ConversionEvent expectedResponse = + ConversionEvent.newBuilder() + .setName(ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]").toString()) + .setEventName("eventName31228997") + .setCreateTime(Timestamp.newBuilder().build()) + .setDeletable(true) + .setCustom(true) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + PropertyName parent = PropertyName.of("[PROPERTY]"); + ConversionEvent conversionEvent = ConversionEvent.newBuilder().build(); + + ConversionEvent actualResponse = client.createConversionEvent(parent, conversionEvent); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateConversionEventRequest actualRequest = + ((CreateConversionEventRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(conversionEvent, actualRequest.getConversionEvent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createConversionEventExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + PropertyName parent = PropertyName.of("[PROPERTY]"); + ConversionEvent conversionEvent = ConversionEvent.newBuilder().build(); + client.createConversionEvent(parent, conversionEvent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createConversionEventTest2() throws Exception { + ConversionEvent expectedResponse = + ConversionEvent.newBuilder() + .setName(ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]").toString()) + .setEventName("eventName31228997") + .setCreateTime(Timestamp.newBuilder().build()) + .setDeletable(true) + .setCustom(true) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + ConversionEvent conversionEvent = ConversionEvent.newBuilder().build(); + + ConversionEvent actualResponse = client.createConversionEvent(parent, conversionEvent); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateConversionEventRequest actualRequest = + ((CreateConversionEventRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(conversionEvent, actualRequest.getConversionEvent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createConversionEventExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + String parent = "parent-995424086"; + ConversionEvent conversionEvent = ConversionEvent.newBuilder().build(); + client.createConversionEvent(parent, conversionEvent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getConversionEventTest() throws Exception { + ConversionEvent expectedResponse = + ConversionEvent.newBuilder() + .setName(ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]").toString()) + .setEventName("eventName31228997") + .setCreateTime(Timestamp.newBuilder().build()) + .setDeletable(true) + .setCustom(true) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + ConversionEventName name = ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]"); + + ConversionEvent actualResponse = client.getConversionEvent(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetConversionEventRequest actualRequest = ((GetConversionEventRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getConversionEventExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + ConversionEventName name = ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]"); + client.getConversionEvent(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getConversionEventTest2() throws Exception { + ConversionEvent expectedResponse = + ConversionEvent.newBuilder() + .setName(ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]").toString()) + .setEventName("eventName31228997") + .setCreateTime(Timestamp.newBuilder().build()) + .setDeletable(true) + .setCustom(true) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + String name = "name3373707"; + + ConversionEvent actualResponse = client.getConversionEvent(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetConversionEventRequest actualRequest = ((GetConversionEventRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getConversionEventExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + String name = "name3373707"; + client.getConversionEvent(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteConversionEventTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + ConversionEventName name = ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]"); + + client.deleteConversionEvent(name); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteConversionEventRequest actualRequest = + ((DeleteConversionEventRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteConversionEventExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + ConversionEventName name = ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]"); + client.deleteConversionEvent(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteConversionEventTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteConversionEvent(name); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteConversionEventRequest actualRequest = + ((DeleteConversionEventRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteConversionEventExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + String name = "name3373707"; + client.deleteConversionEvent(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listConversionEventsTest() throws Exception { + ConversionEvent responsesElement = ConversionEvent.newBuilder().build(); + ListConversionEventsResponse expectedResponse = + ListConversionEventsResponse.newBuilder() + .setNextPageToken("") + .addAllConversionEvents(Arrays.asList(responsesElement)) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + PropertyName parent = PropertyName.of("[PROPERTY]"); + + ListConversionEventsPagedResponse pagedListResponse = client.listConversionEvents(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getConversionEventsList().get(0), resources.get(0)); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListConversionEventsRequest actualRequest = + ((ListConversionEventsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listConversionEventsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + PropertyName parent = PropertyName.of("[PROPERTY]"); + client.listConversionEvents(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listConversionEventsTest2() throws Exception { + ConversionEvent responsesElement = ConversionEvent.newBuilder().build(); + ListConversionEventsResponse expectedResponse = + ListConversionEventsResponse.newBuilder() + .setNextPageToken("") + .addAllConversionEvents(Arrays.asList(responsesElement)) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListConversionEventsPagedResponse pagedListResponse = client.listConversionEvents(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getConversionEventsList().get(0), resources.get(0)); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListConversionEventsRequest actualRequest = + ((ListConversionEventsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listConversionEventsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listConversionEvents(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createCustomDimensionTest() throws Exception { + CustomDimension expectedResponse = + CustomDimension.newBuilder() + .setName(CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]").toString()) + .setParameterName("parameterName-379607596") + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDisallowAdsPersonalization(true) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + PropertyName parent = PropertyName.of("[PROPERTY]"); + CustomDimension customDimension = CustomDimension.newBuilder().build(); + + CustomDimension actualResponse = client.createCustomDimension(parent, customDimension); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateCustomDimensionRequest actualRequest = + ((CreateCustomDimensionRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(customDimension, actualRequest.getCustomDimension()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createCustomDimensionExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + PropertyName parent = PropertyName.of("[PROPERTY]"); + CustomDimension customDimension = CustomDimension.newBuilder().build(); + client.createCustomDimension(parent, customDimension); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createCustomDimensionTest2() throws Exception { + CustomDimension expectedResponse = + CustomDimension.newBuilder() + .setName(CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]").toString()) + .setParameterName("parameterName-379607596") + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDisallowAdsPersonalization(true) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + CustomDimension customDimension = CustomDimension.newBuilder().build(); + + CustomDimension actualResponse = client.createCustomDimension(parent, customDimension); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateCustomDimensionRequest actualRequest = + ((CreateCustomDimensionRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(customDimension, actualRequest.getCustomDimension()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createCustomDimensionExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + String parent = "parent-995424086"; + CustomDimension customDimension = CustomDimension.newBuilder().build(); + client.createCustomDimension(parent, customDimension); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateCustomDimensionTest() throws Exception { + CustomDimension expectedResponse = + CustomDimension.newBuilder() + .setName(CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]").toString()) + .setParameterName("parameterName-379607596") + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDisallowAdsPersonalization(true) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + CustomDimension customDimension = CustomDimension.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + CustomDimension actualResponse = client.updateCustomDimension(customDimension, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateCustomDimensionRequest actualRequest = + ((UpdateCustomDimensionRequest) actualRequests.get(0)); + + Assert.assertEquals(customDimension, actualRequest.getCustomDimension()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateCustomDimensionExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + CustomDimension customDimension = CustomDimension.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateCustomDimension(customDimension, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listCustomDimensionsTest() throws Exception { + CustomDimension responsesElement = CustomDimension.newBuilder().build(); + ListCustomDimensionsResponse expectedResponse = + ListCustomDimensionsResponse.newBuilder() + .setNextPageToken("") + .addAllCustomDimensions(Arrays.asList(responsesElement)) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + PropertyName parent = PropertyName.of("[PROPERTY]"); + + ListCustomDimensionsPagedResponse pagedListResponse = client.listCustomDimensions(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getCustomDimensionsList().get(0), resources.get(0)); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListCustomDimensionsRequest actualRequest = + ((ListCustomDimensionsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listCustomDimensionsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + PropertyName parent = PropertyName.of("[PROPERTY]"); + client.listCustomDimensions(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listCustomDimensionsTest2() throws Exception { + CustomDimension responsesElement = CustomDimension.newBuilder().build(); + ListCustomDimensionsResponse expectedResponse = + ListCustomDimensionsResponse.newBuilder() + .setNextPageToken("") + .addAllCustomDimensions(Arrays.asList(responsesElement)) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListCustomDimensionsPagedResponse pagedListResponse = client.listCustomDimensions(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getCustomDimensionsList().get(0), resources.get(0)); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListCustomDimensionsRequest actualRequest = + ((ListCustomDimensionsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listCustomDimensionsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listCustomDimensions(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void archiveCustomDimensionTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + CustomDimensionName name = CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]"); + + client.archiveCustomDimension(name); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ArchiveCustomDimensionRequest actualRequest = + ((ArchiveCustomDimensionRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void archiveCustomDimensionExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + CustomDimensionName name = CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]"); + client.archiveCustomDimension(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void archiveCustomDimensionTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + String name = "name3373707"; + + client.archiveCustomDimension(name); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ArchiveCustomDimensionRequest actualRequest = + ((ArchiveCustomDimensionRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void archiveCustomDimensionExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + String name = "name3373707"; + client.archiveCustomDimension(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getCustomDimensionTest() throws Exception { + CustomDimension expectedResponse = + CustomDimension.newBuilder() + .setName(CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]").toString()) + .setParameterName("parameterName-379607596") + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDisallowAdsPersonalization(true) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + CustomDimensionName name = CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]"); + + CustomDimension actualResponse = client.getCustomDimension(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetCustomDimensionRequest actualRequest = ((GetCustomDimensionRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getCustomDimensionExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + CustomDimensionName name = CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]"); + client.getCustomDimension(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getCustomDimensionTest2() throws Exception { + CustomDimension expectedResponse = + CustomDimension.newBuilder() + .setName(CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]").toString()) + .setParameterName("parameterName-379607596") + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDisallowAdsPersonalization(true) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + String name = "name3373707"; + + CustomDimension actualResponse = client.getCustomDimension(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetCustomDimensionRequest actualRequest = ((GetCustomDimensionRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getCustomDimensionExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + String name = "name3373707"; + client.getCustomDimension(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createCustomMetricTest() throws Exception { + CustomMetric expectedResponse = + CustomMetric.newBuilder() + .setName(CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]").toString()) + .setParameterName("parameterName-379607596") + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllRestrictedMetricType(new ArrayList()) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + PropertyName parent = PropertyName.of("[PROPERTY]"); + CustomMetric customMetric = CustomMetric.newBuilder().build(); + + CustomMetric actualResponse = client.createCustomMetric(parent, customMetric); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateCustomMetricRequest actualRequest = ((CreateCustomMetricRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(customMetric, actualRequest.getCustomMetric()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createCustomMetricExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + PropertyName parent = PropertyName.of("[PROPERTY]"); + CustomMetric customMetric = CustomMetric.newBuilder().build(); + client.createCustomMetric(parent, customMetric); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createCustomMetricTest2() throws Exception { + CustomMetric expectedResponse = + CustomMetric.newBuilder() + .setName(CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]").toString()) + .setParameterName("parameterName-379607596") + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllRestrictedMetricType(new ArrayList()) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + CustomMetric customMetric = CustomMetric.newBuilder().build(); + + CustomMetric actualResponse = client.createCustomMetric(parent, customMetric); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateCustomMetricRequest actualRequest = ((CreateCustomMetricRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(customMetric, actualRequest.getCustomMetric()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createCustomMetricExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + String parent = "parent-995424086"; + CustomMetric customMetric = CustomMetric.newBuilder().build(); + client.createCustomMetric(parent, customMetric); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateCustomMetricTest() throws Exception { + CustomMetric expectedResponse = + CustomMetric.newBuilder() + .setName(CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]").toString()) + .setParameterName("parameterName-379607596") + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllRestrictedMetricType(new ArrayList()) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + CustomMetric customMetric = CustomMetric.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + CustomMetric actualResponse = client.updateCustomMetric(customMetric, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateCustomMetricRequest actualRequest = ((UpdateCustomMetricRequest) actualRequests.get(0)); + + Assert.assertEquals(customMetric, actualRequest.getCustomMetric()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateCustomMetricExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + CustomMetric customMetric = CustomMetric.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateCustomMetric(customMetric, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listCustomMetricsTest() throws Exception { + CustomMetric responsesElement = CustomMetric.newBuilder().build(); + ListCustomMetricsResponse expectedResponse = + ListCustomMetricsResponse.newBuilder() + .setNextPageToken("") + .addAllCustomMetrics(Arrays.asList(responsesElement)) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + PropertyName parent = PropertyName.of("[PROPERTY]"); + + ListCustomMetricsPagedResponse pagedListResponse = client.listCustomMetrics(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getCustomMetricsList().get(0), resources.get(0)); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListCustomMetricsRequest actualRequest = ((ListCustomMetricsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listCustomMetricsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + PropertyName parent = PropertyName.of("[PROPERTY]"); + client.listCustomMetrics(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listCustomMetricsTest2() throws Exception { + CustomMetric responsesElement = CustomMetric.newBuilder().build(); + ListCustomMetricsResponse expectedResponse = + ListCustomMetricsResponse.newBuilder() + .setNextPageToken("") + .addAllCustomMetrics(Arrays.asList(responsesElement)) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListCustomMetricsPagedResponse pagedListResponse = client.listCustomMetrics(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getCustomMetricsList().get(0), resources.get(0)); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListCustomMetricsRequest actualRequest = ((ListCustomMetricsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listCustomMetricsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listCustomMetrics(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void archiveCustomMetricTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + CustomMetricName name = CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]"); + + client.archiveCustomMetric(name); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ArchiveCustomMetricRequest actualRequest = ((ArchiveCustomMetricRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void archiveCustomMetricExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + CustomMetricName name = CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]"); + client.archiveCustomMetric(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void archiveCustomMetricTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + String name = "name3373707"; + + client.archiveCustomMetric(name); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ArchiveCustomMetricRequest actualRequest = ((ArchiveCustomMetricRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void archiveCustomMetricExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + String name = "name3373707"; + client.archiveCustomMetric(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getCustomMetricTest() throws Exception { + CustomMetric expectedResponse = + CustomMetric.newBuilder() + .setName(CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]").toString()) + .setParameterName("parameterName-379607596") + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllRestrictedMetricType(new ArrayList()) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + CustomMetricName name = CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]"); + + CustomMetric actualResponse = client.getCustomMetric(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetCustomMetricRequest actualRequest = ((GetCustomMetricRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getCustomMetricExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + CustomMetricName name = CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]"); + client.getCustomMetric(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getCustomMetricTest2() throws Exception { + CustomMetric expectedResponse = + CustomMetric.newBuilder() + .setName(CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]").toString()) + .setParameterName("parameterName-379607596") + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllRestrictedMetricType(new ArrayList()) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + String name = "name3373707"; + + CustomMetric actualResponse = client.getCustomMetric(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetCustomMetricRequest actualRequest = ((GetCustomMetricRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getCustomMetricExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + String name = "name3373707"; + client.getCustomMetric(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDataRetentionSettingsTest() throws Exception { + DataRetentionSettings expectedResponse = + DataRetentionSettings.newBuilder() + .setName(DataRetentionSettingsName.of("[PROPERTY]").toString()) + .setResetUserDataOnNewActivity(true) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + DataRetentionSettingsName name = DataRetentionSettingsName.of("[PROPERTY]"); + + DataRetentionSettings actualResponse = client.getDataRetentionSettings(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetDataRetentionSettingsRequest actualRequest = + ((GetDataRetentionSettingsRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getDataRetentionSettingsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + DataRetentionSettingsName name = DataRetentionSettingsName.of("[PROPERTY]"); + client.getDataRetentionSettings(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDataRetentionSettingsTest2() throws Exception { + DataRetentionSettings expectedResponse = + DataRetentionSettings.newBuilder() + .setName(DataRetentionSettingsName.of("[PROPERTY]").toString()) + .setResetUserDataOnNewActivity(true) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + String name = "name3373707"; + + DataRetentionSettings actualResponse = client.getDataRetentionSettings(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetDataRetentionSettingsRequest actualRequest = + ((GetDataRetentionSettingsRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getDataRetentionSettingsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + String name = "name3373707"; + client.getDataRetentionSettings(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateDataRetentionSettingsTest() throws Exception { + DataRetentionSettings expectedResponse = + DataRetentionSettings.newBuilder() + .setName(DataRetentionSettingsName.of("[PROPERTY]").toString()) + .setResetUserDataOnNewActivity(true) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + DataRetentionSettings dataRetentionSettings = DataRetentionSettings.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + DataRetentionSettings actualResponse = + client.updateDataRetentionSettings(dataRetentionSettings, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateDataRetentionSettingsRequest actualRequest = + ((UpdateDataRetentionSettingsRequest) actualRequests.get(0)); + + Assert.assertEquals(dataRetentionSettings, actualRequest.getDataRetentionSettings()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateDataRetentionSettingsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + DataRetentionSettings dataRetentionSettings = DataRetentionSettings.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateDataRetentionSettings(dataRetentionSettings, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createDataStreamTest() throws Exception { + DataStream expectedResponse = + DataStream.newBuilder() + .setName(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + PropertyName parent = PropertyName.of("[PROPERTY]"); + DataStream dataStream = DataStream.newBuilder().build(); + + DataStream actualResponse = client.createDataStream(parent, dataStream); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateDataStreamRequest actualRequest = ((CreateDataStreamRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(dataStream, actualRequest.getDataStream()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createDataStreamExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + PropertyName parent = PropertyName.of("[PROPERTY]"); + DataStream dataStream = DataStream.newBuilder().build(); + client.createDataStream(parent, dataStream); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createDataStreamTest2() throws Exception { + DataStream expectedResponse = + DataStream.newBuilder() + .setName(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + DataStream dataStream = DataStream.newBuilder().build(); + + DataStream actualResponse = client.createDataStream(parent, dataStream); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateDataStreamRequest actualRequest = ((CreateDataStreamRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(dataStream, actualRequest.getDataStream()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createDataStreamExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + String parent = "parent-995424086"; + DataStream dataStream = DataStream.newBuilder().build(); + client.createDataStream(parent, dataStream); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteDataStreamTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + DataStreamName name = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); + + client.deleteDataStream(name); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteDataStreamRequest actualRequest = ((DeleteDataStreamRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteDataStreamExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + DataStreamName name = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); + client.deleteDataStream(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteDataStreamTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteDataStream(name); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteDataStreamRequest actualRequest = ((DeleteDataStreamRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteDataStreamExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + String name = "name3373707"; + client.deleteDataStream(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateDataStreamTest() throws Exception { + DataStream expectedResponse = + DataStream.newBuilder() + .setName(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + DataStream dataStream = DataStream.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + DataStream actualResponse = client.updateDataStream(dataStream, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateDataStreamRequest actualRequest = ((UpdateDataStreamRequest) actualRequests.get(0)); + + Assert.assertEquals(dataStream, actualRequest.getDataStream()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateDataStreamExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + DataStream dataStream = DataStream.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateDataStream(dataStream, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDataStreamsTest() throws Exception { + DataStream responsesElement = DataStream.newBuilder().build(); + ListDataStreamsResponse expectedResponse = + ListDataStreamsResponse.newBuilder() + .setNextPageToken("") + .addAllDataStreams(Arrays.asList(responsesElement)) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + PropertyName parent = PropertyName.of("[PROPERTY]"); + + ListDataStreamsPagedResponse pagedListResponse = client.listDataStreams(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDataStreamsList().get(0), resources.get(0)); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListDataStreamsRequest actualRequest = ((ListDataStreamsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listDataStreamsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + PropertyName parent = PropertyName.of("[PROPERTY]"); + client.listDataStreams(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDataStreamsTest2() throws Exception { + DataStream responsesElement = DataStream.newBuilder().build(); + ListDataStreamsResponse expectedResponse = + ListDataStreamsResponse.newBuilder() + .setNextPageToken("") + .addAllDataStreams(Arrays.asList(responsesElement)) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListDataStreamsPagedResponse pagedListResponse = client.listDataStreams(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDataStreamsList().get(0), resources.get(0)); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListDataStreamsRequest actualRequest = ((ListDataStreamsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listDataStreamsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listDataStreams(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDataStreamTest() throws Exception { + DataStream expectedResponse = + DataStream.newBuilder() + .setName(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + DataStreamName name = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); + + DataStream actualResponse = client.getDataStream(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetDataStreamRequest actualRequest = ((GetDataStreamRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getDataStreamExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + DataStreamName name = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); + client.getDataStream(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDataStreamTest2() throws Exception { + DataStream expectedResponse = + DataStream.newBuilder() + .setName(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + String name = "name3373707"; + + DataStream actualResponse = client.getDataStream(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetDataStreamRequest actualRequest = ((GetDataStreamRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getDataStreamExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + String name = "name3373707"; + client.getDataStream(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-analytics-admin/google-analytics-admin/src/test/java/com/google/analytics/admin/v1beta/MockAnalyticsAdminService.java b/java-analytics-admin/google-analytics-admin/src/test/java/com/google/analytics/admin/v1beta/MockAnalyticsAdminService.java new file mode 100644 index 000000000000..a106ecac8542 --- /dev/null +++ b/java-analytics-admin/google-analytics-admin/src/test/java/com/google/analytics/admin/v1beta/MockAnalyticsAdminService.java @@ -0,0 +1,59 @@ +/* + * Copyright 2022 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.admin.v1beta; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockAnalyticsAdminService implements MockGrpcService { + private final MockAnalyticsAdminServiceImpl serviceImpl; + + public MockAnalyticsAdminService() { + serviceImpl = new MockAnalyticsAdminServiceImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-analytics-admin/google-analytics-admin/src/test/java/com/google/analytics/admin/v1beta/MockAnalyticsAdminServiceImpl.java b/java-analytics-admin/google-analytics-admin/src/test/java/com/google/analytics/admin/v1beta/MockAnalyticsAdminServiceImpl.java new file mode 100644 index 000000000000..34096123a2a3 --- /dev/null +++ b/java-analytics-admin/google-analytics-admin/src/test/java/com/google/analytics/admin/v1beta/MockAnalyticsAdminServiceImpl.java @@ -0,0 +1,1060 @@ +/* + * Copyright 2022 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.admin.v1beta; + +import com.google.analytics.admin.v1beta.AnalyticsAdminServiceGrpc.AnalyticsAdminServiceImplBase; +import com.google.api.core.BetaApi; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Empty; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockAnalyticsAdminServiceImpl extends AnalyticsAdminServiceImplBase { + private List requests; + private Queue responses; + + public MockAnalyticsAdminServiceImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void getAccount(GetAccountRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Account) { + requests.add(request); + responseObserver.onNext(((Account) 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 GetAccount, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Account.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listAccounts( + ListAccountsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListAccountsResponse) { + requests.add(request); + responseObserver.onNext(((ListAccountsResponse) 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 ListAccounts, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListAccountsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteAccount(DeleteAccountRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteAccount, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateAccount( + UpdateAccountRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Account) { + requests.add(request); + responseObserver.onNext(((Account) 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 UpdateAccount, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Account.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void provisionAccountTicket( + ProvisionAccountTicketRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ProvisionAccountTicketResponse) { + requests.add(request); + responseObserver.onNext(((ProvisionAccountTicketResponse) 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 ProvisionAccountTicket, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ProvisionAccountTicketResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listAccountSummaries( + ListAccountSummariesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListAccountSummariesResponse) { + requests.add(request); + responseObserver.onNext(((ListAccountSummariesResponse) 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 ListAccountSummaries, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListAccountSummariesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getProperty(GetPropertyRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Property) { + requests.add(request); + responseObserver.onNext(((Property) 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 GetProperty, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Property.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listProperties( + ListPropertiesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListPropertiesResponse) { + requests.add(request); + responseObserver.onNext(((ListPropertiesResponse) 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 ListProperties, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListPropertiesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createProperty( + CreatePropertyRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Property) { + requests.add(request); + responseObserver.onNext(((Property) 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 CreateProperty, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Property.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteProperty( + DeletePropertyRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Property) { + requests.add(request); + responseObserver.onNext(((Property) 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 DeleteProperty, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Property.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateProperty( + UpdatePropertyRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Property) { + requests.add(request); + responseObserver.onNext(((Property) 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 UpdateProperty, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Property.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createFirebaseLink( + CreateFirebaseLinkRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof FirebaseLink) { + requests.add(request); + responseObserver.onNext(((FirebaseLink) 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 CreateFirebaseLink, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + FirebaseLink.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteFirebaseLink( + DeleteFirebaseLinkRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteFirebaseLink, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listFirebaseLinks( + ListFirebaseLinksRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListFirebaseLinksResponse) { + requests.add(request); + responseObserver.onNext(((ListFirebaseLinksResponse) 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 ListFirebaseLinks, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListFirebaseLinksResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createGoogleAdsLink( + CreateGoogleAdsLinkRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof GoogleAdsLink) { + requests.add(request); + responseObserver.onNext(((GoogleAdsLink) 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 CreateGoogleAdsLink, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + GoogleAdsLink.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateGoogleAdsLink( + UpdateGoogleAdsLinkRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof GoogleAdsLink) { + requests.add(request); + responseObserver.onNext(((GoogleAdsLink) 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 UpdateGoogleAdsLink, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + GoogleAdsLink.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteGoogleAdsLink( + DeleteGoogleAdsLinkRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteGoogleAdsLink, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listGoogleAdsLinks( + ListGoogleAdsLinksRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListGoogleAdsLinksResponse) { + requests.add(request); + responseObserver.onNext(((ListGoogleAdsLinksResponse) 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 ListGoogleAdsLinks, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListGoogleAdsLinksResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getDataSharingSettings( + GetDataSharingSettingsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof DataSharingSettings) { + requests.add(request); + responseObserver.onNext(((DataSharingSettings) 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 GetDataSharingSettings, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + DataSharingSettings.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getMeasurementProtocolSecret( + GetMeasurementProtocolSecretRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof MeasurementProtocolSecret) { + requests.add(request); + responseObserver.onNext(((MeasurementProtocolSecret) 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 GetMeasurementProtocolSecret, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + MeasurementProtocolSecret.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listMeasurementProtocolSecrets( + ListMeasurementProtocolSecretsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListMeasurementProtocolSecretsResponse) { + requests.add(request); + responseObserver.onNext(((ListMeasurementProtocolSecretsResponse) 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 ListMeasurementProtocolSecrets, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListMeasurementProtocolSecretsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createMeasurementProtocolSecret( + CreateMeasurementProtocolSecretRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof MeasurementProtocolSecret) { + requests.add(request); + responseObserver.onNext(((MeasurementProtocolSecret) 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 CreateMeasurementProtocolSecret, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + MeasurementProtocolSecret.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteMeasurementProtocolSecret( + DeleteMeasurementProtocolSecretRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteMeasurementProtocolSecret, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateMeasurementProtocolSecret( + UpdateMeasurementProtocolSecretRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof MeasurementProtocolSecret) { + requests.add(request); + responseObserver.onNext(((MeasurementProtocolSecret) 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 UpdateMeasurementProtocolSecret, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + MeasurementProtocolSecret.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void acknowledgeUserDataCollection( + AcknowledgeUserDataCollectionRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof AcknowledgeUserDataCollectionResponse) { + requests.add(request); + responseObserver.onNext(((AcknowledgeUserDataCollectionResponse) 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 AcknowledgeUserDataCollection, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + AcknowledgeUserDataCollectionResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void searchChangeHistoryEvents( + SearchChangeHistoryEventsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof SearchChangeHistoryEventsResponse) { + requests.add(request); + responseObserver.onNext(((SearchChangeHistoryEventsResponse) 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 SearchChangeHistoryEvents, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + SearchChangeHistoryEventsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createConversionEvent( + CreateConversionEventRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ConversionEvent) { + requests.add(request); + responseObserver.onNext(((ConversionEvent) 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 CreateConversionEvent, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ConversionEvent.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getConversionEvent( + GetConversionEventRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ConversionEvent) { + requests.add(request); + responseObserver.onNext(((ConversionEvent) 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 GetConversionEvent, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ConversionEvent.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteConversionEvent( + DeleteConversionEventRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteConversionEvent, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listConversionEvents( + ListConversionEventsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListConversionEventsResponse) { + requests.add(request); + responseObserver.onNext(((ListConversionEventsResponse) 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 ListConversionEvents, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListConversionEventsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createCustomDimension( + CreateCustomDimensionRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof CustomDimension) { + requests.add(request); + responseObserver.onNext(((CustomDimension) 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 CreateCustomDimension, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + CustomDimension.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateCustomDimension( + UpdateCustomDimensionRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof CustomDimension) { + requests.add(request); + responseObserver.onNext(((CustomDimension) 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 UpdateCustomDimension, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + CustomDimension.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listCustomDimensions( + ListCustomDimensionsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListCustomDimensionsResponse) { + requests.add(request); + responseObserver.onNext(((ListCustomDimensionsResponse) 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 ListCustomDimensions, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListCustomDimensionsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void archiveCustomDimension( + ArchiveCustomDimensionRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ArchiveCustomDimension, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getCustomDimension( + GetCustomDimensionRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof CustomDimension) { + requests.add(request); + responseObserver.onNext(((CustomDimension) 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 GetCustomDimension, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + CustomDimension.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createCustomMetric( + CreateCustomMetricRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof CustomMetric) { + requests.add(request); + responseObserver.onNext(((CustomMetric) 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 CreateCustomMetric, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + CustomMetric.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateCustomMetric( + UpdateCustomMetricRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof CustomMetric) { + requests.add(request); + responseObserver.onNext(((CustomMetric) 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 UpdateCustomMetric, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + CustomMetric.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listCustomMetrics( + ListCustomMetricsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListCustomMetricsResponse) { + requests.add(request); + responseObserver.onNext(((ListCustomMetricsResponse) 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 ListCustomMetrics, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListCustomMetricsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void archiveCustomMetric( + ArchiveCustomMetricRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ArchiveCustomMetric, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getCustomMetric( + GetCustomMetricRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof CustomMetric) { + requests.add(request); + responseObserver.onNext(((CustomMetric) 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 GetCustomMetric, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + CustomMetric.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getDataRetentionSettings( + GetDataRetentionSettingsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof DataRetentionSettings) { + requests.add(request); + responseObserver.onNext(((DataRetentionSettings) 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 GetDataRetentionSettings, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + DataRetentionSettings.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateDataRetentionSettings( + UpdateDataRetentionSettingsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof DataRetentionSettings) { + requests.add(request); + responseObserver.onNext(((DataRetentionSettings) 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 UpdateDataRetentionSettings, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + DataRetentionSettings.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createDataStream( + CreateDataStreamRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof DataStream) { + requests.add(request); + responseObserver.onNext(((DataStream) 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 CreateDataStream, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + DataStream.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteDataStream( + DeleteDataStreamRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteDataStream, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateDataStream( + UpdateDataStreamRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof DataStream) { + requests.add(request); + responseObserver.onNext(((DataStream) 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 UpdateDataStream, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + DataStream.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listDataStreams( + ListDataStreamsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListDataStreamsResponse) { + requests.add(request); + responseObserver.onNext(((ListDataStreamsResponse) 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 ListDataStreams, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListDataStreamsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getDataStream( + GetDataStreamRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof DataStream) { + requests.add(request); + responseObserver.onNext(((DataStream) 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 GetDataStream, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + DataStream.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-analytics-admin/grpc-google-analytics-admin-v1beta/pom.xml b/java-analytics-admin/grpc-google-analytics-admin-v1beta/pom.xml new file mode 100644 index 000000000000..ed586972af7c --- /dev/null +++ b/java-analytics-admin/grpc-google-analytics-admin-v1beta/pom.xml @@ -0,0 +1,65 @@ + + 4.0.0 + com.google.api.grpc + grpc-google-analytics-admin-v1beta + 0.11.1-SNAPSHOT + grpc-google-analytics-admin-v1beta + GRPC library for google-analytics-admin + + com.google.analytics + google-analytics-admin-parent + 0.11.1-SNAPSHOT + + + + io.grpc + grpc-api + + + io.grpc + grpc-stub + + + io.grpc + grpc-protobuf + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-analytics-admin-v1beta + + + com.google.guava + guava + + + + + + java9 + + [9,) + + + + javax.annotation + javax.annotation-api + + + + + + + + + org.codehaus.mojo + flatten-maven-plugin + + + + \ No newline at end of file diff --git a/java-analytics-admin/grpc-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/AnalyticsAdminServiceGrpc.java b/java-analytics-admin/grpc-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/AnalyticsAdminServiceGrpc.java new file mode 100644 index 000000000000..6c675878ae01 --- /dev/null +++ b/java-analytics-admin/grpc-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/AnalyticsAdminServiceGrpc.java @@ -0,0 +1,6139 @@ +/* + * Copyright 2020 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.admin.v1beta; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Service Interface for the Analytics Admin API (GA4).
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/analytics/admin/v1beta/analytics_admin.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class AnalyticsAdminServiceGrpc { + + private AnalyticsAdminServiceGrpc() {} + + public static final String SERVICE_NAME = "google.analytics.admin.v1beta.AnalyticsAdminService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.GetAccountRequest, + com.google.analytics.admin.v1beta.Account> + getGetAccountMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetAccount", + requestType = com.google.analytics.admin.v1beta.GetAccountRequest.class, + responseType = com.google.analytics.admin.v1beta.Account.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.GetAccountRequest, + com.google.analytics.admin.v1beta.Account> + getGetAccountMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.GetAccountRequest, + com.google.analytics.admin.v1beta.Account> + getGetAccountMethod; + if ((getGetAccountMethod = AnalyticsAdminServiceGrpc.getGetAccountMethod) == null) { + synchronized (AnalyticsAdminServiceGrpc.class) { + if ((getGetAccountMethod = AnalyticsAdminServiceGrpc.getGetAccountMethod) == null) { + AnalyticsAdminServiceGrpc.getGetAccountMethod = + getGetAccountMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetAccount")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.GetAccountRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.Account.getDefaultInstance())) + .setSchemaDescriptor( + new AnalyticsAdminServiceMethodDescriptorSupplier("GetAccount")) + .build(); + } + } + } + return getGetAccountMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.ListAccountsRequest, + com.google.analytics.admin.v1beta.ListAccountsResponse> + getListAccountsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListAccounts", + requestType = com.google.analytics.admin.v1beta.ListAccountsRequest.class, + responseType = com.google.analytics.admin.v1beta.ListAccountsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.ListAccountsRequest, + com.google.analytics.admin.v1beta.ListAccountsResponse> + getListAccountsMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.ListAccountsRequest, + com.google.analytics.admin.v1beta.ListAccountsResponse> + getListAccountsMethod; + if ((getListAccountsMethod = AnalyticsAdminServiceGrpc.getListAccountsMethod) == null) { + synchronized (AnalyticsAdminServiceGrpc.class) { + if ((getListAccountsMethod = AnalyticsAdminServiceGrpc.getListAccountsMethod) == null) { + AnalyticsAdminServiceGrpc.getListAccountsMethod = + getListAccountsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListAccounts")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.ListAccountsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.ListAccountsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new AnalyticsAdminServiceMethodDescriptorSupplier("ListAccounts")) + .build(); + } + } + } + return getListAccountsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.DeleteAccountRequest, com.google.protobuf.Empty> + getDeleteAccountMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteAccount", + requestType = com.google.analytics.admin.v1beta.DeleteAccountRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.DeleteAccountRequest, com.google.protobuf.Empty> + getDeleteAccountMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.DeleteAccountRequest, com.google.protobuf.Empty> + getDeleteAccountMethod; + if ((getDeleteAccountMethod = AnalyticsAdminServiceGrpc.getDeleteAccountMethod) == null) { + synchronized (AnalyticsAdminServiceGrpc.class) { + if ((getDeleteAccountMethod = AnalyticsAdminServiceGrpc.getDeleteAccountMethod) == null) { + AnalyticsAdminServiceGrpc.getDeleteAccountMethod = + getDeleteAccountMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteAccount")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.DeleteAccountRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new AnalyticsAdminServiceMethodDescriptorSupplier("DeleteAccount")) + .build(); + } + } + } + return getDeleteAccountMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.UpdateAccountRequest, + com.google.analytics.admin.v1beta.Account> + getUpdateAccountMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateAccount", + requestType = com.google.analytics.admin.v1beta.UpdateAccountRequest.class, + responseType = com.google.analytics.admin.v1beta.Account.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.UpdateAccountRequest, + com.google.analytics.admin.v1beta.Account> + getUpdateAccountMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.UpdateAccountRequest, + com.google.analytics.admin.v1beta.Account> + getUpdateAccountMethod; + if ((getUpdateAccountMethod = AnalyticsAdminServiceGrpc.getUpdateAccountMethod) == null) { + synchronized (AnalyticsAdminServiceGrpc.class) { + if ((getUpdateAccountMethod = AnalyticsAdminServiceGrpc.getUpdateAccountMethod) == null) { + AnalyticsAdminServiceGrpc.getUpdateAccountMethod = + getUpdateAccountMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateAccount")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.UpdateAccountRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.Account.getDefaultInstance())) + .setSchemaDescriptor( + new AnalyticsAdminServiceMethodDescriptorSupplier("UpdateAccount")) + .build(); + } + } + } + return getUpdateAccountMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.ProvisionAccountTicketRequest, + com.google.analytics.admin.v1beta.ProvisionAccountTicketResponse> + getProvisionAccountTicketMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ProvisionAccountTicket", + requestType = com.google.analytics.admin.v1beta.ProvisionAccountTicketRequest.class, + responseType = com.google.analytics.admin.v1beta.ProvisionAccountTicketResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.ProvisionAccountTicketRequest, + com.google.analytics.admin.v1beta.ProvisionAccountTicketResponse> + getProvisionAccountTicketMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.ProvisionAccountTicketRequest, + com.google.analytics.admin.v1beta.ProvisionAccountTicketResponse> + getProvisionAccountTicketMethod; + if ((getProvisionAccountTicketMethod = + AnalyticsAdminServiceGrpc.getProvisionAccountTicketMethod) + == null) { + synchronized (AnalyticsAdminServiceGrpc.class) { + if ((getProvisionAccountTicketMethod = + AnalyticsAdminServiceGrpc.getProvisionAccountTicketMethod) + == null) { + AnalyticsAdminServiceGrpc.getProvisionAccountTicketMethod = + getProvisionAccountTicketMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ProvisionAccountTicket")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.ProvisionAccountTicketRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.ProvisionAccountTicketResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new AnalyticsAdminServiceMethodDescriptorSupplier( + "ProvisionAccountTicket")) + .build(); + } + } + } + return getProvisionAccountTicketMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.ListAccountSummariesRequest, + com.google.analytics.admin.v1beta.ListAccountSummariesResponse> + getListAccountSummariesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListAccountSummaries", + requestType = com.google.analytics.admin.v1beta.ListAccountSummariesRequest.class, + responseType = com.google.analytics.admin.v1beta.ListAccountSummariesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.ListAccountSummariesRequest, + com.google.analytics.admin.v1beta.ListAccountSummariesResponse> + getListAccountSummariesMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.ListAccountSummariesRequest, + com.google.analytics.admin.v1beta.ListAccountSummariesResponse> + getListAccountSummariesMethod; + if ((getListAccountSummariesMethod = AnalyticsAdminServiceGrpc.getListAccountSummariesMethod) + == null) { + synchronized (AnalyticsAdminServiceGrpc.class) { + if ((getListAccountSummariesMethod = + AnalyticsAdminServiceGrpc.getListAccountSummariesMethod) + == null) { + AnalyticsAdminServiceGrpc.getListAccountSummariesMethod = + getListAccountSummariesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListAccountSummaries")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.ListAccountSummariesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.ListAccountSummariesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new AnalyticsAdminServiceMethodDescriptorSupplier("ListAccountSummaries")) + .build(); + } + } + } + return getListAccountSummariesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.GetPropertyRequest, + com.google.analytics.admin.v1beta.Property> + getGetPropertyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetProperty", + requestType = com.google.analytics.admin.v1beta.GetPropertyRequest.class, + responseType = com.google.analytics.admin.v1beta.Property.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.GetPropertyRequest, + com.google.analytics.admin.v1beta.Property> + getGetPropertyMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.GetPropertyRequest, + com.google.analytics.admin.v1beta.Property> + getGetPropertyMethod; + if ((getGetPropertyMethod = AnalyticsAdminServiceGrpc.getGetPropertyMethod) == null) { + synchronized (AnalyticsAdminServiceGrpc.class) { + if ((getGetPropertyMethod = AnalyticsAdminServiceGrpc.getGetPropertyMethod) == null) { + AnalyticsAdminServiceGrpc.getGetPropertyMethod = + getGetPropertyMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetProperty")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.GetPropertyRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.Property.getDefaultInstance())) + .setSchemaDescriptor( + new AnalyticsAdminServiceMethodDescriptorSupplier("GetProperty")) + .build(); + } + } + } + return getGetPropertyMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.ListPropertiesRequest, + com.google.analytics.admin.v1beta.ListPropertiesResponse> + getListPropertiesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListProperties", + requestType = com.google.analytics.admin.v1beta.ListPropertiesRequest.class, + responseType = com.google.analytics.admin.v1beta.ListPropertiesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.ListPropertiesRequest, + com.google.analytics.admin.v1beta.ListPropertiesResponse> + getListPropertiesMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.ListPropertiesRequest, + com.google.analytics.admin.v1beta.ListPropertiesResponse> + getListPropertiesMethod; + if ((getListPropertiesMethod = AnalyticsAdminServiceGrpc.getListPropertiesMethod) == null) { + synchronized (AnalyticsAdminServiceGrpc.class) { + if ((getListPropertiesMethod = AnalyticsAdminServiceGrpc.getListPropertiesMethod) == null) { + AnalyticsAdminServiceGrpc.getListPropertiesMethod = + getListPropertiesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListProperties")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.ListPropertiesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.ListPropertiesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new AnalyticsAdminServiceMethodDescriptorSupplier("ListProperties")) + .build(); + } + } + } + return getListPropertiesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.CreatePropertyRequest, + com.google.analytics.admin.v1beta.Property> + getCreatePropertyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateProperty", + requestType = com.google.analytics.admin.v1beta.CreatePropertyRequest.class, + responseType = com.google.analytics.admin.v1beta.Property.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.CreatePropertyRequest, + com.google.analytics.admin.v1beta.Property> + getCreatePropertyMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.CreatePropertyRequest, + com.google.analytics.admin.v1beta.Property> + getCreatePropertyMethod; + if ((getCreatePropertyMethod = AnalyticsAdminServiceGrpc.getCreatePropertyMethod) == null) { + synchronized (AnalyticsAdminServiceGrpc.class) { + if ((getCreatePropertyMethod = AnalyticsAdminServiceGrpc.getCreatePropertyMethod) == null) { + AnalyticsAdminServiceGrpc.getCreatePropertyMethod = + getCreatePropertyMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateProperty")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.CreatePropertyRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.Property.getDefaultInstance())) + .setSchemaDescriptor( + new AnalyticsAdminServiceMethodDescriptorSupplier("CreateProperty")) + .build(); + } + } + } + return getCreatePropertyMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.DeletePropertyRequest, + com.google.analytics.admin.v1beta.Property> + getDeletePropertyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteProperty", + requestType = com.google.analytics.admin.v1beta.DeletePropertyRequest.class, + responseType = com.google.analytics.admin.v1beta.Property.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.DeletePropertyRequest, + com.google.analytics.admin.v1beta.Property> + getDeletePropertyMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.DeletePropertyRequest, + com.google.analytics.admin.v1beta.Property> + getDeletePropertyMethod; + if ((getDeletePropertyMethod = AnalyticsAdminServiceGrpc.getDeletePropertyMethod) == null) { + synchronized (AnalyticsAdminServiceGrpc.class) { + if ((getDeletePropertyMethod = AnalyticsAdminServiceGrpc.getDeletePropertyMethod) == null) { + AnalyticsAdminServiceGrpc.getDeletePropertyMethod = + getDeletePropertyMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteProperty")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.DeletePropertyRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.Property.getDefaultInstance())) + .setSchemaDescriptor( + new AnalyticsAdminServiceMethodDescriptorSupplier("DeleteProperty")) + .build(); + } + } + } + return getDeletePropertyMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.UpdatePropertyRequest, + com.google.analytics.admin.v1beta.Property> + getUpdatePropertyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateProperty", + requestType = com.google.analytics.admin.v1beta.UpdatePropertyRequest.class, + responseType = com.google.analytics.admin.v1beta.Property.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.UpdatePropertyRequest, + com.google.analytics.admin.v1beta.Property> + getUpdatePropertyMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.UpdatePropertyRequest, + com.google.analytics.admin.v1beta.Property> + getUpdatePropertyMethod; + if ((getUpdatePropertyMethod = AnalyticsAdminServiceGrpc.getUpdatePropertyMethod) == null) { + synchronized (AnalyticsAdminServiceGrpc.class) { + if ((getUpdatePropertyMethod = AnalyticsAdminServiceGrpc.getUpdatePropertyMethod) == null) { + AnalyticsAdminServiceGrpc.getUpdatePropertyMethod = + getUpdatePropertyMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateProperty")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.UpdatePropertyRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.Property.getDefaultInstance())) + .setSchemaDescriptor( + new AnalyticsAdminServiceMethodDescriptorSupplier("UpdateProperty")) + .build(); + } + } + } + return getUpdatePropertyMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.CreateFirebaseLinkRequest, + com.google.analytics.admin.v1beta.FirebaseLink> + getCreateFirebaseLinkMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateFirebaseLink", + requestType = com.google.analytics.admin.v1beta.CreateFirebaseLinkRequest.class, + responseType = com.google.analytics.admin.v1beta.FirebaseLink.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.CreateFirebaseLinkRequest, + com.google.analytics.admin.v1beta.FirebaseLink> + getCreateFirebaseLinkMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.CreateFirebaseLinkRequest, + com.google.analytics.admin.v1beta.FirebaseLink> + getCreateFirebaseLinkMethod; + if ((getCreateFirebaseLinkMethod = AnalyticsAdminServiceGrpc.getCreateFirebaseLinkMethod) + == null) { + synchronized (AnalyticsAdminServiceGrpc.class) { + if ((getCreateFirebaseLinkMethod = AnalyticsAdminServiceGrpc.getCreateFirebaseLinkMethod) + == null) { + AnalyticsAdminServiceGrpc.getCreateFirebaseLinkMethod = + getCreateFirebaseLinkMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateFirebaseLink")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.CreateFirebaseLinkRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.FirebaseLink.getDefaultInstance())) + .setSchemaDescriptor( + new AnalyticsAdminServiceMethodDescriptorSupplier("CreateFirebaseLink")) + .build(); + } + } + } + return getCreateFirebaseLinkMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.DeleteFirebaseLinkRequest, com.google.protobuf.Empty> + getDeleteFirebaseLinkMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteFirebaseLink", + requestType = com.google.analytics.admin.v1beta.DeleteFirebaseLinkRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.DeleteFirebaseLinkRequest, com.google.protobuf.Empty> + getDeleteFirebaseLinkMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.DeleteFirebaseLinkRequest, com.google.protobuf.Empty> + getDeleteFirebaseLinkMethod; + if ((getDeleteFirebaseLinkMethod = AnalyticsAdminServiceGrpc.getDeleteFirebaseLinkMethod) + == null) { + synchronized (AnalyticsAdminServiceGrpc.class) { + if ((getDeleteFirebaseLinkMethod = AnalyticsAdminServiceGrpc.getDeleteFirebaseLinkMethod) + == null) { + AnalyticsAdminServiceGrpc.getDeleteFirebaseLinkMethod = + getDeleteFirebaseLinkMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteFirebaseLink")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.DeleteFirebaseLinkRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new AnalyticsAdminServiceMethodDescriptorSupplier("DeleteFirebaseLink")) + .build(); + } + } + } + return getDeleteFirebaseLinkMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.ListFirebaseLinksRequest, + com.google.analytics.admin.v1beta.ListFirebaseLinksResponse> + getListFirebaseLinksMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListFirebaseLinks", + requestType = com.google.analytics.admin.v1beta.ListFirebaseLinksRequest.class, + responseType = com.google.analytics.admin.v1beta.ListFirebaseLinksResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.ListFirebaseLinksRequest, + com.google.analytics.admin.v1beta.ListFirebaseLinksResponse> + getListFirebaseLinksMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.ListFirebaseLinksRequest, + com.google.analytics.admin.v1beta.ListFirebaseLinksResponse> + getListFirebaseLinksMethod; + if ((getListFirebaseLinksMethod = AnalyticsAdminServiceGrpc.getListFirebaseLinksMethod) + == null) { + synchronized (AnalyticsAdminServiceGrpc.class) { + if ((getListFirebaseLinksMethod = AnalyticsAdminServiceGrpc.getListFirebaseLinksMethod) + == null) { + AnalyticsAdminServiceGrpc.getListFirebaseLinksMethod = + getListFirebaseLinksMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListFirebaseLinks")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.ListFirebaseLinksRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.ListFirebaseLinksResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new AnalyticsAdminServiceMethodDescriptorSupplier("ListFirebaseLinks")) + .build(); + } + } + } + return getListFirebaseLinksMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest, + com.google.analytics.admin.v1beta.GoogleAdsLink> + getCreateGoogleAdsLinkMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateGoogleAdsLink", + requestType = com.google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest.class, + responseType = com.google.analytics.admin.v1beta.GoogleAdsLink.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest, + com.google.analytics.admin.v1beta.GoogleAdsLink> + getCreateGoogleAdsLinkMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest, + com.google.analytics.admin.v1beta.GoogleAdsLink> + getCreateGoogleAdsLinkMethod; + if ((getCreateGoogleAdsLinkMethod = AnalyticsAdminServiceGrpc.getCreateGoogleAdsLinkMethod) + == null) { + synchronized (AnalyticsAdminServiceGrpc.class) { + if ((getCreateGoogleAdsLinkMethod = AnalyticsAdminServiceGrpc.getCreateGoogleAdsLinkMethod) + == null) { + AnalyticsAdminServiceGrpc.getCreateGoogleAdsLinkMethod = + getCreateGoogleAdsLinkMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateGoogleAdsLink")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.GoogleAdsLink.getDefaultInstance())) + .setSchemaDescriptor( + new AnalyticsAdminServiceMethodDescriptorSupplier("CreateGoogleAdsLink")) + .build(); + } + } + } + return getCreateGoogleAdsLinkMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest, + com.google.analytics.admin.v1beta.GoogleAdsLink> + getUpdateGoogleAdsLinkMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateGoogleAdsLink", + requestType = com.google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest.class, + responseType = com.google.analytics.admin.v1beta.GoogleAdsLink.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest, + com.google.analytics.admin.v1beta.GoogleAdsLink> + getUpdateGoogleAdsLinkMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest, + com.google.analytics.admin.v1beta.GoogleAdsLink> + getUpdateGoogleAdsLinkMethod; + if ((getUpdateGoogleAdsLinkMethod = AnalyticsAdminServiceGrpc.getUpdateGoogleAdsLinkMethod) + == null) { + synchronized (AnalyticsAdminServiceGrpc.class) { + if ((getUpdateGoogleAdsLinkMethod = AnalyticsAdminServiceGrpc.getUpdateGoogleAdsLinkMethod) + == null) { + AnalyticsAdminServiceGrpc.getUpdateGoogleAdsLinkMethod = + getUpdateGoogleAdsLinkMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpdateGoogleAdsLink")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.GoogleAdsLink.getDefaultInstance())) + .setSchemaDescriptor( + new AnalyticsAdminServiceMethodDescriptorSupplier("UpdateGoogleAdsLink")) + .build(); + } + } + } + return getUpdateGoogleAdsLinkMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest, com.google.protobuf.Empty> + getDeleteGoogleAdsLinkMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteGoogleAdsLink", + requestType = com.google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest, com.google.protobuf.Empty> + getDeleteGoogleAdsLinkMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest, com.google.protobuf.Empty> + getDeleteGoogleAdsLinkMethod; + if ((getDeleteGoogleAdsLinkMethod = AnalyticsAdminServiceGrpc.getDeleteGoogleAdsLinkMethod) + == null) { + synchronized (AnalyticsAdminServiceGrpc.class) { + if ((getDeleteGoogleAdsLinkMethod = AnalyticsAdminServiceGrpc.getDeleteGoogleAdsLinkMethod) + == null) { + AnalyticsAdminServiceGrpc.getDeleteGoogleAdsLinkMethod = + getDeleteGoogleAdsLinkMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeleteGoogleAdsLink")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new AnalyticsAdminServiceMethodDescriptorSupplier("DeleteGoogleAdsLink")) + .build(); + } + } + } + return getDeleteGoogleAdsLinkMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest, + com.google.analytics.admin.v1beta.ListGoogleAdsLinksResponse> + getListGoogleAdsLinksMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListGoogleAdsLinks", + requestType = com.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest.class, + responseType = com.google.analytics.admin.v1beta.ListGoogleAdsLinksResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest, + com.google.analytics.admin.v1beta.ListGoogleAdsLinksResponse> + getListGoogleAdsLinksMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest, + com.google.analytics.admin.v1beta.ListGoogleAdsLinksResponse> + getListGoogleAdsLinksMethod; + if ((getListGoogleAdsLinksMethod = AnalyticsAdminServiceGrpc.getListGoogleAdsLinksMethod) + == null) { + synchronized (AnalyticsAdminServiceGrpc.class) { + if ((getListGoogleAdsLinksMethod = AnalyticsAdminServiceGrpc.getListGoogleAdsLinksMethod) + == null) { + AnalyticsAdminServiceGrpc.getListGoogleAdsLinksMethod = + getListGoogleAdsLinksMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListGoogleAdsLinks")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.ListGoogleAdsLinksResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new AnalyticsAdminServiceMethodDescriptorSupplier("ListGoogleAdsLinks")) + .build(); + } + } + } + return getListGoogleAdsLinksMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.GetDataSharingSettingsRequest, + com.google.analytics.admin.v1beta.DataSharingSettings> + getGetDataSharingSettingsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetDataSharingSettings", + requestType = com.google.analytics.admin.v1beta.GetDataSharingSettingsRequest.class, + responseType = com.google.analytics.admin.v1beta.DataSharingSettings.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.GetDataSharingSettingsRequest, + com.google.analytics.admin.v1beta.DataSharingSettings> + getGetDataSharingSettingsMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.GetDataSharingSettingsRequest, + com.google.analytics.admin.v1beta.DataSharingSettings> + getGetDataSharingSettingsMethod; + if ((getGetDataSharingSettingsMethod = + AnalyticsAdminServiceGrpc.getGetDataSharingSettingsMethod) + == null) { + synchronized (AnalyticsAdminServiceGrpc.class) { + if ((getGetDataSharingSettingsMethod = + AnalyticsAdminServiceGrpc.getGetDataSharingSettingsMethod) + == null) { + AnalyticsAdminServiceGrpc.getGetDataSharingSettingsMethod = + getGetDataSharingSettingsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetDataSharingSettings")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.GetDataSharingSettingsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.DataSharingSettings + .getDefaultInstance())) + .setSchemaDescriptor( + new AnalyticsAdminServiceMethodDescriptorSupplier( + "GetDataSharingSettings")) + .build(); + } + } + } + return getGetDataSharingSettingsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest, + com.google.analytics.admin.v1beta.MeasurementProtocolSecret> + getGetMeasurementProtocolSecretMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetMeasurementProtocolSecret", + requestType = com.google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest.class, + responseType = com.google.analytics.admin.v1beta.MeasurementProtocolSecret.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest, + com.google.analytics.admin.v1beta.MeasurementProtocolSecret> + getGetMeasurementProtocolSecretMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest, + com.google.analytics.admin.v1beta.MeasurementProtocolSecret> + getGetMeasurementProtocolSecretMethod; + if ((getGetMeasurementProtocolSecretMethod = + AnalyticsAdminServiceGrpc.getGetMeasurementProtocolSecretMethod) + == null) { + synchronized (AnalyticsAdminServiceGrpc.class) { + if ((getGetMeasurementProtocolSecretMethod = + AnalyticsAdminServiceGrpc.getGetMeasurementProtocolSecretMethod) + == null) { + AnalyticsAdminServiceGrpc.getGetMeasurementProtocolSecretMethod = + getGetMeasurementProtocolSecretMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetMeasurementProtocolSecret")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.MeasurementProtocolSecret + .getDefaultInstance())) + .setSchemaDescriptor( + new AnalyticsAdminServiceMethodDescriptorSupplier( + "GetMeasurementProtocolSecret")) + .build(); + } + } + } + return getGetMeasurementProtocolSecretMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest, + com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse> + getListMeasurementProtocolSecretsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListMeasurementProtocolSecrets", + requestType = com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest.class, + responseType = com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest, + com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse> + getListMeasurementProtocolSecretsMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest, + com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse> + getListMeasurementProtocolSecretsMethod; + if ((getListMeasurementProtocolSecretsMethod = + AnalyticsAdminServiceGrpc.getListMeasurementProtocolSecretsMethod) + == null) { + synchronized (AnalyticsAdminServiceGrpc.class) { + if ((getListMeasurementProtocolSecretsMethod = + AnalyticsAdminServiceGrpc.getListMeasurementProtocolSecretsMethod) + == null) { + AnalyticsAdminServiceGrpc.getListMeasurementProtocolSecretsMethod = + getListMeasurementProtocolSecretsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListMeasurementProtocolSecrets")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta + .ListMeasurementProtocolSecretsRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta + .ListMeasurementProtocolSecretsResponse.getDefaultInstance())) + .setSchemaDescriptor( + new AnalyticsAdminServiceMethodDescriptorSupplier( + "ListMeasurementProtocolSecrets")) + .build(); + } + } + } + return getListMeasurementProtocolSecretsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest, + com.google.analytics.admin.v1beta.MeasurementProtocolSecret> + getCreateMeasurementProtocolSecretMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateMeasurementProtocolSecret", + requestType = com.google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest.class, + responseType = com.google.analytics.admin.v1beta.MeasurementProtocolSecret.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest, + com.google.analytics.admin.v1beta.MeasurementProtocolSecret> + getCreateMeasurementProtocolSecretMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest, + com.google.analytics.admin.v1beta.MeasurementProtocolSecret> + getCreateMeasurementProtocolSecretMethod; + if ((getCreateMeasurementProtocolSecretMethod = + AnalyticsAdminServiceGrpc.getCreateMeasurementProtocolSecretMethod) + == null) { + synchronized (AnalyticsAdminServiceGrpc.class) { + if ((getCreateMeasurementProtocolSecretMethod = + AnalyticsAdminServiceGrpc.getCreateMeasurementProtocolSecretMethod) + == null) { + AnalyticsAdminServiceGrpc.getCreateMeasurementProtocolSecretMethod = + getCreateMeasurementProtocolSecretMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateMeasurementProtocolSecret")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta + .CreateMeasurementProtocolSecretRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.MeasurementProtocolSecret + .getDefaultInstance())) + .setSchemaDescriptor( + new AnalyticsAdminServiceMethodDescriptorSupplier( + "CreateMeasurementProtocolSecret")) + .build(); + } + } + } + return getCreateMeasurementProtocolSecretMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest, + com.google.protobuf.Empty> + getDeleteMeasurementProtocolSecretMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteMeasurementProtocolSecret", + requestType = com.google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest, + com.google.protobuf.Empty> + getDeleteMeasurementProtocolSecretMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest, + com.google.protobuf.Empty> + getDeleteMeasurementProtocolSecretMethod; + if ((getDeleteMeasurementProtocolSecretMethod = + AnalyticsAdminServiceGrpc.getDeleteMeasurementProtocolSecretMethod) + == null) { + synchronized (AnalyticsAdminServiceGrpc.class) { + if ((getDeleteMeasurementProtocolSecretMethod = + AnalyticsAdminServiceGrpc.getDeleteMeasurementProtocolSecretMethod) + == null) { + AnalyticsAdminServiceGrpc.getDeleteMeasurementProtocolSecretMethod = + getDeleteMeasurementProtocolSecretMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeleteMeasurementProtocolSecret")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta + .DeleteMeasurementProtocolSecretRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new AnalyticsAdminServiceMethodDescriptorSupplier( + "DeleteMeasurementProtocolSecret")) + .build(); + } + } + } + return getDeleteMeasurementProtocolSecretMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest, + com.google.analytics.admin.v1beta.MeasurementProtocolSecret> + getUpdateMeasurementProtocolSecretMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateMeasurementProtocolSecret", + requestType = com.google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest.class, + responseType = com.google.analytics.admin.v1beta.MeasurementProtocolSecret.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest, + com.google.analytics.admin.v1beta.MeasurementProtocolSecret> + getUpdateMeasurementProtocolSecretMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest, + com.google.analytics.admin.v1beta.MeasurementProtocolSecret> + getUpdateMeasurementProtocolSecretMethod; + if ((getUpdateMeasurementProtocolSecretMethod = + AnalyticsAdminServiceGrpc.getUpdateMeasurementProtocolSecretMethod) + == null) { + synchronized (AnalyticsAdminServiceGrpc.class) { + if ((getUpdateMeasurementProtocolSecretMethod = + AnalyticsAdminServiceGrpc.getUpdateMeasurementProtocolSecretMethod) + == null) { + AnalyticsAdminServiceGrpc.getUpdateMeasurementProtocolSecretMethod = + getUpdateMeasurementProtocolSecretMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpdateMeasurementProtocolSecret")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta + .UpdateMeasurementProtocolSecretRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.MeasurementProtocolSecret + .getDefaultInstance())) + .setSchemaDescriptor( + new AnalyticsAdminServiceMethodDescriptorSupplier( + "UpdateMeasurementProtocolSecret")) + .build(); + } + } + } + return getUpdateMeasurementProtocolSecretMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest, + com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse> + getAcknowledgeUserDataCollectionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "AcknowledgeUserDataCollection", + requestType = com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest.class, + responseType = com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest, + com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse> + getAcknowledgeUserDataCollectionMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest, + com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse> + getAcknowledgeUserDataCollectionMethod; + if ((getAcknowledgeUserDataCollectionMethod = + AnalyticsAdminServiceGrpc.getAcknowledgeUserDataCollectionMethod) + == null) { + synchronized (AnalyticsAdminServiceGrpc.class) { + if ((getAcknowledgeUserDataCollectionMethod = + AnalyticsAdminServiceGrpc.getAcknowledgeUserDataCollectionMethod) + == null) { + AnalyticsAdminServiceGrpc.getAcknowledgeUserDataCollectionMethod = + getAcknowledgeUserDataCollectionMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "AcknowledgeUserDataCollection")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta + .AcknowledgeUserDataCollectionResponse.getDefaultInstance())) + .setSchemaDescriptor( + new AnalyticsAdminServiceMethodDescriptorSupplier( + "AcknowledgeUserDataCollection")) + .build(); + } + } + } + return getAcknowledgeUserDataCollectionMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest, + com.google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse> + getSearchChangeHistoryEventsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "SearchChangeHistoryEvents", + requestType = com.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest.class, + responseType = com.google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest, + com.google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse> + getSearchChangeHistoryEventsMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest, + com.google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse> + getSearchChangeHistoryEventsMethod; + if ((getSearchChangeHistoryEventsMethod = + AnalyticsAdminServiceGrpc.getSearchChangeHistoryEventsMethod) + == null) { + synchronized (AnalyticsAdminServiceGrpc.class) { + if ((getSearchChangeHistoryEventsMethod = + AnalyticsAdminServiceGrpc.getSearchChangeHistoryEventsMethod) + == null) { + AnalyticsAdminServiceGrpc.getSearchChangeHistoryEventsMethod = + getSearchChangeHistoryEventsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "SearchChangeHistoryEvents")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new AnalyticsAdminServiceMethodDescriptorSupplier( + "SearchChangeHistoryEvents")) + .build(); + } + } + } + return getSearchChangeHistoryEventsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.CreateConversionEventRequest, + com.google.analytics.admin.v1beta.ConversionEvent> + getCreateConversionEventMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateConversionEvent", + requestType = com.google.analytics.admin.v1beta.CreateConversionEventRequest.class, + responseType = com.google.analytics.admin.v1beta.ConversionEvent.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.CreateConversionEventRequest, + com.google.analytics.admin.v1beta.ConversionEvent> + getCreateConversionEventMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.CreateConversionEventRequest, + com.google.analytics.admin.v1beta.ConversionEvent> + getCreateConversionEventMethod; + if ((getCreateConversionEventMethod = AnalyticsAdminServiceGrpc.getCreateConversionEventMethod) + == null) { + synchronized (AnalyticsAdminServiceGrpc.class) { + if ((getCreateConversionEventMethod = + AnalyticsAdminServiceGrpc.getCreateConversionEventMethod) + == null) { + AnalyticsAdminServiceGrpc.getCreateConversionEventMethod = + getCreateConversionEventMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateConversionEvent")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.CreateConversionEventRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.ConversionEvent + .getDefaultInstance())) + .setSchemaDescriptor( + new AnalyticsAdminServiceMethodDescriptorSupplier( + "CreateConversionEvent")) + .build(); + } + } + } + return getCreateConversionEventMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.GetConversionEventRequest, + com.google.analytics.admin.v1beta.ConversionEvent> + getGetConversionEventMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetConversionEvent", + requestType = com.google.analytics.admin.v1beta.GetConversionEventRequest.class, + responseType = com.google.analytics.admin.v1beta.ConversionEvent.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.GetConversionEventRequest, + com.google.analytics.admin.v1beta.ConversionEvent> + getGetConversionEventMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.GetConversionEventRequest, + com.google.analytics.admin.v1beta.ConversionEvent> + getGetConversionEventMethod; + if ((getGetConversionEventMethod = AnalyticsAdminServiceGrpc.getGetConversionEventMethod) + == null) { + synchronized (AnalyticsAdminServiceGrpc.class) { + if ((getGetConversionEventMethod = AnalyticsAdminServiceGrpc.getGetConversionEventMethod) + == null) { + AnalyticsAdminServiceGrpc.getGetConversionEventMethod = + getGetConversionEventMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetConversionEvent")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.GetConversionEventRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.ConversionEvent + .getDefaultInstance())) + .setSchemaDescriptor( + new AnalyticsAdminServiceMethodDescriptorSupplier("GetConversionEvent")) + .build(); + } + } + } + return getGetConversionEventMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.DeleteConversionEventRequest, com.google.protobuf.Empty> + getDeleteConversionEventMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteConversionEvent", + requestType = com.google.analytics.admin.v1beta.DeleteConversionEventRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.DeleteConversionEventRequest, com.google.protobuf.Empty> + getDeleteConversionEventMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.DeleteConversionEventRequest, + com.google.protobuf.Empty> + getDeleteConversionEventMethod; + if ((getDeleteConversionEventMethod = AnalyticsAdminServiceGrpc.getDeleteConversionEventMethod) + == null) { + synchronized (AnalyticsAdminServiceGrpc.class) { + if ((getDeleteConversionEventMethod = + AnalyticsAdminServiceGrpc.getDeleteConversionEventMethod) + == null) { + AnalyticsAdminServiceGrpc.getDeleteConversionEventMethod = + getDeleteConversionEventMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeleteConversionEvent")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.DeleteConversionEventRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new AnalyticsAdminServiceMethodDescriptorSupplier( + "DeleteConversionEvent")) + .build(); + } + } + } + return getDeleteConversionEventMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.ListConversionEventsRequest, + com.google.analytics.admin.v1beta.ListConversionEventsResponse> + getListConversionEventsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListConversionEvents", + requestType = com.google.analytics.admin.v1beta.ListConversionEventsRequest.class, + responseType = com.google.analytics.admin.v1beta.ListConversionEventsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.ListConversionEventsRequest, + com.google.analytics.admin.v1beta.ListConversionEventsResponse> + getListConversionEventsMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.ListConversionEventsRequest, + com.google.analytics.admin.v1beta.ListConversionEventsResponse> + getListConversionEventsMethod; + if ((getListConversionEventsMethod = AnalyticsAdminServiceGrpc.getListConversionEventsMethod) + == null) { + synchronized (AnalyticsAdminServiceGrpc.class) { + if ((getListConversionEventsMethod = + AnalyticsAdminServiceGrpc.getListConversionEventsMethod) + == null) { + AnalyticsAdminServiceGrpc.getListConversionEventsMethod = + getListConversionEventsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListConversionEvents")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.ListConversionEventsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.ListConversionEventsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new AnalyticsAdminServiceMethodDescriptorSupplier("ListConversionEvents")) + .build(); + } + } + } + return getListConversionEventsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.CreateCustomDimensionRequest, + com.google.analytics.admin.v1beta.CustomDimension> + getCreateCustomDimensionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateCustomDimension", + requestType = com.google.analytics.admin.v1beta.CreateCustomDimensionRequest.class, + responseType = com.google.analytics.admin.v1beta.CustomDimension.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.CreateCustomDimensionRequest, + com.google.analytics.admin.v1beta.CustomDimension> + getCreateCustomDimensionMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.CreateCustomDimensionRequest, + com.google.analytics.admin.v1beta.CustomDimension> + getCreateCustomDimensionMethod; + if ((getCreateCustomDimensionMethod = AnalyticsAdminServiceGrpc.getCreateCustomDimensionMethod) + == null) { + synchronized (AnalyticsAdminServiceGrpc.class) { + if ((getCreateCustomDimensionMethod = + AnalyticsAdminServiceGrpc.getCreateCustomDimensionMethod) + == null) { + AnalyticsAdminServiceGrpc.getCreateCustomDimensionMethod = + getCreateCustomDimensionMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateCustomDimension")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.CreateCustomDimensionRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.CustomDimension + .getDefaultInstance())) + .setSchemaDescriptor( + new AnalyticsAdminServiceMethodDescriptorSupplier( + "CreateCustomDimension")) + .build(); + } + } + } + return getCreateCustomDimensionMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.UpdateCustomDimensionRequest, + com.google.analytics.admin.v1beta.CustomDimension> + getUpdateCustomDimensionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateCustomDimension", + requestType = com.google.analytics.admin.v1beta.UpdateCustomDimensionRequest.class, + responseType = com.google.analytics.admin.v1beta.CustomDimension.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.UpdateCustomDimensionRequest, + com.google.analytics.admin.v1beta.CustomDimension> + getUpdateCustomDimensionMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.UpdateCustomDimensionRequest, + com.google.analytics.admin.v1beta.CustomDimension> + getUpdateCustomDimensionMethod; + if ((getUpdateCustomDimensionMethod = AnalyticsAdminServiceGrpc.getUpdateCustomDimensionMethod) + == null) { + synchronized (AnalyticsAdminServiceGrpc.class) { + if ((getUpdateCustomDimensionMethod = + AnalyticsAdminServiceGrpc.getUpdateCustomDimensionMethod) + == null) { + AnalyticsAdminServiceGrpc.getUpdateCustomDimensionMethod = + getUpdateCustomDimensionMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpdateCustomDimension")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.UpdateCustomDimensionRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.CustomDimension + .getDefaultInstance())) + .setSchemaDescriptor( + new AnalyticsAdminServiceMethodDescriptorSupplier( + "UpdateCustomDimension")) + .build(); + } + } + } + return getUpdateCustomDimensionMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.ListCustomDimensionsRequest, + com.google.analytics.admin.v1beta.ListCustomDimensionsResponse> + getListCustomDimensionsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListCustomDimensions", + requestType = com.google.analytics.admin.v1beta.ListCustomDimensionsRequest.class, + responseType = com.google.analytics.admin.v1beta.ListCustomDimensionsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.ListCustomDimensionsRequest, + com.google.analytics.admin.v1beta.ListCustomDimensionsResponse> + getListCustomDimensionsMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.ListCustomDimensionsRequest, + com.google.analytics.admin.v1beta.ListCustomDimensionsResponse> + getListCustomDimensionsMethod; + if ((getListCustomDimensionsMethod = AnalyticsAdminServiceGrpc.getListCustomDimensionsMethod) + == null) { + synchronized (AnalyticsAdminServiceGrpc.class) { + if ((getListCustomDimensionsMethod = + AnalyticsAdminServiceGrpc.getListCustomDimensionsMethod) + == null) { + AnalyticsAdminServiceGrpc.getListCustomDimensionsMethod = + getListCustomDimensionsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListCustomDimensions")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.ListCustomDimensionsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.ListCustomDimensionsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new AnalyticsAdminServiceMethodDescriptorSupplier("ListCustomDimensions")) + .build(); + } + } + } + return getListCustomDimensionsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.ArchiveCustomDimensionRequest, + com.google.protobuf.Empty> + getArchiveCustomDimensionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ArchiveCustomDimension", + requestType = com.google.analytics.admin.v1beta.ArchiveCustomDimensionRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.ArchiveCustomDimensionRequest, + com.google.protobuf.Empty> + getArchiveCustomDimensionMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.ArchiveCustomDimensionRequest, + com.google.protobuf.Empty> + getArchiveCustomDimensionMethod; + if ((getArchiveCustomDimensionMethod = + AnalyticsAdminServiceGrpc.getArchiveCustomDimensionMethod) + == null) { + synchronized (AnalyticsAdminServiceGrpc.class) { + if ((getArchiveCustomDimensionMethod = + AnalyticsAdminServiceGrpc.getArchiveCustomDimensionMethod) + == null) { + AnalyticsAdminServiceGrpc.getArchiveCustomDimensionMethod = + getArchiveCustomDimensionMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ArchiveCustomDimension")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.ArchiveCustomDimensionRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new AnalyticsAdminServiceMethodDescriptorSupplier( + "ArchiveCustomDimension")) + .build(); + } + } + } + return getArchiveCustomDimensionMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.GetCustomDimensionRequest, + com.google.analytics.admin.v1beta.CustomDimension> + getGetCustomDimensionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetCustomDimension", + requestType = com.google.analytics.admin.v1beta.GetCustomDimensionRequest.class, + responseType = com.google.analytics.admin.v1beta.CustomDimension.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.GetCustomDimensionRequest, + com.google.analytics.admin.v1beta.CustomDimension> + getGetCustomDimensionMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.GetCustomDimensionRequest, + com.google.analytics.admin.v1beta.CustomDimension> + getGetCustomDimensionMethod; + if ((getGetCustomDimensionMethod = AnalyticsAdminServiceGrpc.getGetCustomDimensionMethod) + == null) { + synchronized (AnalyticsAdminServiceGrpc.class) { + if ((getGetCustomDimensionMethod = AnalyticsAdminServiceGrpc.getGetCustomDimensionMethod) + == null) { + AnalyticsAdminServiceGrpc.getGetCustomDimensionMethod = + getGetCustomDimensionMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetCustomDimension")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.GetCustomDimensionRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.CustomDimension + .getDefaultInstance())) + .setSchemaDescriptor( + new AnalyticsAdminServiceMethodDescriptorSupplier("GetCustomDimension")) + .build(); + } + } + } + return getGetCustomDimensionMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.CreateCustomMetricRequest, + com.google.analytics.admin.v1beta.CustomMetric> + getCreateCustomMetricMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateCustomMetric", + requestType = com.google.analytics.admin.v1beta.CreateCustomMetricRequest.class, + responseType = com.google.analytics.admin.v1beta.CustomMetric.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.CreateCustomMetricRequest, + com.google.analytics.admin.v1beta.CustomMetric> + getCreateCustomMetricMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.CreateCustomMetricRequest, + com.google.analytics.admin.v1beta.CustomMetric> + getCreateCustomMetricMethod; + if ((getCreateCustomMetricMethod = AnalyticsAdminServiceGrpc.getCreateCustomMetricMethod) + == null) { + synchronized (AnalyticsAdminServiceGrpc.class) { + if ((getCreateCustomMetricMethod = AnalyticsAdminServiceGrpc.getCreateCustomMetricMethod) + == null) { + AnalyticsAdminServiceGrpc.getCreateCustomMetricMethod = + getCreateCustomMetricMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateCustomMetric")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.CreateCustomMetricRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.CustomMetric.getDefaultInstance())) + .setSchemaDescriptor( + new AnalyticsAdminServiceMethodDescriptorSupplier("CreateCustomMetric")) + .build(); + } + } + } + return getCreateCustomMetricMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.UpdateCustomMetricRequest, + com.google.analytics.admin.v1beta.CustomMetric> + getUpdateCustomMetricMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateCustomMetric", + requestType = com.google.analytics.admin.v1beta.UpdateCustomMetricRequest.class, + responseType = com.google.analytics.admin.v1beta.CustomMetric.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.UpdateCustomMetricRequest, + com.google.analytics.admin.v1beta.CustomMetric> + getUpdateCustomMetricMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.UpdateCustomMetricRequest, + com.google.analytics.admin.v1beta.CustomMetric> + getUpdateCustomMetricMethod; + if ((getUpdateCustomMetricMethod = AnalyticsAdminServiceGrpc.getUpdateCustomMetricMethod) + == null) { + synchronized (AnalyticsAdminServiceGrpc.class) { + if ((getUpdateCustomMetricMethod = AnalyticsAdminServiceGrpc.getUpdateCustomMetricMethod) + == null) { + AnalyticsAdminServiceGrpc.getUpdateCustomMetricMethod = + getUpdateCustomMetricMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateCustomMetric")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.UpdateCustomMetricRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.CustomMetric.getDefaultInstance())) + .setSchemaDescriptor( + new AnalyticsAdminServiceMethodDescriptorSupplier("UpdateCustomMetric")) + .build(); + } + } + } + return getUpdateCustomMetricMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.ListCustomMetricsRequest, + com.google.analytics.admin.v1beta.ListCustomMetricsResponse> + getListCustomMetricsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListCustomMetrics", + requestType = com.google.analytics.admin.v1beta.ListCustomMetricsRequest.class, + responseType = com.google.analytics.admin.v1beta.ListCustomMetricsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.ListCustomMetricsRequest, + com.google.analytics.admin.v1beta.ListCustomMetricsResponse> + getListCustomMetricsMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.ListCustomMetricsRequest, + com.google.analytics.admin.v1beta.ListCustomMetricsResponse> + getListCustomMetricsMethod; + if ((getListCustomMetricsMethod = AnalyticsAdminServiceGrpc.getListCustomMetricsMethod) + == null) { + synchronized (AnalyticsAdminServiceGrpc.class) { + if ((getListCustomMetricsMethod = AnalyticsAdminServiceGrpc.getListCustomMetricsMethod) + == null) { + AnalyticsAdminServiceGrpc.getListCustomMetricsMethod = + getListCustomMetricsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListCustomMetrics")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.ListCustomMetricsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.ListCustomMetricsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new AnalyticsAdminServiceMethodDescriptorSupplier("ListCustomMetrics")) + .build(); + } + } + } + return getListCustomMetricsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.ArchiveCustomMetricRequest, com.google.protobuf.Empty> + getArchiveCustomMetricMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ArchiveCustomMetric", + requestType = com.google.analytics.admin.v1beta.ArchiveCustomMetricRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.ArchiveCustomMetricRequest, com.google.protobuf.Empty> + getArchiveCustomMetricMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.ArchiveCustomMetricRequest, com.google.protobuf.Empty> + getArchiveCustomMetricMethod; + if ((getArchiveCustomMetricMethod = AnalyticsAdminServiceGrpc.getArchiveCustomMetricMethod) + == null) { + synchronized (AnalyticsAdminServiceGrpc.class) { + if ((getArchiveCustomMetricMethod = AnalyticsAdminServiceGrpc.getArchiveCustomMetricMethod) + == null) { + AnalyticsAdminServiceGrpc.getArchiveCustomMetricMethod = + getArchiveCustomMetricMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ArchiveCustomMetric")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.ArchiveCustomMetricRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new AnalyticsAdminServiceMethodDescriptorSupplier("ArchiveCustomMetric")) + .build(); + } + } + } + return getArchiveCustomMetricMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.GetCustomMetricRequest, + com.google.analytics.admin.v1beta.CustomMetric> + getGetCustomMetricMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetCustomMetric", + requestType = com.google.analytics.admin.v1beta.GetCustomMetricRequest.class, + responseType = com.google.analytics.admin.v1beta.CustomMetric.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.GetCustomMetricRequest, + com.google.analytics.admin.v1beta.CustomMetric> + getGetCustomMetricMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.GetCustomMetricRequest, + com.google.analytics.admin.v1beta.CustomMetric> + getGetCustomMetricMethod; + if ((getGetCustomMetricMethod = AnalyticsAdminServiceGrpc.getGetCustomMetricMethod) == null) { + synchronized (AnalyticsAdminServiceGrpc.class) { + if ((getGetCustomMetricMethod = AnalyticsAdminServiceGrpc.getGetCustomMetricMethod) + == null) { + AnalyticsAdminServiceGrpc.getGetCustomMetricMethod = + getGetCustomMetricMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetCustomMetric")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.GetCustomMetricRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.CustomMetric.getDefaultInstance())) + .setSchemaDescriptor( + new AnalyticsAdminServiceMethodDescriptorSupplier("GetCustomMetric")) + .build(); + } + } + } + return getGetCustomMetricMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.GetDataRetentionSettingsRequest, + com.google.analytics.admin.v1beta.DataRetentionSettings> + getGetDataRetentionSettingsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetDataRetentionSettings", + requestType = com.google.analytics.admin.v1beta.GetDataRetentionSettingsRequest.class, + responseType = com.google.analytics.admin.v1beta.DataRetentionSettings.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.GetDataRetentionSettingsRequest, + com.google.analytics.admin.v1beta.DataRetentionSettings> + getGetDataRetentionSettingsMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.GetDataRetentionSettingsRequest, + com.google.analytics.admin.v1beta.DataRetentionSettings> + getGetDataRetentionSettingsMethod; + if ((getGetDataRetentionSettingsMethod = + AnalyticsAdminServiceGrpc.getGetDataRetentionSettingsMethod) + == null) { + synchronized (AnalyticsAdminServiceGrpc.class) { + if ((getGetDataRetentionSettingsMethod = + AnalyticsAdminServiceGrpc.getGetDataRetentionSettingsMethod) + == null) { + AnalyticsAdminServiceGrpc.getGetDataRetentionSettingsMethod = + getGetDataRetentionSettingsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetDataRetentionSettings")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.GetDataRetentionSettingsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.DataRetentionSettings + .getDefaultInstance())) + .setSchemaDescriptor( + new AnalyticsAdminServiceMethodDescriptorSupplier( + "GetDataRetentionSettings")) + .build(); + } + } + } + return getGetDataRetentionSettingsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest, + com.google.analytics.admin.v1beta.DataRetentionSettings> + getUpdateDataRetentionSettingsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateDataRetentionSettings", + requestType = com.google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest.class, + responseType = com.google.analytics.admin.v1beta.DataRetentionSettings.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest, + com.google.analytics.admin.v1beta.DataRetentionSettings> + getUpdateDataRetentionSettingsMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest, + com.google.analytics.admin.v1beta.DataRetentionSettings> + getUpdateDataRetentionSettingsMethod; + if ((getUpdateDataRetentionSettingsMethod = + AnalyticsAdminServiceGrpc.getUpdateDataRetentionSettingsMethod) + == null) { + synchronized (AnalyticsAdminServiceGrpc.class) { + if ((getUpdateDataRetentionSettingsMethod = + AnalyticsAdminServiceGrpc.getUpdateDataRetentionSettingsMethod) + == null) { + AnalyticsAdminServiceGrpc.getUpdateDataRetentionSettingsMethod = + getUpdateDataRetentionSettingsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpdateDataRetentionSettings")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.DataRetentionSettings + .getDefaultInstance())) + .setSchemaDescriptor( + new AnalyticsAdminServiceMethodDescriptorSupplier( + "UpdateDataRetentionSettings")) + .build(); + } + } + } + return getUpdateDataRetentionSettingsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.CreateDataStreamRequest, + com.google.analytics.admin.v1beta.DataStream> + getCreateDataStreamMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateDataStream", + requestType = com.google.analytics.admin.v1beta.CreateDataStreamRequest.class, + responseType = com.google.analytics.admin.v1beta.DataStream.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.CreateDataStreamRequest, + com.google.analytics.admin.v1beta.DataStream> + getCreateDataStreamMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.CreateDataStreamRequest, + com.google.analytics.admin.v1beta.DataStream> + getCreateDataStreamMethod; + if ((getCreateDataStreamMethod = AnalyticsAdminServiceGrpc.getCreateDataStreamMethod) == null) { + synchronized (AnalyticsAdminServiceGrpc.class) { + if ((getCreateDataStreamMethod = AnalyticsAdminServiceGrpc.getCreateDataStreamMethod) + == null) { + AnalyticsAdminServiceGrpc.getCreateDataStreamMethod = + getCreateDataStreamMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateDataStream")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.CreateDataStreamRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.DataStream.getDefaultInstance())) + .setSchemaDescriptor( + new AnalyticsAdminServiceMethodDescriptorSupplier("CreateDataStream")) + .build(); + } + } + } + return getCreateDataStreamMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.DeleteDataStreamRequest, com.google.protobuf.Empty> + getDeleteDataStreamMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteDataStream", + requestType = com.google.analytics.admin.v1beta.DeleteDataStreamRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.DeleteDataStreamRequest, com.google.protobuf.Empty> + getDeleteDataStreamMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.DeleteDataStreamRequest, com.google.protobuf.Empty> + getDeleteDataStreamMethod; + if ((getDeleteDataStreamMethod = AnalyticsAdminServiceGrpc.getDeleteDataStreamMethod) == null) { + synchronized (AnalyticsAdminServiceGrpc.class) { + if ((getDeleteDataStreamMethod = AnalyticsAdminServiceGrpc.getDeleteDataStreamMethod) + == null) { + AnalyticsAdminServiceGrpc.getDeleteDataStreamMethod = + getDeleteDataStreamMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteDataStream")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.DeleteDataStreamRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new AnalyticsAdminServiceMethodDescriptorSupplier("DeleteDataStream")) + .build(); + } + } + } + return getDeleteDataStreamMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.UpdateDataStreamRequest, + com.google.analytics.admin.v1beta.DataStream> + getUpdateDataStreamMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateDataStream", + requestType = com.google.analytics.admin.v1beta.UpdateDataStreamRequest.class, + responseType = com.google.analytics.admin.v1beta.DataStream.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.UpdateDataStreamRequest, + com.google.analytics.admin.v1beta.DataStream> + getUpdateDataStreamMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.UpdateDataStreamRequest, + com.google.analytics.admin.v1beta.DataStream> + getUpdateDataStreamMethod; + if ((getUpdateDataStreamMethod = AnalyticsAdminServiceGrpc.getUpdateDataStreamMethod) == null) { + synchronized (AnalyticsAdminServiceGrpc.class) { + if ((getUpdateDataStreamMethod = AnalyticsAdminServiceGrpc.getUpdateDataStreamMethod) + == null) { + AnalyticsAdminServiceGrpc.getUpdateDataStreamMethod = + getUpdateDataStreamMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateDataStream")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.UpdateDataStreamRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.DataStream.getDefaultInstance())) + .setSchemaDescriptor( + new AnalyticsAdminServiceMethodDescriptorSupplier("UpdateDataStream")) + .build(); + } + } + } + return getUpdateDataStreamMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.ListDataStreamsRequest, + com.google.analytics.admin.v1beta.ListDataStreamsResponse> + getListDataStreamsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListDataStreams", + requestType = com.google.analytics.admin.v1beta.ListDataStreamsRequest.class, + responseType = com.google.analytics.admin.v1beta.ListDataStreamsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.ListDataStreamsRequest, + com.google.analytics.admin.v1beta.ListDataStreamsResponse> + getListDataStreamsMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.ListDataStreamsRequest, + com.google.analytics.admin.v1beta.ListDataStreamsResponse> + getListDataStreamsMethod; + if ((getListDataStreamsMethod = AnalyticsAdminServiceGrpc.getListDataStreamsMethod) == null) { + synchronized (AnalyticsAdminServiceGrpc.class) { + if ((getListDataStreamsMethod = AnalyticsAdminServiceGrpc.getListDataStreamsMethod) + == null) { + AnalyticsAdminServiceGrpc.getListDataStreamsMethod = + getListDataStreamsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListDataStreams")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.ListDataStreamsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.ListDataStreamsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new AnalyticsAdminServiceMethodDescriptorSupplier("ListDataStreams")) + .build(); + } + } + } + return getListDataStreamsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.GetDataStreamRequest, + com.google.analytics.admin.v1beta.DataStream> + getGetDataStreamMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetDataStream", + requestType = com.google.analytics.admin.v1beta.GetDataStreamRequest.class, + responseType = com.google.analytics.admin.v1beta.DataStream.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.GetDataStreamRequest, + com.google.analytics.admin.v1beta.DataStream> + getGetDataStreamMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.admin.v1beta.GetDataStreamRequest, + com.google.analytics.admin.v1beta.DataStream> + getGetDataStreamMethod; + if ((getGetDataStreamMethod = AnalyticsAdminServiceGrpc.getGetDataStreamMethod) == null) { + synchronized (AnalyticsAdminServiceGrpc.class) { + if ((getGetDataStreamMethod = AnalyticsAdminServiceGrpc.getGetDataStreamMethod) == null) { + AnalyticsAdminServiceGrpc.getGetDataStreamMethod = + getGetDataStreamMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetDataStream")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.GetDataStreamRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1beta.DataStream.getDefaultInstance())) + .setSchemaDescriptor( + new AnalyticsAdminServiceMethodDescriptorSupplier("GetDataStream")) + .build(); + } + } + } + return getGetDataStreamMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static AnalyticsAdminServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public AnalyticsAdminServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AnalyticsAdminServiceStub(channel, callOptions); + } + }; + return AnalyticsAdminServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static AnalyticsAdminServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public AnalyticsAdminServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AnalyticsAdminServiceBlockingStub(channel, callOptions); + } + }; + return AnalyticsAdminServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static AnalyticsAdminServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public AnalyticsAdminServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AnalyticsAdminServiceFutureStub(channel, callOptions); + } + }; + return AnalyticsAdminServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Service Interface for the Analytics Admin API (GA4).
+   * 
+ */ + public abstract static class AnalyticsAdminServiceImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * Lookup for a single Account.
+     * 
+ */ + public void getAccount( + com.google.analytics.admin.v1beta.GetAccountRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetAccountMethod(), responseObserver); + } + + /** + * + * + *
+     * Returns all accounts accessible by the caller.
+     * Note that these accounts might not currently have GA4 properties.
+     * Soft-deleted (ie: "trashed") accounts are excluded by default.
+     * Returns an empty list if no relevant accounts are found.
+     * 
+ */ + public void listAccounts( + com.google.analytics.admin.v1beta.ListAccountsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListAccountsMethod(), responseObserver); + } + + /** + * + * + *
+     * Marks target Account as soft-deleted (ie: "trashed") and returns it.
+     * This API does not have a method to restore soft-deleted accounts.
+     * However, they can be restored using the Trash Can UI.
+     * If the accounts are not restored before the expiration time, the account
+     * and all child resources (eg: Properties, GoogleAdsLinks, Streams,
+     * UserLinks) will be permanently purged.
+     * https://support.google.com/analytics/answer/6154772
+     * Returns an error if the target is not found.
+     * 
+ */ + public void deleteAccount( + com.google.analytics.admin.v1beta.DeleteAccountRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteAccountMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates an account.
+     * 
+ */ + public void updateAccount( + com.google.analytics.admin.v1beta.UpdateAccountRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateAccountMethod(), responseObserver); + } + + /** + * + * + *
+     * Requests a ticket for creating an account.
+     * 
+ */ + public void provisionAccountTicket( + com.google.analytics.admin.v1beta.ProvisionAccountTicketRequest request, + io.grpc.stub.StreamObserver< + com.google.analytics.admin.v1beta.ProvisionAccountTicketResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getProvisionAccountTicketMethod(), responseObserver); + } + + /** + * + * + *
+     * Returns summaries of all accounts accessible by the caller.
+     * 
+ */ + public void listAccountSummaries( + com.google.analytics.admin.v1beta.ListAccountSummariesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListAccountSummariesMethod(), responseObserver); + } + + /** + * + * + *
+     * Lookup for a single "GA4" Property.
+     * 
+ */ + public void getProperty( + com.google.analytics.admin.v1beta.GetPropertyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetPropertyMethod(), responseObserver); + } + + /** + * + * + *
+     * Returns child Properties under the specified parent Account.
+     * Only "GA4" properties will be returned.
+     * Properties will be excluded if the caller does not have access.
+     * Soft-deleted (ie: "trashed") properties are excluded by default.
+     * Returns an empty list if no relevant properties are found.
+     * 
+ */ + public void listProperties( + com.google.analytics.admin.v1beta.ListPropertiesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListPropertiesMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates an "GA4" property with the specified location and attributes.
+     * 
+ */ + public void createProperty( + com.google.analytics.admin.v1beta.CreatePropertyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreatePropertyMethod(), responseObserver); + } + + /** + * + * + *
+     * Marks target Property as soft-deleted (ie: "trashed") and returns it.
+     * This API does not have a method to restore soft-deleted properties.
+     * However, they can be restored using the Trash Can UI.
+     * If the properties are not restored before the expiration time, the Property
+     * and all child resources (eg: GoogleAdsLinks, Streams, UserLinks)
+     * will be permanently purged.
+     * https://support.google.com/analytics/answer/6154772
+     * Returns an error if the target is not found, or is not an GA4 Property.
+     * 
+ */ + public void deleteProperty( + com.google.analytics.admin.v1beta.DeletePropertyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeletePropertyMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates a property.
+     * 
+ */ + public void updateProperty( + com.google.analytics.admin.v1beta.UpdatePropertyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdatePropertyMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a FirebaseLink.
+     * Properties can have at most one FirebaseLink.
+     * 
+ */ + public void createFirebaseLink( + com.google.analytics.admin.v1beta.CreateFirebaseLinkRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateFirebaseLinkMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a FirebaseLink on a property
+     * 
+ */ + public void deleteFirebaseLink( + com.google.analytics.admin.v1beta.DeleteFirebaseLinkRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteFirebaseLinkMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists FirebaseLinks on a property.
+     * Properties can have at most one FirebaseLink.
+     * 
+ */ + public void listFirebaseLinks( + com.google.analytics.admin.v1beta.ListFirebaseLinksRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListFirebaseLinksMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a GoogleAdsLink.
+     * 
+ */ + public void createGoogleAdsLink( + com.google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateGoogleAdsLinkMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates a GoogleAdsLink on a property
+     * 
+ */ + public void updateGoogleAdsLink( + com.google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateGoogleAdsLinkMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a GoogleAdsLink on a property
+     * 
+ */ + public void deleteGoogleAdsLink( + com.google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteGoogleAdsLinkMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists GoogleAdsLinks on a property.
+     * 
+ */ + public void listGoogleAdsLinks( + com.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListGoogleAdsLinksMethod(), responseObserver); + } + + /** + * + * + *
+     * Get data sharing settings on an account.
+     * Data sharing settings are singletons.
+     * 
+ */ + public void getDataSharingSettings( + com.google.analytics.admin.v1beta.GetDataSharingSettingsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetDataSharingSettingsMethod(), responseObserver); + } + + /** + * + * + *
+     * Lookup for a single "GA4" MeasurementProtocolSecret.
+     * 
+ */ + public void getMeasurementProtocolSecret( + com.google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetMeasurementProtocolSecretMethod(), responseObserver); + } + + /** + * + * + *
+     * Returns child MeasurementProtocolSecrets under the specified parent
+     * Property.
+     * 
+ */ + public void listMeasurementProtocolSecrets( + com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest request, + io.grpc.stub.StreamObserver< + com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListMeasurementProtocolSecretsMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a measurement protocol secret.
+     * 
+ */ + public void createMeasurementProtocolSecret( + com.google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateMeasurementProtocolSecretMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes target MeasurementProtocolSecret.
+     * 
+ */ + public void deleteMeasurementProtocolSecret( + com.google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteMeasurementProtocolSecretMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates a measurement protocol secret.
+     * 
+ */ + public void updateMeasurementProtocolSecret( + com.google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateMeasurementProtocolSecretMethod(), responseObserver); + } + + /** + * + * + *
+     * Acknowledges the terms of user data collection for the specified property.
+     * This acknowledgement must be completed (either in the Google Analytics UI
+     * or via this API) before MeasurementProtocolSecret resources may be created.
+     * 
+ */ + public void acknowledgeUserDataCollection( + com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest request, + io.grpc.stub.StreamObserver< + com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getAcknowledgeUserDataCollectionMethod(), responseObserver); + } + + /** + * + * + *
+     * Searches through all changes to an account or its children given the
+     * specified set of filters.
+     * 
+ */ + public void searchChangeHistoryEvents( + com.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest request, + io.grpc.stub.StreamObserver< + com.google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getSearchChangeHistoryEventsMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a conversion event with the specified attributes.
+     * 
+ */ + public void createConversionEvent( + com.google.analytics.admin.v1beta.CreateConversionEventRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateConversionEventMethod(), responseObserver); + } + + /** + * + * + *
+     * Retrieve a single conversion event.
+     * 
+ */ + public void getConversionEvent( + com.google.analytics.admin.v1beta.GetConversionEventRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetConversionEventMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a conversion event in a property.
+     * 
+ */ + public void deleteConversionEvent( + com.google.analytics.admin.v1beta.DeleteConversionEventRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteConversionEventMethod(), responseObserver); + } + + /** + * + * + *
+     * Returns a list of conversion events in the specified parent property.
+     * Returns an empty list if no conversion events are found.
+     * 
+ */ + public void listConversionEvents( + com.google.analytics.admin.v1beta.ListConversionEventsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListConversionEventsMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a CustomDimension.
+     * 
+ */ + public void createCustomDimension( + com.google.analytics.admin.v1beta.CreateCustomDimensionRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateCustomDimensionMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates a CustomDimension on a property.
+     * 
+ */ + public void updateCustomDimension( + com.google.analytics.admin.v1beta.UpdateCustomDimensionRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateCustomDimensionMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists CustomDimensions on a property.
+     * 
+ */ + public void listCustomDimensions( + com.google.analytics.admin.v1beta.ListCustomDimensionsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListCustomDimensionsMethod(), responseObserver); + } + + /** + * + * + *
+     * Archives a CustomDimension on a property.
+     * 
+ */ + public void archiveCustomDimension( + com.google.analytics.admin.v1beta.ArchiveCustomDimensionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getArchiveCustomDimensionMethod(), responseObserver); + } + + /** + * + * + *
+     * Lookup for a single CustomDimension.
+     * 
+ */ + public void getCustomDimension( + com.google.analytics.admin.v1beta.GetCustomDimensionRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetCustomDimensionMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a CustomMetric.
+     * 
+ */ + public void createCustomMetric( + com.google.analytics.admin.v1beta.CreateCustomMetricRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateCustomMetricMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates a CustomMetric on a property.
+     * 
+ */ + public void updateCustomMetric( + com.google.analytics.admin.v1beta.UpdateCustomMetricRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateCustomMetricMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists CustomMetrics on a property.
+     * 
+ */ + public void listCustomMetrics( + com.google.analytics.admin.v1beta.ListCustomMetricsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListCustomMetricsMethod(), responseObserver); + } + + /** + * + * + *
+     * Archives a CustomMetric on a property.
+     * 
+ */ + public void archiveCustomMetric( + com.google.analytics.admin.v1beta.ArchiveCustomMetricRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getArchiveCustomMetricMethod(), responseObserver); + } + + /** + * + * + *
+     * Lookup for a single CustomMetric.
+     * 
+ */ + public void getCustomMetric( + com.google.analytics.admin.v1beta.GetCustomMetricRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetCustomMetricMethod(), responseObserver); + } + + /** + * + * + *
+     * Returns the singleton data retention settings for this property.
+     * 
+ */ + public void getDataRetentionSettings( + com.google.analytics.admin.v1beta.GetDataRetentionSettingsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetDataRetentionSettingsMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the singleton data retention settings for this property.
+     * 
+ */ + public void updateDataRetentionSettings( + com.google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateDataRetentionSettingsMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a DataStream.
+     * 
+ */ + public void createDataStream( + com.google.analytics.admin.v1beta.CreateDataStreamRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateDataStreamMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a DataStream on a property.
+     * 
+ */ + public void deleteDataStream( + com.google.analytics.admin.v1beta.DeleteDataStreamRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteDataStreamMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates a DataStream on a property.
+     * 
+ */ + public void updateDataStream( + com.google.analytics.admin.v1beta.UpdateDataStreamRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateDataStreamMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists DataStreams on a property.
+     * 
+ */ + public void listDataStreams( + com.google.analytics.admin.v1beta.ListDataStreamsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListDataStreamsMethod(), responseObserver); + } + + /** + * + * + *
+     * Lookup for a single DataStream.
+     * 
+ */ + public void getDataStream( + com.google.analytics.admin.v1beta.GetDataStreamRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetDataStreamMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getGetAccountMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.analytics.admin.v1beta.GetAccountRequest, + com.google.analytics.admin.v1beta.Account>(this, METHODID_GET_ACCOUNT))) + .addMethod( + getListAccountsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.analytics.admin.v1beta.ListAccountsRequest, + com.google.analytics.admin.v1beta.ListAccountsResponse>( + this, METHODID_LIST_ACCOUNTS))) + .addMethod( + getDeleteAccountMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.analytics.admin.v1beta.DeleteAccountRequest, + com.google.protobuf.Empty>(this, METHODID_DELETE_ACCOUNT))) + .addMethod( + getUpdateAccountMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.analytics.admin.v1beta.UpdateAccountRequest, + com.google.analytics.admin.v1beta.Account>(this, METHODID_UPDATE_ACCOUNT))) + .addMethod( + getProvisionAccountTicketMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.analytics.admin.v1beta.ProvisionAccountTicketRequest, + com.google.analytics.admin.v1beta.ProvisionAccountTicketResponse>( + this, METHODID_PROVISION_ACCOUNT_TICKET))) + .addMethod( + getListAccountSummariesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.analytics.admin.v1beta.ListAccountSummariesRequest, + com.google.analytics.admin.v1beta.ListAccountSummariesResponse>( + this, METHODID_LIST_ACCOUNT_SUMMARIES))) + .addMethod( + getGetPropertyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.analytics.admin.v1beta.GetPropertyRequest, + com.google.analytics.admin.v1beta.Property>(this, METHODID_GET_PROPERTY))) + .addMethod( + getListPropertiesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.analytics.admin.v1beta.ListPropertiesRequest, + com.google.analytics.admin.v1beta.ListPropertiesResponse>( + this, METHODID_LIST_PROPERTIES))) + .addMethod( + getCreatePropertyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.analytics.admin.v1beta.CreatePropertyRequest, + com.google.analytics.admin.v1beta.Property>(this, METHODID_CREATE_PROPERTY))) + .addMethod( + getDeletePropertyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.analytics.admin.v1beta.DeletePropertyRequest, + com.google.analytics.admin.v1beta.Property>(this, METHODID_DELETE_PROPERTY))) + .addMethod( + getUpdatePropertyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.analytics.admin.v1beta.UpdatePropertyRequest, + com.google.analytics.admin.v1beta.Property>(this, METHODID_UPDATE_PROPERTY))) + .addMethod( + getCreateFirebaseLinkMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.analytics.admin.v1beta.CreateFirebaseLinkRequest, + com.google.analytics.admin.v1beta.FirebaseLink>( + this, METHODID_CREATE_FIREBASE_LINK))) + .addMethod( + getDeleteFirebaseLinkMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.analytics.admin.v1beta.DeleteFirebaseLinkRequest, + com.google.protobuf.Empty>(this, METHODID_DELETE_FIREBASE_LINK))) + .addMethod( + getListFirebaseLinksMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.analytics.admin.v1beta.ListFirebaseLinksRequest, + com.google.analytics.admin.v1beta.ListFirebaseLinksResponse>( + this, METHODID_LIST_FIREBASE_LINKS))) + .addMethod( + getCreateGoogleAdsLinkMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest, + com.google.analytics.admin.v1beta.GoogleAdsLink>( + this, METHODID_CREATE_GOOGLE_ADS_LINK))) + .addMethod( + getUpdateGoogleAdsLinkMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest, + com.google.analytics.admin.v1beta.GoogleAdsLink>( + this, METHODID_UPDATE_GOOGLE_ADS_LINK))) + .addMethod( + getDeleteGoogleAdsLinkMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest, + com.google.protobuf.Empty>(this, METHODID_DELETE_GOOGLE_ADS_LINK))) + .addMethod( + getListGoogleAdsLinksMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest, + com.google.analytics.admin.v1beta.ListGoogleAdsLinksResponse>( + this, METHODID_LIST_GOOGLE_ADS_LINKS))) + .addMethod( + getGetDataSharingSettingsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.analytics.admin.v1beta.GetDataSharingSettingsRequest, + com.google.analytics.admin.v1beta.DataSharingSettings>( + this, METHODID_GET_DATA_SHARING_SETTINGS))) + .addMethod( + getGetMeasurementProtocolSecretMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest, + com.google.analytics.admin.v1beta.MeasurementProtocolSecret>( + this, METHODID_GET_MEASUREMENT_PROTOCOL_SECRET))) + .addMethod( + getListMeasurementProtocolSecretsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest, + com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse>( + this, METHODID_LIST_MEASUREMENT_PROTOCOL_SECRETS))) + .addMethod( + getCreateMeasurementProtocolSecretMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest, + com.google.analytics.admin.v1beta.MeasurementProtocolSecret>( + this, METHODID_CREATE_MEASUREMENT_PROTOCOL_SECRET))) + .addMethod( + getDeleteMeasurementProtocolSecretMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest, + com.google.protobuf.Empty>( + this, METHODID_DELETE_MEASUREMENT_PROTOCOL_SECRET))) + .addMethod( + getUpdateMeasurementProtocolSecretMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest, + com.google.analytics.admin.v1beta.MeasurementProtocolSecret>( + this, METHODID_UPDATE_MEASUREMENT_PROTOCOL_SECRET))) + .addMethod( + getAcknowledgeUserDataCollectionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest, + com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse>( + this, METHODID_ACKNOWLEDGE_USER_DATA_COLLECTION))) + .addMethod( + getSearchChangeHistoryEventsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest, + com.google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse>( + this, METHODID_SEARCH_CHANGE_HISTORY_EVENTS))) + .addMethod( + getCreateConversionEventMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.analytics.admin.v1beta.CreateConversionEventRequest, + com.google.analytics.admin.v1beta.ConversionEvent>( + this, METHODID_CREATE_CONVERSION_EVENT))) + .addMethod( + getGetConversionEventMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.analytics.admin.v1beta.GetConversionEventRequest, + com.google.analytics.admin.v1beta.ConversionEvent>( + this, METHODID_GET_CONVERSION_EVENT))) + .addMethod( + getDeleteConversionEventMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.analytics.admin.v1beta.DeleteConversionEventRequest, + com.google.protobuf.Empty>(this, METHODID_DELETE_CONVERSION_EVENT))) + .addMethod( + getListConversionEventsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.analytics.admin.v1beta.ListConversionEventsRequest, + com.google.analytics.admin.v1beta.ListConversionEventsResponse>( + this, METHODID_LIST_CONVERSION_EVENTS))) + .addMethod( + getCreateCustomDimensionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.analytics.admin.v1beta.CreateCustomDimensionRequest, + com.google.analytics.admin.v1beta.CustomDimension>( + this, METHODID_CREATE_CUSTOM_DIMENSION))) + .addMethod( + getUpdateCustomDimensionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.analytics.admin.v1beta.UpdateCustomDimensionRequest, + com.google.analytics.admin.v1beta.CustomDimension>( + this, METHODID_UPDATE_CUSTOM_DIMENSION))) + .addMethod( + getListCustomDimensionsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.analytics.admin.v1beta.ListCustomDimensionsRequest, + com.google.analytics.admin.v1beta.ListCustomDimensionsResponse>( + this, METHODID_LIST_CUSTOM_DIMENSIONS))) + .addMethod( + getArchiveCustomDimensionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.analytics.admin.v1beta.ArchiveCustomDimensionRequest, + com.google.protobuf.Empty>(this, METHODID_ARCHIVE_CUSTOM_DIMENSION))) + .addMethod( + getGetCustomDimensionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.analytics.admin.v1beta.GetCustomDimensionRequest, + com.google.analytics.admin.v1beta.CustomDimension>( + this, METHODID_GET_CUSTOM_DIMENSION))) + .addMethod( + getCreateCustomMetricMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.analytics.admin.v1beta.CreateCustomMetricRequest, + com.google.analytics.admin.v1beta.CustomMetric>( + this, METHODID_CREATE_CUSTOM_METRIC))) + .addMethod( + getUpdateCustomMetricMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.analytics.admin.v1beta.UpdateCustomMetricRequest, + com.google.analytics.admin.v1beta.CustomMetric>( + this, METHODID_UPDATE_CUSTOM_METRIC))) + .addMethod( + getListCustomMetricsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.analytics.admin.v1beta.ListCustomMetricsRequest, + com.google.analytics.admin.v1beta.ListCustomMetricsResponse>( + this, METHODID_LIST_CUSTOM_METRICS))) + .addMethod( + getArchiveCustomMetricMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.analytics.admin.v1beta.ArchiveCustomMetricRequest, + com.google.protobuf.Empty>(this, METHODID_ARCHIVE_CUSTOM_METRIC))) + .addMethod( + getGetCustomMetricMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.analytics.admin.v1beta.GetCustomMetricRequest, + com.google.analytics.admin.v1beta.CustomMetric>( + this, METHODID_GET_CUSTOM_METRIC))) + .addMethod( + getGetDataRetentionSettingsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.analytics.admin.v1beta.GetDataRetentionSettingsRequest, + com.google.analytics.admin.v1beta.DataRetentionSettings>( + this, METHODID_GET_DATA_RETENTION_SETTINGS))) + .addMethod( + getUpdateDataRetentionSettingsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest, + com.google.analytics.admin.v1beta.DataRetentionSettings>( + this, METHODID_UPDATE_DATA_RETENTION_SETTINGS))) + .addMethod( + getCreateDataStreamMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.analytics.admin.v1beta.CreateDataStreamRequest, + com.google.analytics.admin.v1beta.DataStream>( + this, METHODID_CREATE_DATA_STREAM))) + .addMethod( + getDeleteDataStreamMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.analytics.admin.v1beta.DeleteDataStreamRequest, + com.google.protobuf.Empty>(this, METHODID_DELETE_DATA_STREAM))) + .addMethod( + getUpdateDataStreamMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.analytics.admin.v1beta.UpdateDataStreamRequest, + com.google.analytics.admin.v1beta.DataStream>( + this, METHODID_UPDATE_DATA_STREAM))) + .addMethod( + getListDataStreamsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.analytics.admin.v1beta.ListDataStreamsRequest, + com.google.analytics.admin.v1beta.ListDataStreamsResponse>( + this, METHODID_LIST_DATA_STREAMS))) + .addMethod( + getGetDataStreamMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.analytics.admin.v1beta.GetDataStreamRequest, + com.google.analytics.admin.v1beta.DataStream>( + this, METHODID_GET_DATA_STREAM))) + .build(); + } + } + + /** + * + * + *
+   * Service Interface for the Analytics Admin API (GA4).
+   * 
+ */ + public static final class AnalyticsAdminServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private AnalyticsAdminServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected AnalyticsAdminServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AnalyticsAdminServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Lookup for a single Account.
+     * 
+ */ + public void getAccount( + com.google.analytics.admin.v1beta.GetAccountRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetAccountMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Returns all accounts accessible by the caller.
+     * Note that these accounts might not currently have GA4 properties.
+     * Soft-deleted (ie: "trashed") accounts are excluded by default.
+     * Returns an empty list if no relevant accounts are found.
+     * 
+ */ + public void listAccounts( + com.google.analytics.admin.v1beta.ListAccountsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListAccountsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Marks target Account as soft-deleted (ie: "trashed") and returns it.
+     * This API does not have a method to restore soft-deleted accounts.
+     * However, they can be restored using the Trash Can UI.
+     * If the accounts are not restored before the expiration time, the account
+     * and all child resources (eg: Properties, GoogleAdsLinks, Streams,
+     * UserLinks) will be permanently purged.
+     * https://support.google.com/analytics/answer/6154772
+     * Returns an error if the target is not found.
+     * 
+ */ + public void deleteAccount( + com.google.analytics.admin.v1beta.DeleteAccountRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteAccountMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates an account.
+     * 
+ */ + public void updateAccount( + com.google.analytics.admin.v1beta.UpdateAccountRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateAccountMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Requests a ticket for creating an account.
+     * 
+ */ + public void provisionAccountTicket( + com.google.analytics.admin.v1beta.ProvisionAccountTicketRequest request, + io.grpc.stub.StreamObserver< + com.google.analytics.admin.v1beta.ProvisionAccountTicketResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getProvisionAccountTicketMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Returns summaries of all accounts accessible by the caller.
+     * 
+ */ + public void listAccountSummaries( + com.google.analytics.admin.v1beta.ListAccountSummariesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListAccountSummariesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lookup for a single "GA4" Property.
+     * 
+ */ + public void getProperty( + com.google.analytics.admin.v1beta.GetPropertyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetPropertyMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Returns child Properties under the specified parent Account.
+     * Only "GA4" properties will be returned.
+     * Properties will be excluded if the caller does not have access.
+     * Soft-deleted (ie: "trashed") properties are excluded by default.
+     * Returns an empty list if no relevant properties are found.
+     * 
+ */ + public void listProperties( + com.google.analytics.admin.v1beta.ListPropertiesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListPropertiesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates an "GA4" property with the specified location and attributes.
+     * 
+ */ + public void createProperty( + com.google.analytics.admin.v1beta.CreatePropertyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreatePropertyMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Marks target Property as soft-deleted (ie: "trashed") and returns it.
+     * This API does not have a method to restore soft-deleted properties.
+     * However, they can be restored using the Trash Can UI.
+     * If the properties are not restored before the expiration time, the Property
+     * and all child resources (eg: GoogleAdsLinks, Streams, UserLinks)
+     * will be permanently purged.
+     * https://support.google.com/analytics/answer/6154772
+     * Returns an error if the target is not found, or is not an GA4 Property.
+     * 
+ */ + public void deleteProperty( + com.google.analytics.admin.v1beta.DeletePropertyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeletePropertyMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates a property.
+     * 
+ */ + public void updateProperty( + com.google.analytics.admin.v1beta.UpdatePropertyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdatePropertyMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a FirebaseLink.
+     * Properties can have at most one FirebaseLink.
+     * 
+ */ + public void createFirebaseLink( + com.google.analytics.admin.v1beta.CreateFirebaseLinkRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateFirebaseLinkMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a FirebaseLink on a property
+     * 
+ */ + public void deleteFirebaseLink( + com.google.analytics.admin.v1beta.DeleteFirebaseLinkRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteFirebaseLinkMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists FirebaseLinks on a property.
+     * Properties can have at most one FirebaseLink.
+     * 
+ */ + public void listFirebaseLinks( + com.google.analytics.admin.v1beta.ListFirebaseLinksRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListFirebaseLinksMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a GoogleAdsLink.
+     * 
+ */ + public void createGoogleAdsLink( + com.google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateGoogleAdsLinkMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates a GoogleAdsLink on a property
+     * 
+ */ + public void updateGoogleAdsLink( + com.google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateGoogleAdsLinkMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a GoogleAdsLink on a property
+     * 
+ */ + public void deleteGoogleAdsLink( + com.google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteGoogleAdsLinkMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists GoogleAdsLinks on a property.
+     * 
+ */ + public void listGoogleAdsLinks( + com.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListGoogleAdsLinksMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Get data sharing settings on an account.
+     * Data sharing settings are singletons.
+     * 
+ */ + public void getDataSharingSettings( + com.google.analytics.admin.v1beta.GetDataSharingSettingsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetDataSharingSettingsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lookup for a single "GA4" MeasurementProtocolSecret.
+     * 
+ */ + public void getMeasurementProtocolSecret( + com.google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetMeasurementProtocolSecretMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Returns child MeasurementProtocolSecrets under the specified parent
+     * Property.
+     * 
+ */ + public void listMeasurementProtocolSecrets( + com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest request, + io.grpc.stub.StreamObserver< + com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListMeasurementProtocolSecretsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a measurement protocol secret.
+     * 
+ */ + public void createMeasurementProtocolSecret( + com.google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateMeasurementProtocolSecretMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes target MeasurementProtocolSecret.
+     * 
+ */ + public void deleteMeasurementProtocolSecret( + com.google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteMeasurementProtocolSecretMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates a measurement protocol secret.
+     * 
+ */ + public void updateMeasurementProtocolSecret( + com.google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateMeasurementProtocolSecretMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Acknowledges the terms of user data collection for the specified property.
+     * This acknowledgement must be completed (either in the Google Analytics UI
+     * or via this API) before MeasurementProtocolSecret resources may be created.
+     * 
+ */ + public void acknowledgeUserDataCollection( + com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest request, + io.grpc.stub.StreamObserver< + com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getAcknowledgeUserDataCollectionMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Searches through all changes to an account or its children given the
+     * specified set of filters.
+     * 
+ */ + public void searchChangeHistoryEvents( + com.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest request, + io.grpc.stub.StreamObserver< + com.google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getSearchChangeHistoryEventsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a conversion event with the specified attributes.
+     * 
+ */ + public void createConversionEvent( + com.google.analytics.admin.v1beta.CreateConversionEventRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateConversionEventMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Retrieve a single conversion event.
+     * 
+ */ + public void getConversionEvent( + com.google.analytics.admin.v1beta.GetConversionEventRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetConversionEventMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a conversion event in a property.
+     * 
+ */ + public void deleteConversionEvent( + com.google.analytics.admin.v1beta.DeleteConversionEventRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteConversionEventMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Returns a list of conversion events in the specified parent property.
+     * Returns an empty list if no conversion events are found.
+     * 
+ */ + public void listConversionEvents( + com.google.analytics.admin.v1beta.ListConversionEventsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListConversionEventsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a CustomDimension.
+     * 
+ */ + public void createCustomDimension( + com.google.analytics.admin.v1beta.CreateCustomDimensionRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateCustomDimensionMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates a CustomDimension on a property.
+     * 
+ */ + public void updateCustomDimension( + com.google.analytics.admin.v1beta.UpdateCustomDimensionRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateCustomDimensionMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists CustomDimensions on a property.
+     * 
+ */ + public void listCustomDimensions( + com.google.analytics.admin.v1beta.ListCustomDimensionsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListCustomDimensionsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Archives a CustomDimension on a property.
+     * 
+ */ + public void archiveCustomDimension( + com.google.analytics.admin.v1beta.ArchiveCustomDimensionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getArchiveCustomDimensionMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lookup for a single CustomDimension.
+     * 
+ */ + public void getCustomDimension( + com.google.analytics.admin.v1beta.GetCustomDimensionRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetCustomDimensionMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a CustomMetric.
+     * 
+ */ + public void createCustomMetric( + com.google.analytics.admin.v1beta.CreateCustomMetricRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateCustomMetricMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates a CustomMetric on a property.
+     * 
+ */ + public void updateCustomMetric( + com.google.analytics.admin.v1beta.UpdateCustomMetricRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateCustomMetricMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists CustomMetrics on a property.
+     * 
+ */ + public void listCustomMetrics( + com.google.analytics.admin.v1beta.ListCustomMetricsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListCustomMetricsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Archives a CustomMetric on a property.
+     * 
+ */ + public void archiveCustomMetric( + com.google.analytics.admin.v1beta.ArchiveCustomMetricRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getArchiveCustomMetricMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lookup for a single CustomMetric.
+     * 
+ */ + public void getCustomMetric( + com.google.analytics.admin.v1beta.GetCustomMetricRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetCustomMetricMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Returns the singleton data retention settings for this property.
+     * 
+ */ + public void getDataRetentionSettings( + com.google.analytics.admin.v1beta.GetDataRetentionSettingsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetDataRetentionSettingsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the singleton data retention settings for this property.
+     * 
+ */ + public void updateDataRetentionSettings( + com.google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateDataRetentionSettingsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a DataStream.
+     * 
+ */ + public void createDataStream( + com.google.analytics.admin.v1beta.CreateDataStreamRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateDataStreamMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a DataStream on a property.
+     * 
+ */ + public void deleteDataStream( + com.google.analytics.admin.v1beta.DeleteDataStreamRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteDataStreamMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates a DataStream on a property.
+     * 
+ */ + public void updateDataStream( + com.google.analytics.admin.v1beta.UpdateDataStreamRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateDataStreamMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists DataStreams on a property.
+     * 
+ */ + public void listDataStreams( + com.google.analytics.admin.v1beta.ListDataStreamsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListDataStreamsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lookup for a single DataStream.
+     * 
+ */ + public void getDataStream( + com.google.analytics.admin.v1beta.GetDataStreamRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetDataStreamMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+   * Service Interface for the Analytics Admin API (GA4).
+   * 
+ */ + public static final class AnalyticsAdminServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private AnalyticsAdminServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected AnalyticsAdminServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AnalyticsAdminServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Lookup for a single Account.
+     * 
+ */ + public com.google.analytics.admin.v1beta.Account getAccount( + com.google.analytics.admin.v1beta.GetAccountRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetAccountMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Returns all accounts accessible by the caller.
+     * Note that these accounts might not currently have GA4 properties.
+     * Soft-deleted (ie: "trashed") accounts are excluded by default.
+     * Returns an empty list if no relevant accounts are found.
+     * 
+ */ + public com.google.analytics.admin.v1beta.ListAccountsResponse listAccounts( + com.google.analytics.admin.v1beta.ListAccountsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListAccountsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Marks target Account as soft-deleted (ie: "trashed") and returns it.
+     * This API does not have a method to restore soft-deleted accounts.
+     * However, they can be restored using the Trash Can UI.
+     * If the accounts are not restored before the expiration time, the account
+     * and all child resources (eg: Properties, GoogleAdsLinks, Streams,
+     * UserLinks) will be permanently purged.
+     * https://support.google.com/analytics/answer/6154772
+     * Returns an error if the target is not found.
+     * 
+ */ + public com.google.protobuf.Empty deleteAccount( + com.google.analytics.admin.v1beta.DeleteAccountRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteAccountMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates an account.
+     * 
+ */ + public com.google.analytics.admin.v1beta.Account updateAccount( + com.google.analytics.admin.v1beta.UpdateAccountRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateAccountMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Requests a ticket for creating an account.
+     * 
+ */ + public com.google.analytics.admin.v1beta.ProvisionAccountTicketResponse provisionAccountTicket( + com.google.analytics.admin.v1beta.ProvisionAccountTicketRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getProvisionAccountTicketMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Returns summaries of all accounts accessible by the caller.
+     * 
+ */ + public com.google.analytics.admin.v1beta.ListAccountSummariesResponse listAccountSummaries( + com.google.analytics.admin.v1beta.ListAccountSummariesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListAccountSummariesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lookup for a single "GA4" Property.
+     * 
+ */ + public com.google.analytics.admin.v1beta.Property getProperty( + com.google.analytics.admin.v1beta.GetPropertyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetPropertyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Returns child Properties under the specified parent Account.
+     * Only "GA4" properties will be returned.
+     * Properties will be excluded if the caller does not have access.
+     * Soft-deleted (ie: "trashed") properties are excluded by default.
+     * Returns an empty list if no relevant properties are found.
+     * 
+ */ + public com.google.analytics.admin.v1beta.ListPropertiesResponse listProperties( + com.google.analytics.admin.v1beta.ListPropertiesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListPropertiesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates an "GA4" property with the specified location and attributes.
+     * 
+ */ + public com.google.analytics.admin.v1beta.Property createProperty( + com.google.analytics.admin.v1beta.CreatePropertyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreatePropertyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Marks target Property as soft-deleted (ie: "trashed") and returns it.
+     * This API does not have a method to restore soft-deleted properties.
+     * However, they can be restored using the Trash Can UI.
+     * If the properties are not restored before the expiration time, the Property
+     * and all child resources (eg: GoogleAdsLinks, Streams, UserLinks)
+     * will be permanently purged.
+     * https://support.google.com/analytics/answer/6154772
+     * Returns an error if the target is not found, or is not an GA4 Property.
+     * 
+ */ + public com.google.analytics.admin.v1beta.Property deleteProperty( + com.google.analytics.admin.v1beta.DeletePropertyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeletePropertyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates a property.
+     * 
+ */ + public com.google.analytics.admin.v1beta.Property updateProperty( + com.google.analytics.admin.v1beta.UpdatePropertyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdatePropertyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a FirebaseLink.
+     * Properties can have at most one FirebaseLink.
+     * 
+ */ + public com.google.analytics.admin.v1beta.FirebaseLink createFirebaseLink( + com.google.analytics.admin.v1beta.CreateFirebaseLinkRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateFirebaseLinkMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a FirebaseLink on a property
+     * 
+ */ + public com.google.protobuf.Empty deleteFirebaseLink( + com.google.analytics.admin.v1beta.DeleteFirebaseLinkRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteFirebaseLinkMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists FirebaseLinks on a property.
+     * Properties can have at most one FirebaseLink.
+     * 
+ */ + public com.google.analytics.admin.v1beta.ListFirebaseLinksResponse listFirebaseLinks( + com.google.analytics.admin.v1beta.ListFirebaseLinksRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListFirebaseLinksMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a GoogleAdsLink.
+     * 
+ */ + public com.google.analytics.admin.v1beta.GoogleAdsLink createGoogleAdsLink( + com.google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateGoogleAdsLinkMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates a GoogleAdsLink on a property
+     * 
+ */ + public com.google.analytics.admin.v1beta.GoogleAdsLink updateGoogleAdsLink( + com.google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateGoogleAdsLinkMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a GoogleAdsLink on a property
+     * 
+ */ + public com.google.protobuf.Empty deleteGoogleAdsLink( + com.google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteGoogleAdsLinkMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists GoogleAdsLinks on a property.
+     * 
+ */ + public com.google.analytics.admin.v1beta.ListGoogleAdsLinksResponse listGoogleAdsLinks( + com.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListGoogleAdsLinksMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Get data sharing settings on an account.
+     * Data sharing settings are singletons.
+     * 
+ */ + public com.google.analytics.admin.v1beta.DataSharingSettings getDataSharingSettings( + com.google.analytics.admin.v1beta.GetDataSharingSettingsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetDataSharingSettingsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lookup for a single "GA4" MeasurementProtocolSecret.
+     * 
+ */ + public com.google.analytics.admin.v1beta.MeasurementProtocolSecret getMeasurementProtocolSecret( + com.google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetMeasurementProtocolSecretMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Returns child MeasurementProtocolSecrets under the specified parent
+     * Property.
+     * 
+ */ + public com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse + listMeasurementProtocolSecrets( + com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListMeasurementProtocolSecretsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a measurement protocol secret.
+     * 
+ */ + public com.google.analytics.admin.v1beta.MeasurementProtocolSecret + createMeasurementProtocolSecret( + com.google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateMeasurementProtocolSecretMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes target MeasurementProtocolSecret.
+     * 
+ */ + public com.google.protobuf.Empty deleteMeasurementProtocolSecret( + com.google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteMeasurementProtocolSecretMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates a measurement protocol secret.
+     * 
+ */ + public com.google.analytics.admin.v1beta.MeasurementProtocolSecret + updateMeasurementProtocolSecret( + com.google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateMeasurementProtocolSecretMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Acknowledges the terms of user data collection for the specified property.
+     * This acknowledgement must be completed (either in the Google Analytics UI
+     * or via this API) before MeasurementProtocolSecret resources may be created.
+     * 
+ */ + public com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse + acknowledgeUserDataCollection( + com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getAcknowledgeUserDataCollectionMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Searches through all changes to an account or its children given the
+     * specified set of filters.
+     * 
+ */ + public com.google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse + searchChangeHistoryEvents( + com.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getSearchChangeHistoryEventsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a conversion event with the specified attributes.
+     * 
+ */ + public com.google.analytics.admin.v1beta.ConversionEvent createConversionEvent( + com.google.analytics.admin.v1beta.CreateConversionEventRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateConversionEventMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Retrieve a single conversion event.
+     * 
+ */ + public com.google.analytics.admin.v1beta.ConversionEvent getConversionEvent( + com.google.analytics.admin.v1beta.GetConversionEventRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetConversionEventMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a conversion event in a property.
+     * 
+ */ + public com.google.protobuf.Empty deleteConversionEvent( + com.google.analytics.admin.v1beta.DeleteConversionEventRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteConversionEventMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Returns a list of conversion events in the specified parent property.
+     * Returns an empty list if no conversion events are found.
+     * 
+ */ + public com.google.analytics.admin.v1beta.ListConversionEventsResponse listConversionEvents( + com.google.analytics.admin.v1beta.ListConversionEventsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListConversionEventsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a CustomDimension.
+     * 
+ */ + public com.google.analytics.admin.v1beta.CustomDimension createCustomDimension( + com.google.analytics.admin.v1beta.CreateCustomDimensionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateCustomDimensionMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates a CustomDimension on a property.
+     * 
+ */ + public com.google.analytics.admin.v1beta.CustomDimension updateCustomDimension( + com.google.analytics.admin.v1beta.UpdateCustomDimensionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateCustomDimensionMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists CustomDimensions on a property.
+     * 
+ */ + public com.google.analytics.admin.v1beta.ListCustomDimensionsResponse listCustomDimensions( + com.google.analytics.admin.v1beta.ListCustomDimensionsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListCustomDimensionsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Archives a CustomDimension on a property.
+     * 
+ */ + public com.google.protobuf.Empty archiveCustomDimension( + com.google.analytics.admin.v1beta.ArchiveCustomDimensionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getArchiveCustomDimensionMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lookup for a single CustomDimension.
+     * 
+ */ + public com.google.analytics.admin.v1beta.CustomDimension getCustomDimension( + com.google.analytics.admin.v1beta.GetCustomDimensionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetCustomDimensionMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a CustomMetric.
+     * 
+ */ + public com.google.analytics.admin.v1beta.CustomMetric createCustomMetric( + com.google.analytics.admin.v1beta.CreateCustomMetricRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateCustomMetricMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates a CustomMetric on a property.
+     * 
+ */ + public com.google.analytics.admin.v1beta.CustomMetric updateCustomMetric( + com.google.analytics.admin.v1beta.UpdateCustomMetricRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateCustomMetricMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists CustomMetrics on a property.
+     * 
+ */ + public com.google.analytics.admin.v1beta.ListCustomMetricsResponse listCustomMetrics( + com.google.analytics.admin.v1beta.ListCustomMetricsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListCustomMetricsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Archives a CustomMetric on a property.
+     * 
+ */ + public com.google.protobuf.Empty archiveCustomMetric( + com.google.analytics.admin.v1beta.ArchiveCustomMetricRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getArchiveCustomMetricMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lookup for a single CustomMetric.
+     * 
+ */ + public com.google.analytics.admin.v1beta.CustomMetric getCustomMetric( + com.google.analytics.admin.v1beta.GetCustomMetricRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetCustomMetricMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Returns the singleton data retention settings for this property.
+     * 
+ */ + public com.google.analytics.admin.v1beta.DataRetentionSettings getDataRetentionSettings( + com.google.analytics.admin.v1beta.GetDataRetentionSettingsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetDataRetentionSettingsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the singleton data retention settings for this property.
+     * 
+ */ + public com.google.analytics.admin.v1beta.DataRetentionSettings updateDataRetentionSettings( + com.google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateDataRetentionSettingsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a DataStream.
+     * 
+ */ + public com.google.analytics.admin.v1beta.DataStream createDataStream( + com.google.analytics.admin.v1beta.CreateDataStreamRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateDataStreamMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a DataStream on a property.
+     * 
+ */ + public com.google.protobuf.Empty deleteDataStream( + com.google.analytics.admin.v1beta.DeleteDataStreamRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteDataStreamMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates a DataStream on a property.
+     * 
+ */ + public com.google.analytics.admin.v1beta.DataStream updateDataStream( + com.google.analytics.admin.v1beta.UpdateDataStreamRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateDataStreamMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists DataStreams on a property.
+     * 
+ */ + public com.google.analytics.admin.v1beta.ListDataStreamsResponse listDataStreams( + com.google.analytics.admin.v1beta.ListDataStreamsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListDataStreamsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lookup for a single DataStream.
+     * 
+ */ + public com.google.analytics.admin.v1beta.DataStream getDataStream( + com.google.analytics.admin.v1beta.GetDataStreamRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetDataStreamMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * Service Interface for the Analytics Admin API (GA4).
+   * 
+ */ + public static final class AnalyticsAdminServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private AnalyticsAdminServiceFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected AnalyticsAdminServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AnalyticsAdminServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Lookup for a single Account.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.analytics.admin.v1beta.Account> + getAccount(com.google.analytics.admin.v1beta.GetAccountRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetAccountMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Returns all accounts accessible by the caller.
+     * Note that these accounts might not currently have GA4 properties.
+     * Soft-deleted (ie: "trashed") accounts are excluded by default.
+     * Returns an empty list if no relevant accounts are found.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.analytics.admin.v1beta.ListAccountsResponse> + listAccounts(com.google.analytics.admin.v1beta.ListAccountsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListAccountsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Marks target Account as soft-deleted (ie: "trashed") and returns it.
+     * This API does not have a method to restore soft-deleted accounts.
+     * However, they can be restored using the Trash Can UI.
+     * If the accounts are not restored before the expiration time, the account
+     * and all child resources (eg: Properties, GoogleAdsLinks, Streams,
+     * UserLinks) will be permanently purged.
+     * https://support.google.com/analytics/answer/6154772
+     * Returns an error if the target is not found.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteAccount(com.google.analytics.admin.v1beta.DeleteAccountRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteAccountMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates an account.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.analytics.admin.v1beta.Account> + updateAccount(com.google.analytics.admin.v1beta.UpdateAccountRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateAccountMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Requests a ticket for creating an account.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.analytics.admin.v1beta.ProvisionAccountTicketResponse> + provisionAccountTicket( + com.google.analytics.admin.v1beta.ProvisionAccountTicketRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getProvisionAccountTicketMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Returns summaries of all accounts accessible by the caller.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.analytics.admin.v1beta.ListAccountSummariesResponse> + listAccountSummaries( + com.google.analytics.admin.v1beta.ListAccountSummariesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListAccountSummariesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lookup for a single "GA4" Property.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.analytics.admin.v1beta.Property> + getProperty(com.google.analytics.admin.v1beta.GetPropertyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetPropertyMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Returns child Properties under the specified parent Account.
+     * Only "GA4" properties will be returned.
+     * Properties will be excluded if the caller does not have access.
+     * Soft-deleted (ie: "trashed") properties are excluded by default.
+     * Returns an empty list if no relevant properties are found.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.analytics.admin.v1beta.ListPropertiesResponse> + listProperties(com.google.analytics.admin.v1beta.ListPropertiesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListPropertiesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates an "GA4" property with the specified location and attributes.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.analytics.admin.v1beta.Property> + createProperty(com.google.analytics.admin.v1beta.CreatePropertyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreatePropertyMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Marks target Property as soft-deleted (ie: "trashed") and returns it.
+     * This API does not have a method to restore soft-deleted properties.
+     * However, they can be restored using the Trash Can UI.
+     * If the properties are not restored before the expiration time, the Property
+     * and all child resources (eg: GoogleAdsLinks, Streams, UserLinks)
+     * will be permanently purged.
+     * https://support.google.com/analytics/answer/6154772
+     * Returns an error if the target is not found, or is not an GA4 Property.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.analytics.admin.v1beta.Property> + deleteProperty(com.google.analytics.admin.v1beta.DeletePropertyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeletePropertyMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates a property.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.analytics.admin.v1beta.Property> + updateProperty(com.google.analytics.admin.v1beta.UpdatePropertyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdatePropertyMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a FirebaseLink.
+     * Properties can have at most one FirebaseLink.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.analytics.admin.v1beta.FirebaseLink> + createFirebaseLink(com.google.analytics.admin.v1beta.CreateFirebaseLinkRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateFirebaseLinkMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a FirebaseLink on a property
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteFirebaseLink(com.google.analytics.admin.v1beta.DeleteFirebaseLinkRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteFirebaseLinkMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists FirebaseLinks on a property.
+     * Properties can have at most one FirebaseLink.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.analytics.admin.v1beta.ListFirebaseLinksResponse> + listFirebaseLinks(com.google.analytics.admin.v1beta.ListFirebaseLinksRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListFirebaseLinksMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a GoogleAdsLink.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.analytics.admin.v1beta.GoogleAdsLink> + createGoogleAdsLink(com.google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateGoogleAdsLinkMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates a GoogleAdsLink on a property
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.analytics.admin.v1beta.GoogleAdsLink> + updateGoogleAdsLink(com.google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateGoogleAdsLinkMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a GoogleAdsLink on a property
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteGoogleAdsLink(com.google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteGoogleAdsLinkMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists GoogleAdsLinks on a property.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.analytics.admin.v1beta.ListGoogleAdsLinksResponse> + listGoogleAdsLinks(com.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListGoogleAdsLinksMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Get data sharing settings on an account.
+     * Data sharing settings are singletons.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.analytics.admin.v1beta.DataSharingSettings> + getDataSharingSettings( + com.google.analytics.admin.v1beta.GetDataSharingSettingsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetDataSharingSettingsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lookup for a single "GA4" MeasurementProtocolSecret.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.analytics.admin.v1beta.MeasurementProtocolSecret> + getMeasurementProtocolSecret( + com.google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetMeasurementProtocolSecretMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Returns child MeasurementProtocolSecrets under the specified parent
+     * Property.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse> + listMeasurementProtocolSecrets( + com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListMeasurementProtocolSecretsMethod(), getCallOptions()), + request); + } + + /** + * + * + *
+     * Creates a measurement protocol secret.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.analytics.admin.v1beta.MeasurementProtocolSecret> + createMeasurementProtocolSecret( + com.google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateMeasurementProtocolSecretMethod(), getCallOptions()), + request); + } + + /** + * + * + *
+     * Deletes target MeasurementProtocolSecret.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteMeasurementProtocolSecret( + com.google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteMeasurementProtocolSecretMethod(), getCallOptions()), + request); + } + + /** + * + * + *
+     * Updates a measurement protocol secret.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.analytics.admin.v1beta.MeasurementProtocolSecret> + updateMeasurementProtocolSecret( + com.google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateMeasurementProtocolSecretMethod(), getCallOptions()), + request); + } + + /** + * + * + *
+     * Acknowledges the terms of user data collection for the specified property.
+     * This acknowledgement must be completed (either in the Google Analytics UI
+     * or via this API) before MeasurementProtocolSecret resources may be created.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse> + acknowledgeUserDataCollection( + com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getAcknowledgeUserDataCollectionMethod(), getCallOptions()), + request); + } + + /** + * + * + *
+     * Searches through all changes to an account or its children given the
+     * specified set of filters.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse> + searchChangeHistoryEvents( + com.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getSearchChangeHistoryEventsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a conversion event with the specified attributes.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.analytics.admin.v1beta.ConversionEvent> + createConversionEvent( + com.google.analytics.admin.v1beta.CreateConversionEventRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateConversionEventMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Retrieve a single conversion event.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.analytics.admin.v1beta.ConversionEvent> + getConversionEvent(com.google.analytics.admin.v1beta.GetConversionEventRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetConversionEventMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a conversion event in a property.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteConversionEvent( + com.google.analytics.admin.v1beta.DeleteConversionEventRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteConversionEventMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Returns a list of conversion events in the specified parent property.
+     * Returns an empty list if no conversion events are found.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.analytics.admin.v1beta.ListConversionEventsResponse> + listConversionEvents( + com.google.analytics.admin.v1beta.ListConversionEventsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListConversionEventsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a CustomDimension.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.analytics.admin.v1beta.CustomDimension> + createCustomDimension( + com.google.analytics.admin.v1beta.CreateCustomDimensionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateCustomDimensionMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates a CustomDimension on a property.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.analytics.admin.v1beta.CustomDimension> + updateCustomDimension( + com.google.analytics.admin.v1beta.UpdateCustomDimensionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateCustomDimensionMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists CustomDimensions on a property.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.analytics.admin.v1beta.ListCustomDimensionsResponse> + listCustomDimensions( + com.google.analytics.admin.v1beta.ListCustomDimensionsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListCustomDimensionsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Archives a CustomDimension on a property.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + archiveCustomDimension( + com.google.analytics.admin.v1beta.ArchiveCustomDimensionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getArchiveCustomDimensionMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lookup for a single CustomDimension.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.analytics.admin.v1beta.CustomDimension> + getCustomDimension(com.google.analytics.admin.v1beta.GetCustomDimensionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetCustomDimensionMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a CustomMetric.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.analytics.admin.v1beta.CustomMetric> + createCustomMetric(com.google.analytics.admin.v1beta.CreateCustomMetricRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateCustomMetricMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates a CustomMetric on a property.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.analytics.admin.v1beta.CustomMetric> + updateCustomMetric(com.google.analytics.admin.v1beta.UpdateCustomMetricRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateCustomMetricMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists CustomMetrics on a property.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.analytics.admin.v1beta.ListCustomMetricsResponse> + listCustomMetrics(com.google.analytics.admin.v1beta.ListCustomMetricsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListCustomMetricsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Archives a CustomMetric on a property.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + archiveCustomMetric(com.google.analytics.admin.v1beta.ArchiveCustomMetricRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getArchiveCustomMetricMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lookup for a single CustomMetric.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.analytics.admin.v1beta.CustomMetric> + getCustomMetric(com.google.analytics.admin.v1beta.GetCustomMetricRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetCustomMetricMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Returns the singleton data retention settings for this property.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.analytics.admin.v1beta.DataRetentionSettings> + getDataRetentionSettings( + com.google.analytics.admin.v1beta.GetDataRetentionSettingsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetDataRetentionSettingsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the singleton data retention settings for this property.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.analytics.admin.v1beta.DataRetentionSettings> + updateDataRetentionSettings( + com.google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateDataRetentionSettingsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a DataStream.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.analytics.admin.v1beta.DataStream> + createDataStream(com.google.analytics.admin.v1beta.CreateDataStreamRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateDataStreamMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a DataStream on a property.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteDataStream(com.google.analytics.admin.v1beta.DeleteDataStreamRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteDataStreamMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates a DataStream on a property.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.analytics.admin.v1beta.DataStream> + updateDataStream(com.google.analytics.admin.v1beta.UpdateDataStreamRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateDataStreamMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists DataStreams on a property.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.analytics.admin.v1beta.ListDataStreamsResponse> + listDataStreams(com.google.analytics.admin.v1beta.ListDataStreamsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListDataStreamsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lookup for a single DataStream.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.analytics.admin.v1beta.DataStream> + getDataStream(com.google.analytics.admin.v1beta.GetDataStreamRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetDataStreamMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_GET_ACCOUNT = 0; + private static final int METHODID_LIST_ACCOUNTS = 1; + private static final int METHODID_DELETE_ACCOUNT = 2; + private static final int METHODID_UPDATE_ACCOUNT = 3; + private static final int METHODID_PROVISION_ACCOUNT_TICKET = 4; + private static final int METHODID_LIST_ACCOUNT_SUMMARIES = 5; + private static final int METHODID_GET_PROPERTY = 6; + private static final int METHODID_LIST_PROPERTIES = 7; + private static final int METHODID_CREATE_PROPERTY = 8; + private static final int METHODID_DELETE_PROPERTY = 9; + private static final int METHODID_UPDATE_PROPERTY = 10; + private static final int METHODID_CREATE_FIREBASE_LINK = 11; + private static final int METHODID_DELETE_FIREBASE_LINK = 12; + private static final int METHODID_LIST_FIREBASE_LINKS = 13; + private static final int METHODID_CREATE_GOOGLE_ADS_LINK = 14; + private static final int METHODID_UPDATE_GOOGLE_ADS_LINK = 15; + private static final int METHODID_DELETE_GOOGLE_ADS_LINK = 16; + private static final int METHODID_LIST_GOOGLE_ADS_LINKS = 17; + private static final int METHODID_GET_DATA_SHARING_SETTINGS = 18; + private static final int METHODID_GET_MEASUREMENT_PROTOCOL_SECRET = 19; + private static final int METHODID_LIST_MEASUREMENT_PROTOCOL_SECRETS = 20; + private static final int METHODID_CREATE_MEASUREMENT_PROTOCOL_SECRET = 21; + private static final int METHODID_DELETE_MEASUREMENT_PROTOCOL_SECRET = 22; + private static final int METHODID_UPDATE_MEASUREMENT_PROTOCOL_SECRET = 23; + private static final int METHODID_ACKNOWLEDGE_USER_DATA_COLLECTION = 24; + private static final int METHODID_SEARCH_CHANGE_HISTORY_EVENTS = 25; + private static final int METHODID_CREATE_CONVERSION_EVENT = 26; + private static final int METHODID_GET_CONVERSION_EVENT = 27; + private static final int METHODID_DELETE_CONVERSION_EVENT = 28; + private static final int METHODID_LIST_CONVERSION_EVENTS = 29; + private static final int METHODID_CREATE_CUSTOM_DIMENSION = 30; + private static final int METHODID_UPDATE_CUSTOM_DIMENSION = 31; + private static final int METHODID_LIST_CUSTOM_DIMENSIONS = 32; + private static final int METHODID_ARCHIVE_CUSTOM_DIMENSION = 33; + private static final int METHODID_GET_CUSTOM_DIMENSION = 34; + private static final int METHODID_CREATE_CUSTOM_METRIC = 35; + private static final int METHODID_UPDATE_CUSTOM_METRIC = 36; + private static final int METHODID_LIST_CUSTOM_METRICS = 37; + private static final int METHODID_ARCHIVE_CUSTOM_METRIC = 38; + private static final int METHODID_GET_CUSTOM_METRIC = 39; + private static final int METHODID_GET_DATA_RETENTION_SETTINGS = 40; + private static final int METHODID_UPDATE_DATA_RETENTION_SETTINGS = 41; + private static final int METHODID_CREATE_DATA_STREAM = 42; + private static final int METHODID_DELETE_DATA_STREAM = 43; + private static final int METHODID_UPDATE_DATA_STREAM = 44; + private static final int METHODID_LIST_DATA_STREAMS = 45; + private static final int METHODID_GET_DATA_STREAM = 46; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AnalyticsAdminServiceImplBase serviceImpl; + private final int methodId; + + MethodHandlers(AnalyticsAdminServiceImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_GET_ACCOUNT: + serviceImpl.getAccount( + (com.google.analytics.admin.v1beta.GetAccountRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_ACCOUNTS: + serviceImpl.listAccounts( + (com.google.analytics.admin.v1beta.ListAccountsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_DELETE_ACCOUNT: + serviceImpl.deleteAccount( + (com.google.analytics.admin.v1beta.DeleteAccountRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_ACCOUNT: + serviceImpl.updateAccount( + (com.google.analytics.admin.v1beta.UpdateAccountRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_PROVISION_ACCOUNT_TICKET: + serviceImpl.provisionAccountTicket( + (com.google.analytics.admin.v1beta.ProvisionAccountTicketRequest) request, + (io.grpc.stub.StreamObserver< + com.google.analytics.admin.v1beta.ProvisionAccountTicketResponse>) + responseObserver); + break; + case METHODID_LIST_ACCOUNT_SUMMARIES: + serviceImpl.listAccountSummaries( + (com.google.analytics.admin.v1beta.ListAccountSummariesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.analytics.admin.v1beta.ListAccountSummariesResponse>) + responseObserver); + break; + case METHODID_GET_PROPERTY: + serviceImpl.getProperty( + (com.google.analytics.admin.v1beta.GetPropertyRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_PROPERTIES: + serviceImpl.listProperties( + (com.google.analytics.admin.v1beta.ListPropertiesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.analytics.admin.v1beta.ListPropertiesResponse>) + responseObserver); + break; + case METHODID_CREATE_PROPERTY: + serviceImpl.createProperty( + (com.google.analytics.admin.v1beta.CreatePropertyRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_DELETE_PROPERTY: + serviceImpl.deleteProperty( + (com.google.analytics.admin.v1beta.DeletePropertyRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_PROPERTY: + serviceImpl.updateProperty( + (com.google.analytics.admin.v1beta.UpdatePropertyRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_FIREBASE_LINK: + serviceImpl.createFirebaseLink( + (com.google.analytics.admin.v1beta.CreateFirebaseLinkRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_DELETE_FIREBASE_LINK: + serviceImpl.deleteFirebaseLink( + (com.google.analytics.admin.v1beta.DeleteFirebaseLinkRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_FIREBASE_LINKS: + serviceImpl.listFirebaseLinks( + (com.google.analytics.admin.v1beta.ListFirebaseLinksRequest) request, + (io.grpc.stub.StreamObserver< + com.google.analytics.admin.v1beta.ListFirebaseLinksResponse>) + responseObserver); + break; + case METHODID_CREATE_GOOGLE_ADS_LINK: + serviceImpl.createGoogleAdsLink( + (com.google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_GOOGLE_ADS_LINK: + serviceImpl.updateGoogleAdsLink( + (com.google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_DELETE_GOOGLE_ADS_LINK: + serviceImpl.deleteGoogleAdsLink( + (com.google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_GOOGLE_ADS_LINKS: + serviceImpl.listGoogleAdsLinks( + (com.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest) request, + (io.grpc.stub.StreamObserver< + com.google.analytics.admin.v1beta.ListGoogleAdsLinksResponse>) + responseObserver); + break; + case METHODID_GET_DATA_SHARING_SETTINGS: + serviceImpl.getDataSharingSettings( + (com.google.analytics.admin.v1beta.GetDataSharingSettingsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_MEASUREMENT_PROTOCOL_SECRET: + serviceImpl.getMeasurementProtocolSecret( + (com.google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest) request, + (io.grpc.stub.StreamObserver< + com.google.analytics.admin.v1beta.MeasurementProtocolSecret>) + responseObserver); + break; + case METHODID_LIST_MEASUREMENT_PROTOCOL_SECRETS: + serviceImpl.listMeasurementProtocolSecrets( + (com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse>) + responseObserver); + break; + case METHODID_CREATE_MEASUREMENT_PROTOCOL_SECRET: + serviceImpl.createMeasurementProtocolSecret( + (com.google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest) request, + (io.grpc.stub.StreamObserver< + com.google.analytics.admin.v1beta.MeasurementProtocolSecret>) + responseObserver); + break; + case METHODID_DELETE_MEASUREMENT_PROTOCOL_SECRET: + serviceImpl.deleteMeasurementProtocolSecret( + (com.google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_MEASUREMENT_PROTOCOL_SECRET: + serviceImpl.updateMeasurementProtocolSecret( + (com.google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest) request, + (io.grpc.stub.StreamObserver< + com.google.analytics.admin.v1beta.MeasurementProtocolSecret>) + responseObserver); + break; + case METHODID_ACKNOWLEDGE_USER_DATA_COLLECTION: + serviceImpl.acknowledgeUserDataCollection( + (com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest) request, + (io.grpc.stub.StreamObserver< + com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse>) + responseObserver); + break; + case METHODID_SEARCH_CHANGE_HISTORY_EVENTS: + serviceImpl.searchChangeHistoryEvents( + (com.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse>) + responseObserver); + break; + case METHODID_CREATE_CONVERSION_EVENT: + serviceImpl.createConversionEvent( + (com.google.analytics.admin.v1beta.CreateConversionEventRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_CONVERSION_EVENT: + serviceImpl.getConversionEvent( + (com.google.analytics.admin.v1beta.GetConversionEventRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_DELETE_CONVERSION_EVENT: + serviceImpl.deleteConversionEvent( + (com.google.analytics.admin.v1beta.DeleteConversionEventRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_CONVERSION_EVENTS: + serviceImpl.listConversionEvents( + (com.google.analytics.admin.v1beta.ListConversionEventsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.analytics.admin.v1beta.ListConversionEventsResponse>) + responseObserver); + break; + case METHODID_CREATE_CUSTOM_DIMENSION: + serviceImpl.createCustomDimension( + (com.google.analytics.admin.v1beta.CreateCustomDimensionRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_CUSTOM_DIMENSION: + serviceImpl.updateCustomDimension( + (com.google.analytics.admin.v1beta.UpdateCustomDimensionRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_CUSTOM_DIMENSIONS: + serviceImpl.listCustomDimensions( + (com.google.analytics.admin.v1beta.ListCustomDimensionsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.analytics.admin.v1beta.ListCustomDimensionsResponse>) + responseObserver); + break; + case METHODID_ARCHIVE_CUSTOM_DIMENSION: + serviceImpl.archiveCustomDimension( + (com.google.analytics.admin.v1beta.ArchiveCustomDimensionRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_CUSTOM_DIMENSION: + serviceImpl.getCustomDimension( + (com.google.analytics.admin.v1beta.GetCustomDimensionRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_CUSTOM_METRIC: + serviceImpl.createCustomMetric( + (com.google.analytics.admin.v1beta.CreateCustomMetricRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_CUSTOM_METRIC: + serviceImpl.updateCustomMetric( + (com.google.analytics.admin.v1beta.UpdateCustomMetricRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_CUSTOM_METRICS: + serviceImpl.listCustomMetrics( + (com.google.analytics.admin.v1beta.ListCustomMetricsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.analytics.admin.v1beta.ListCustomMetricsResponse>) + responseObserver); + break; + case METHODID_ARCHIVE_CUSTOM_METRIC: + serviceImpl.archiveCustomMetric( + (com.google.analytics.admin.v1beta.ArchiveCustomMetricRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_CUSTOM_METRIC: + serviceImpl.getCustomMetric( + (com.google.analytics.admin.v1beta.GetCustomMetricRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_DATA_RETENTION_SETTINGS: + serviceImpl.getDataRetentionSettings( + (com.google.analytics.admin.v1beta.GetDataRetentionSettingsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_DATA_RETENTION_SETTINGS: + serviceImpl.updateDataRetentionSettings( + (com.google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_DATA_STREAM: + serviceImpl.createDataStream( + (com.google.analytics.admin.v1beta.CreateDataStreamRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_DELETE_DATA_STREAM: + serviceImpl.deleteDataStream( + (com.google.analytics.admin.v1beta.DeleteDataStreamRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_DATA_STREAM: + serviceImpl.updateDataStream( + (com.google.analytics.admin.v1beta.UpdateDataStreamRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_DATA_STREAMS: + serviceImpl.listDataStreams( + (com.google.analytics.admin.v1beta.ListDataStreamsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.analytics.admin.v1beta.ListDataStreamsResponse>) + responseObserver); + break; + case METHODID_GET_DATA_STREAM: + serviceImpl.getDataStream( + (com.google.analytics.admin.v1beta.GetDataStreamRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private abstract static class AnalyticsAdminServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + AnalyticsAdminServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("AnalyticsAdminService"); + } + } + + private static final class AnalyticsAdminServiceFileDescriptorSupplier + extends AnalyticsAdminServiceBaseDescriptorSupplier { + AnalyticsAdminServiceFileDescriptorSupplier() {} + } + + private static final class AnalyticsAdminServiceMethodDescriptorSupplier + extends AnalyticsAdminServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + AnalyticsAdminServiceMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (AnalyticsAdminServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new AnalyticsAdminServiceFileDescriptorSupplier()) + .addMethod(getGetAccountMethod()) + .addMethod(getListAccountsMethod()) + .addMethod(getDeleteAccountMethod()) + .addMethod(getUpdateAccountMethod()) + .addMethod(getProvisionAccountTicketMethod()) + .addMethod(getListAccountSummariesMethod()) + .addMethod(getGetPropertyMethod()) + .addMethod(getListPropertiesMethod()) + .addMethod(getCreatePropertyMethod()) + .addMethod(getDeletePropertyMethod()) + .addMethod(getUpdatePropertyMethod()) + .addMethod(getCreateFirebaseLinkMethod()) + .addMethod(getDeleteFirebaseLinkMethod()) + .addMethod(getListFirebaseLinksMethod()) + .addMethod(getCreateGoogleAdsLinkMethod()) + .addMethod(getUpdateGoogleAdsLinkMethod()) + .addMethod(getDeleteGoogleAdsLinkMethod()) + .addMethod(getListGoogleAdsLinksMethod()) + .addMethod(getGetDataSharingSettingsMethod()) + .addMethod(getGetMeasurementProtocolSecretMethod()) + .addMethod(getListMeasurementProtocolSecretsMethod()) + .addMethod(getCreateMeasurementProtocolSecretMethod()) + .addMethod(getDeleteMeasurementProtocolSecretMethod()) + .addMethod(getUpdateMeasurementProtocolSecretMethod()) + .addMethod(getAcknowledgeUserDataCollectionMethod()) + .addMethod(getSearchChangeHistoryEventsMethod()) + .addMethod(getCreateConversionEventMethod()) + .addMethod(getGetConversionEventMethod()) + .addMethod(getDeleteConversionEventMethod()) + .addMethod(getListConversionEventsMethod()) + .addMethod(getCreateCustomDimensionMethod()) + .addMethod(getUpdateCustomDimensionMethod()) + .addMethod(getListCustomDimensionsMethod()) + .addMethod(getArchiveCustomDimensionMethod()) + .addMethod(getGetCustomDimensionMethod()) + .addMethod(getCreateCustomMetricMethod()) + .addMethod(getUpdateCustomMetricMethod()) + .addMethod(getListCustomMetricsMethod()) + .addMethod(getArchiveCustomMetricMethod()) + .addMethod(getGetCustomMetricMethod()) + .addMethod(getGetDataRetentionSettingsMethod()) + .addMethod(getUpdateDataRetentionSettingsMethod()) + .addMethod(getCreateDataStreamMethod()) + .addMethod(getDeleteDataStreamMethod()) + .addMethod(getUpdateDataStreamMethod()) + .addMethod(getListDataStreamsMethod()) + .addMethod(getGetDataStreamMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-analytics-admin/pom.xml b/java-analytics-admin/pom.xml index 442e0ce385b6..607cf3347da2 100644 --- a/java-analytics-admin/pom.xml +++ b/java-analytics-admin/pom.xml @@ -63,6 +63,16 @@ google-analytics-admin 0.11.1-SNAPSHOT + + com.google.api.grpc + proto-google-analytics-admin-v1beta + 0.11.1-SNAPSHOT + + + com.google.api.grpc + grpc-google-analytics-admin-v1beta + 0.11.1-SNAPSHOT + com.google.api.grpc proto-google-analytics-admin-v1alpha @@ -111,7 +121,9 @@ google-analytics-admin grpc-google-analytics-admin-v1alpha + grpc-google-analytics-admin-v1beta proto-google-analytics-admin-v1alpha + proto-google-analytics-admin-v1beta google-analytics-admin-bom diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/clirr-ignored-differences.xml b/java-analytics-admin/proto-google-analytics-admin-v1beta/clirr-ignored-differences.xml new file mode 100644 index 000000000000..205fd85b0a2a --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/clirr-ignored-differences.xml @@ -0,0 +1,19 @@ + + + + + 7012 + com/google/analytics/admin/v1beta/*OrBuilder + * get*(*) + + + 7012 + com/google/analytics/admin/v1beta/*OrBuilder + boolean contains*(*) + + + 7012 + com/google/analytics/admin/v1beta/*OrBuilder + boolean has*(*) + + diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/pom.xml b/java-analytics-admin/proto-google-analytics-admin-v1beta/pom.xml new file mode 100644 index 000000000000..c12b46857be3 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/pom.xml @@ -0,0 +1,42 @@ + + 4.0.0 + com.google.api.grpc + proto-google-analytics-admin-v1beta + 0.11.1-SNAPSHOT + proto-google-analytics-admin-v1beta + Proto library for google-analytics-admin + + com.google.analytics + google-analytics-admin-parent + 0.11.1-SNAPSHOT + + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api + api-common + + + com.google.guava + guava + + + + + + + org.codehaus.mojo + flatten-maven-plugin + + + + diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/Account.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/Account.java new file mode 100644 index 000000000000..8d08eb399da8 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/Account.java @@ -0,0 +1,1688 @@ +/* + * Copyright 2020 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/admin/v1beta/resources.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * A resource message representing a Google Analytics account.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.Account} + */ +public final class Account extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.Account) + AccountOrBuilder { + private static final long serialVersionUID = 0L; + // Use Account.newBuilder() to construct. + private Account(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Account() { + name_ = ""; + displayName_ = ""; + regionCode_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Account(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Account( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + regionCode_ = s; + break; + } + case 48: + { + deleted_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_Account_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_Account_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.Account.class, + com.google.analytics.admin.v1beta.Account.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Output only. Resource name of this account.
+   * Format: accounts/{account}
+   * Example: "accounts/100"
+   * 
+ * + * string name = 1 [(.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. Resource name of this account.
+   * Format: accounts/{account}
+   * Example: "accounts/100"
+   * 
+ * + * string name = 1 [(.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 CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Time when this account was originally created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. Time when this account was originally created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Time when this account was originally created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. Time when account payload fields were last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. Time when account payload fields were last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. Time when account payload fields were last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 4; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * Required. Human-readable display name for this account.
+   * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Human-readable display name for this account.
+   * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REGION_CODE_FIELD_NUMBER = 5; + private volatile java.lang.Object regionCode_; + /** + * + * + *
+   * Country of business. Must be a Unicode CLDR region code.
+   * 
+ * + * string region_code = 5; + * + * @return The regionCode. + */ + @java.lang.Override + public java.lang.String getRegionCode() { + java.lang.Object ref = regionCode_; + 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(); + regionCode_ = s; + return s; + } + } + /** + * + * + *
+   * Country of business. Must be a Unicode CLDR region code.
+   * 
+ * + * string region_code = 5; + * + * @return The bytes for regionCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRegionCodeBytes() { + java.lang.Object ref = regionCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + regionCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DELETED_FIELD_NUMBER = 6; + private boolean deleted_; + /** + * + * + *
+   * Output only. Indicates whether this Account is soft-deleted or not. Deleted
+   * accounts are excluded from List results unless specifically requested.
+   * 
+ * + * bool deleted = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The deleted. + */ + @java.lang.Override + public boolean getDeleted() { + return deleted_; + } + + 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 (createTime_ != null) { + output.writeMessage(2, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(3, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(regionCode_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, regionCode_); + } + if (deleted_ != false) { + output.writeBool(6, deleted_); + } + unknownFields.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 (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(regionCode_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, regionCode_); + } + if (deleted_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, deleted_); + } + size += unknownFields.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.admin.v1beta.Account)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.Account other = + (com.google.analytics.admin.v1beta.Account) obj; + + if (!getName().equals(other.getName())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getRegionCode().equals(other.getRegionCode())) return false; + if (getDeleted() != other.getDeleted()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + REGION_CODE_FIELD_NUMBER; + hash = (53 * hash) + getRegionCode().hashCode(); + hash = (37 * hash) + DELETED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDeleted()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.Account parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.Account 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.admin.v1beta.Account parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.Account 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.admin.v1beta.Account parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.Account parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.Account parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.Account 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.admin.v1beta.Account parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.Account 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.admin.v1beta.Account parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.Account 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.admin.v1beta.Account 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 resource message representing a Google Analytics account.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.Account} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.Account) + com.google.analytics.admin.v1beta.AccountOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_Account_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_Account_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.Account.class, + com.google.analytics.admin.v1beta.Account.Builder.class); + } + + // Construct using com.google.analytics.admin.v1beta.Account.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + displayName_ = ""; + + regionCode_ = ""; + + deleted_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_Account_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.Account getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.Account.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.Account build() { + com.google.analytics.admin.v1beta.Account result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.Account buildPartial() { + com.google.analytics.admin.v1beta.Account result = + new com.google.analytics.admin.v1beta.Account(this); + result.name_ = name_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + result.displayName_ = displayName_; + result.regionCode_ = regionCode_; + result.deleted_ = deleted_; + onBuilt(); + return result; + } + + @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.admin.v1beta.Account) { + return mergeFrom((com.google.analytics.admin.v1beta.Account) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1beta.Account other) { + if (other == com.google.analytics.admin.v1beta.Account.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getRegionCode().isEmpty()) { + regionCode_ = other.regionCode_; + onChanged(); + } + if (other.getDeleted() != false) { + setDeleted(other.getDeleted()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.Account parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.analytics.admin.v1beta.Account) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. Resource name of this account.
+     * Format: accounts/{account}
+     * Example: "accounts/100"
+     * 
+ * + * string name = 1 [(.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. Resource name of this account.
+     * Format: accounts/{account}
+     * Example: "accounts/100"
+     * 
+ * + * string name = 1 [(.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. Resource name of this account.
+     * Format: accounts/{account}
+     * Example: "accounts/100"
+     * 
+ * + * string name = 1 [(.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; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Resource name of this account.
+     * Format: accounts/{account}
+     * Example: "accounts/100"
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Resource name of this account.
+     * Format: accounts/{account}
+     * Example: "accounts/100"
+     * 
+ * + * string name = 1 [(.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; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. Time when this account was originally created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. Time when this account was originally created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when this account was originally created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when this account was originally created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when this account was originally created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when this account was originally created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Time when this account was originally created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when this account was originally created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Time when this account was originally created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. Time when account payload fields were last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * Output only. Time when account payload fields were last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when account payload fields were last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when account payload fields were last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when account payload fields were last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when account payload fields were last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Time when account payload fields were last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when account payload fields were last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. Time when account payload fields were last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Required. Human-readable display name for this account.
+     * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Human-readable display name for this account.
+     * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Human-readable display name for this account.
+     * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Human-readable display name for this account.
+     * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Human-readable display name for this account.
+     * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private java.lang.Object regionCode_ = ""; + /** + * + * + *
+     * Country of business. Must be a Unicode CLDR region code.
+     * 
+ * + * string region_code = 5; + * + * @return The regionCode. + */ + public java.lang.String getRegionCode() { + java.lang.Object ref = regionCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + regionCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Country of business. Must be a Unicode CLDR region code.
+     * 
+ * + * string region_code = 5; + * + * @return The bytes for regionCode. + */ + public com.google.protobuf.ByteString getRegionCodeBytes() { + java.lang.Object ref = regionCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + regionCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Country of business. Must be a Unicode CLDR region code.
+     * 
+ * + * string region_code = 5; + * + * @param value The regionCode to set. + * @return This builder for chaining. + */ + public Builder setRegionCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + regionCode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Country of business. Must be a Unicode CLDR region code.
+     * 
+ * + * string region_code = 5; + * + * @return This builder for chaining. + */ + public Builder clearRegionCode() { + + regionCode_ = getDefaultInstance().getRegionCode(); + onChanged(); + return this; + } + /** + * + * + *
+     * Country of business. Must be a Unicode CLDR region code.
+     * 
+ * + * string region_code = 5; + * + * @param value The bytes for regionCode to set. + * @return This builder for chaining. + */ + public Builder setRegionCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + regionCode_ = value; + onChanged(); + return this; + } + + private boolean deleted_; + /** + * + * + *
+     * Output only. Indicates whether this Account is soft-deleted or not. Deleted
+     * accounts are excluded from List results unless specifically requested.
+     * 
+ * + * bool deleted = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The deleted. + */ + @java.lang.Override + public boolean getDeleted() { + return deleted_; + } + /** + * + * + *
+     * Output only. Indicates whether this Account is soft-deleted or not. Deleted
+     * accounts are excluded from List results unless specifically requested.
+     * 
+ * + * bool deleted = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The deleted to set. + * @return This builder for chaining. + */ + public Builder setDeleted(boolean value) { + + deleted_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Indicates whether this Account is soft-deleted or not. Deleted
+     * accounts are excluded from List results unless specifically requested.
+     * 
+ * + * bool deleted = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearDeleted() { + + deleted_ = false; + 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.admin.v1beta.Account) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.Account) + private static final com.google.analytics.admin.v1beta.Account DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.Account(); + } + + public static com.google.analytics.admin.v1beta.Account getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Account parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Account(input, extensionRegistry); + } + }; + + 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.admin.v1beta.Account getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/AccountName.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/AccountName.java new file mode 100644 index 000000000000..8b200bcd842a --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/AccountName.java @@ -0,0 +1,168 @@ +/* + * Copyright 2022 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.admin.v1beta; + +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 AccountName implements ResourceName { + private static final PathTemplate ACCOUNT = + PathTemplate.createWithoutUrlEncoding("accounts/{account}"); + private volatile Map fieldValuesMap; + private final String account; + + @Deprecated + protected AccountName() { + account = null; + } + + private AccountName(Builder builder) { + account = Preconditions.checkNotNull(builder.getAccount()); + } + + public String getAccount() { + return account; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static AccountName of(String account) { + return newBuilder().setAccount(account).build(); + } + + public static String format(String account) { + return newBuilder().setAccount(account).build().toString(); + } + + public static AccountName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + ACCOUNT.validatedMatch( + formattedString, "AccountName.parse: formattedString not in valid format"); + return of(matchMap.get("account")); + } + + 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 (AccountName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return ACCOUNT.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (account != null) { + fieldMapBuilder.put("account", account); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return ACCOUNT.instantiate("account", account); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + AccountName that = ((AccountName) o); + return Objects.equals(this.account, that.account); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(account); + return h; + } + + /** Builder for accounts/{account}. */ + public static class Builder { + private String account; + + protected Builder() {} + + public String getAccount() { + return account; + } + + public Builder setAccount(String account) { + this.account = account; + return this; + } + + private Builder(AccountName accountName) { + this.account = accountName.account; + } + + public AccountName build() { + return new AccountName(this); + } + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/AccountOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/AccountOrBuilder.java new file mode 100644 index 000000000000..a1501352d6c8 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/AccountOrBuilder.java @@ -0,0 +1,194 @@ +/* + * Copyright 2020 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/admin/v1beta/resources.proto + +package com.google.analytics.admin.v1beta; + +public interface AccountOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.Account) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Resource name of this account.
+   * Format: accounts/{account}
+   * Example: "accounts/100"
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. Resource name of this account.
+   * Format: accounts/{account}
+   * Example: "accounts/100"
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. Time when this account was originally created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Time when this account was originally created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Time when this account was originally created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time when account payload fields were last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. Time when account payload fields were last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. Time when account payload fields were last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Required. Human-readable display name for this account.
+   * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Required. Human-readable display name for this account.
+   * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Country of business. Must be a Unicode CLDR region code.
+   * 
+ * + * string region_code = 5; + * + * @return The regionCode. + */ + java.lang.String getRegionCode(); + /** + * + * + *
+   * Country of business. Must be a Unicode CLDR region code.
+   * 
+ * + * string region_code = 5; + * + * @return The bytes for regionCode. + */ + com.google.protobuf.ByteString getRegionCodeBytes(); + + /** + * + * + *
+   * Output only. Indicates whether this Account is soft-deleted or not. Deleted
+   * accounts are excluded from List results unless specifically requested.
+   * 
+ * + * bool deleted = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The deleted. + */ + boolean getDeleted(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/AccountSummary.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/AccountSummary.java new file mode 100644 index 000000000000..7240dac8261a --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/AccountSummary.java @@ -0,0 +1,1535 @@ +/* + * Copyright 2020 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/admin/v1beta/resources.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * A virtual resource representing an overview of an account and
+ * all its child GA4 properties.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.AccountSummary} + */ +public final class AccountSummary extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.AccountSummary) + AccountSummaryOrBuilder { + private static final long serialVersionUID = 0L; + // Use AccountSummary.newBuilder() to construct. + private AccountSummary(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AccountSummary() { + name_ = ""; + account_ = ""; + displayName_ = ""; + propertySummaries_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AccountSummary(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AccountSummary( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + account_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 34: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + propertySummaries_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + propertySummaries_.add( + input.readMessage( + com.google.analytics.admin.v1beta.PropertySummary.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + propertySummaries_ = java.util.Collections.unmodifiableList(propertySummaries_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_AccountSummary_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_AccountSummary_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.AccountSummary.class, + com.google.analytics.admin.v1beta.AccountSummary.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Resource name for this account summary.
+   * Format: accountSummaries/{account_id}
+   * Example: "accountSummaries/1000"
+   * 
+ * + * string name = 1; + * + * @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; + } + } + /** + * + * + *
+   * Resource name for this account summary.
+   * Format: accountSummaries/{account_id}
+   * Example: "accountSummaries/1000"
+   * 
+ * + * string name = 1; + * + * @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 ACCOUNT_FIELD_NUMBER = 2; + private volatile java.lang.Object account_; + /** + * + * + *
+   * Resource name of account referred to by this account summary
+   * Format: accounts/{account_id}
+   * Example: "accounts/1000"
+   * 
+ * + * string account = 2 [(.google.api.resource_reference) = { ... } + * + * @return The account. + */ + @java.lang.Override + public java.lang.String getAccount() { + java.lang.Object ref = account_; + 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(); + account_ = s; + return s; + } + } + /** + * + * + *
+   * Resource name of account referred to by this account summary
+   * Format: accounts/{account_id}
+   * Example: "accounts/1000"
+   * 
+ * + * string account = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for account. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAccountBytes() { + java.lang.Object ref = account_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + account_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 3; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * Display name for the account referred to in this account summary.
+   * 
+ * + * string display_name = 3; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Display name for the account referred to in this account summary.
+   * 
+ * + * string display_name = 3; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROPERTY_SUMMARIES_FIELD_NUMBER = 4; + private java.util.List propertySummaries_; + /** + * + * + *
+   * List of summaries for child accounts of this account.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.PropertySummary property_summaries = 4; + */ + @java.lang.Override + public java.util.List + getPropertySummariesList() { + return propertySummaries_; + } + /** + * + * + *
+   * List of summaries for child accounts of this account.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.PropertySummary property_summaries = 4; + */ + @java.lang.Override + public java.util.List + getPropertySummariesOrBuilderList() { + return propertySummaries_; + } + /** + * + * + *
+   * List of summaries for child accounts of this account.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.PropertySummary property_summaries = 4; + */ + @java.lang.Override + public int getPropertySummariesCount() { + return propertySummaries_.size(); + } + /** + * + * + *
+   * List of summaries for child accounts of this account.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.PropertySummary property_summaries = 4; + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.PropertySummary getPropertySummaries(int index) { + return propertySummaries_.get(index); + } + /** + * + * + *
+   * List of summaries for child accounts of this account.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.PropertySummary property_summaries = 4; + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.PropertySummaryOrBuilder getPropertySummariesOrBuilder( + int index) { + return propertySummaries_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(account_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, account_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, displayName_); + } + for (int i = 0; i < propertySummaries_.size(); i++) { + output.writeMessage(4, propertySummaries_.get(i)); + } + unknownFields.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(account_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, account_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, displayName_); + } + for (int i = 0; i < propertySummaries_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(4, propertySummaries_.get(i)); + } + size += unknownFields.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.admin.v1beta.AccountSummary)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.AccountSummary other = + (com.google.analytics.admin.v1beta.AccountSummary) obj; + + if (!getName().equals(other.getName())) return false; + if (!getAccount().equals(other.getAccount())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getPropertySummariesList().equals(other.getPropertySummariesList())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getAccount().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + if (getPropertySummariesCount() > 0) { + hash = (37 * hash) + PROPERTY_SUMMARIES_FIELD_NUMBER; + hash = (53 * hash) + getPropertySummariesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.AccountSummary parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.AccountSummary 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.admin.v1beta.AccountSummary parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.AccountSummary 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.admin.v1beta.AccountSummary parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.AccountSummary parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.AccountSummary parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.AccountSummary 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.admin.v1beta.AccountSummary parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.AccountSummary 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.admin.v1beta.AccountSummary parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.AccountSummary 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.admin.v1beta.AccountSummary 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 virtual resource representing an overview of an account and
+   * all its child GA4 properties.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.AccountSummary} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.AccountSummary) + com.google.analytics.admin.v1beta.AccountSummaryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_AccountSummary_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_AccountSummary_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.AccountSummary.class, + com.google.analytics.admin.v1beta.AccountSummary.Builder.class); + } + + // Construct using com.google.analytics.admin.v1beta.AccountSummary.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPropertySummariesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + account_ = ""; + + displayName_ = ""; + + if (propertySummariesBuilder_ == null) { + propertySummaries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + propertySummariesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_AccountSummary_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.AccountSummary getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.AccountSummary.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.AccountSummary build() { + com.google.analytics.admin.v1beta.AccountSummary result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.AccountSummary buildPartial() { + com.google.analytics.admin.v1beta.AccountSummary result = + new com.google.analytics.admin.v1beta.AccountSummary(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.account_ = account_; + result.displayName_ = displayName_; + if (propertySummariesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + propertySummaries_ = java.util.Collections.unmodifiableList(propertySummaries_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.propertySummaries_ = propertySummaries_; + } else { + result.propertySummaries_ = propertySummariesBuilder_.build(); + } + onBuilt(); + return result; + } + + @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.admin.v1beta.AccountSummary) { + return mergeFrom((com.google.analytics.admin.v1beta.AccountSummary) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1beta.AccountSummary other) { + if (other == com.google.analytics.admin.v1beta.AccountSummary.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getAccount().isEmpty()) { + account_ = other.account_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (propertySummariesBuilder_ == null) { + if (!other.propertySummaries_.isEmpty()) { + if (propertySummaries_.isEmpty()) { + propertySummaries_ = other.propertySummaries_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePropertySummariesIsMutable(); + propertySummaries_.addAll(other.propertySummaries_); + } + onChanged(); + } + } else { + if (!other.propertySummaries_.isEmpty()) { + if (propertySummariesBuilder_.isEmpty()) { + propertySummariesBuilder_.dispose(); + propertySummariesBuilder_ = null; + propertySummaries_ = other.propertySummaries_; + bitField0_ = (bitField0_ & ~0x00000001); + propertySummariesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPropertySummariesFieldBuilder() + : null; + } else { + propertySummariesBuilder_.addAllMessages(other.propertySummaries_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.AccountSummary parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.analytics.admin.v1beta.AccountSummary) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Resource name for this account summary.
+     * Format: accountSummaries/{account_id}
+     * Example: "accountSummaries/1000"
+     * 
+ * + * string name = 1; + * + * @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; + } + } + /** + * + * + *
+     * Resource name for this account summary.
+     * Format: accountSummaries/{account_id}
+     * Example: "accountSummaries/1000"
+     * 
+ * + * string name = 1; + * + * @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; + } + } + /** + * + * + *
+     * Resource name for this account summary.
+     * Format: accountSummaries/{account_id}
+     * Example: "accountSummaries/1000"
+     * 
+ * + * string name = 1; + * + * @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; + onChanged(); + return this; + } + /** + * + * + *
+     * Resource name for this account summary.
+     * Format: accountSummaries/{account_id}
+     * Example: "accountSummaries/1000"
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Resource name for this account summary.
+     * Format: accountSummaries/{account_id}
+     * Example: "accountSummaries/1000"
+     * 
+ * + * string name = 1; + * + * @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; + onChanged(); + return this; + } + + private java.lang.Object account_ = ""; + /** + * + * + *
+     * Resource name of account referred to by this account summary
+     * Format: accounts/{account_id}
+     * Example: "accounts/1000"
+     * 
+ * + * string account = 2 [(.google.api.resource_reference) = { ... } + * + * @return The account. + */ + public java.lang.String getAccount() { + java.lang.Object ref = account_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + account_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Resource name of account referred to by this account summary
+     * Format: accounts/{account_id}
+     * Example: "accounts/1000"
+     * 
+ * + * string account = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for account. + */ + public com.google.protobuf.ByteString getAccountBytes() { + java.lang.Object ref = account_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + account_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Resource name of account referred to by this account summary
+     * Format: accounts/{account_id}
+     * Example: "accounts/1000"
+     * 
+ * + * string account = 2 [(.google.api.resource_reference) = { ... } + * + * @param value The account to set. + * @return This builder for chaining. + */ + public Builder setAccount(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + account_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Resource name of account referred to by this account summary
+     * Format: accounts/{account_id}
+     * Example: "accounts/1000"
+     * 
+ * + * string account = 2 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearAccount() { + + account_ = getDefaultInstance().getAccount(); + onChanged(); + return this; + } + /** + * + * + *
+     * Resource name of account referred to by this account summary
+     * Format: accounts/{account_id}
+     * Example: "accounts/1000"
+     * 
+ * + * string account = 2 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for account to set. + * @return This builder for chaining. + */ + public Builder setAccountBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + account_ = value; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Display name for the account referred to in this account summary.
+     * 
+ * + * string display_name = 3; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Display name for the account referred to in this account summary.
+     * 
+ * + * string display_name = 3; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Display name for the account referred to in this account summary.
+     * 
+ * + * string display_name = 3; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Display name for the account referred to in this account summary.
+     * 
+ * + * string display_name = 3; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Display name for the account referred to in this account summary.
+     * 
+ * + * string display_name = 3; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private java.util.List propertySummaries_ = + java.util.Collections.emptyList(); + + private void ensurePropertySummariesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + propertySummaries_ = + new java.util.ArrayList( + propertySummaries_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.admin.v1beta.PropertySummary, + com.google.analytics.admin.v1beta.PropertySummary.Builder, + com.google.analytics.admin.v1beta.PropertySummaryOrBuilder> + propertySummariesBuilder_; + + /** + * + * + *
+     * List of summaries for child accounts of this account.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.PropertySummary property_summaries = 4; + */ + public java.util.List + getPropertySummariesList() { + if (propertySummariesBuilder_ == null) { + return java.util.Collections.unmodifiableList(propertySummaries_); + } else { + return propertySummariesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of summaries for child accounts of this account.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.PropertySummary property_summaries = 4; + */ + public int getPropertySummariesCount() { + if (propertySummariesBuilder_ == null) { + return propertySummaries_.size(); + } else { + return propertySummariesBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of summaries for child accounts of this account.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.PropertySummary property_summaries = 4; + */ + public com.google.analytics.admin.v1beta.PropertySummary getPropertySummaries(int index) { + if (propertySummariesBuilder_ == null) { + return propertySummaries_.get(index); + } else { + return propertySummariesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of summaries for child accounts of this account.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.PropertySummary property_summaries = 4; + */ + public Builder setPropertySummaries( + int index, com.google.analytics.admin.v1beta.PropertySummary value) { + if (propertySummariesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePropertySummariesIsMutable(); + propertySummaries_.set(index, value); + onChanged(); + } else { + propertySummariesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of summaries for child accounts of this account.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.PropertySummary property_summaries = 4; + */ + public Builder setPropertySummaries( + int index, com.google.analytics.admin.v1beta.PropertySummary.Builder builderForValue) { + if (propertySummariesBuilder_ == null) { + ensurePropertySummariesIsMutable(); + propertySummaries_.set(index, builderForValue.build()); + onChanged(); + } else { + propertySummariesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of summaries for child accounts of this account.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.PropertySummary property_summaries = 4; + */ + public Builder addPropertySummaries(com.google.analytics.admin.v1beta.PropertySummary value) { + if (propertySummariesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePropertySummariesIsMutable(); + propertySummaries_.add(value); + onChanged(); + } else { + propertySummariesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of summaries for child accounts of this account.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.PropertySummary property_summaries = 4; + */ + public Builder addPropertySummaries( + int index, com.google.analytics.admin.v1beta.PropertySummary value) { + if (propertySummariesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePropertySummariesIsMutable(); + propertySummaries_.add(index, value); + onChanged(); + } else { + propertySummariesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of summaries for child accounts of this account.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.PropertySummary property_summaries = 4; + */ + public Builder addPropertySummaries( + com.google.analytics.admin.v1beta.PropertySummary.Builder builderForValue) { + if (propertySummariesBuilder_ == null) { + ensurePropertySummariesIsMutable(); + propertySummaries_.add(builderForValue.build()); + onChanged(); + } else { + propertySummariesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of summaries for child accounts of this account.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.PropertySummary property_summaries = 4; + */ + public Builder addPropertySummaries( + int index, com.google.analytics.admin.v1beta.PropertySummary.Builder builderForValue) { + if (propertySummariesBuilder_ == null) { + ensurePropertySummariesIsMutable(); + propertySummaries_.add(index, builderForValue.build()); + onChanged(); + } else { + propertySummariesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of summaries for child accounts of this account.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.PropertySummary property_summaries = 4; + */ + public Builder addAllPropertySummaries( + java.lang.Iterable values) { + if (propertySummariesBuilder_ == null) { + ensurePropertySummariesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, propertySummaries_); + onChanged(); + } else { + propertySummariesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of summaries for child accounts of this account.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.PropertySummary property_summaries = 4; + */ + public Builder clearPropertySummaries() { + if (propertySummariesBuilder_ == null) { + propertySummaries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + propertySummariesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of summaries for child accounts of this account.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.PropertySummary property_summaries = 4; + */ + public Builder removePropertySummaries(int index) { + if (propertySummariesBuilder_ == null) { + ensurePropertySummariesIsMutable(); + propertySummaries_.remove(index); + onChanged(); + } else { + propertySummariesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of summaries for child accounts of this account.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.PropertySummary property_summaries = 4; + */ + public com.google.analytics.admin.v1beta.PropertySummary.Builder getPropertySummariesBuilder( + int index) { + return getPropertySummariesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of summaries for child accounts of this account.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.PropertySummary property_summaries = 4; + */ + public com.google.analytics.admin.v1beta.PropertySummaryOrBuilder getPropertySummariesOrBuilder( + int index) { + if (propertySummariesBuilder_ == null) { + return propertySummaries_.get(index); + } else { + return propertySummariesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of summaries for child accounts of this account.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.PropertySummary property_summaries = 4; + */ + public java.util.List + getPropertySummariesOrBuilderList() { + if (propertySummariesBuilder_ != null) { + return propertySummariesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(propertySummaries_); + } + } + /** + * + * + *
+     * List of summaries for child accounts of this account.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.PropertySummary property_summaries = 4; + */ + public com.google.analytics.admin.v1beta.PropertySummary.Builder addPropertySummariesBuilder() { + return getPropertySummariesFieldBuilder() + .addBuilder(com.google.analytics.admin.v1beta.PropertySummary.getDefaultInstance()); + } + /** + * + * + *
+     * List of summaries for child accounts of this account.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.PropertySummary property_summaries = 4; + */ + public com.google.analytics.admin.v1beta.PropertySummary.Builder addPropertySummariesBuilder( + int index) { + return getPropertySummariesFieldBuilder() + .addBuilder( + index, com.google.analytics.admin.v1beta.PropertySummary.getDefaultInstance()); + } + /** + * + * + *
+     * List of summaries for child accounts of this account.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.PropertySummary property_summaries = 4; + */ + public java.util.List + getPropertySummariesBuilderList() { + return getPropertySummariesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.admin.v1beta.PropertySummary, + com.google.analytics.admin.v1beta.PropertySummary.Builder, + com.google.analytics.admin.v1beta.PropertySummaryOrBuilder> + getPropertySummariesFieldBuilder() { + if (propertySummariesBuilder_ == null) { + propertySummariesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.admin.v1beta.PropertySummary, + com.google.analytics.admin.v1beta.PropertySummary.Builder, + com.google.analytics.admin.v1beta.PropertySummaryOrBuilder>( + propertySummaries_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + propertySummaries_ = null; + } + return propertySummariesBuilder_; + } + + @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.admin.v1beta.AccountSummary) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.AccountSummary) + private static final com.google.analytics.admin.v1beta.AccountSummary DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.AccountSummary(); + } + + public static com.google.analytics.admin.v1beta.AccountSummary getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AccountSummary parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AccountSummary(input, extensionRegistry); + } + }; + + 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.admin.v1beta.AccountSummary getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/AccountSummaryOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/AccountSummaryOrBuilder.java new file mode 100644 index 000000000000..49033a6059a0 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/AccountSummaryOrBuilder.java @@ -0,0 +1,161 @@ +/* + * Copyright 2020 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/admin/v1beta/resources.proto + +package com.google.analytics.admin.v1beta; + +public interface AccountSummaryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.AccountSummary) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Resource name for this account summary.
+   * Format: accountSummaries/{account_id}
+   * Example: "accountSummaries/1000"
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Resource name for this account summary.
+   * Format: accountSummaries/{account_id}
+   * Example: "accountSummaries/1000"
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Resource name of account referred to by this account summary
+   * Format: accounts/{account_id}
+   * Example: "accounts/1000"
+   * 
+ * + * string account = 2 [(.google.api.resource_reference) = { ... } + * + * @return The account. + */ + java.lang.String getAccount(); + /** + * + * + *
+   * Resource name of account referred to by this account summary
+   * Format: accounts/{account_id}
+   * Example: "accounts/1000"
+   * 
+ * + * string account = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for account. + */ + com.google.protobuf.ByteString getAccountBytes(); + + /** + * + * + *
+   * Display name for the account referred to in this account summary.
+   * 
+ * + * string display_name = 3; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Display name for the account referred to in this account summary.
+   * 
+ * + * string display_name = 3; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * List of summaries for child accounts of this account.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.PropertySummary property_summaries = 4; + */ + java.util.List getPropertySummariesList(); + /** + * + * + *
+   * List of summaries for child accounts of this account.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.PropertySummary property_summaries = 4; + */ + com.google.analytics.admin.v1beta.PropertySummary getPropertySummaries(int index); + /** + * + * + *
+   * List of summaries for child accounts of this account.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.PropertySummary property_summaries = 4; + */ + int getPropertySummariesCount(); + /** + * + * + *
+   * List of summaries for child accounts of this account.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.PropertySummary property_summaries = 4; + */ + java.util.List + getPropertySummariesOrBuilderList(); + /** + * + * + *
+   * List of summaries for child accounts of this account.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.PropertySummary property_summaries = 4; + */ + com.google.analytics.admin.v1beta.PropertySummaryOrBuilder getPropertySummariesOrBuilder( + int index); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/AcknowledgeUserDataCollectionRequest.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/AcknowledgeUserDataCollectionRequest.java new file mode 100644 index 000000000000..21c1ded3e2fc --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/AcknowledgeUserDataCollectionRequest.java @@ -0,0 +1,888 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * Request message for AcknowledgeUserDataCollection RPC.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest} + */ +public final class AcknowledgeUserDataCollectionRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest) + AcknowledgeUserDataCollectionRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use AcknowledgeUserDataCollectionRequest.newBuilder() to construct. + private AcknowledgeUserDataCollectionRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AcknowledgeUserDataCollectionRequest() { + property_ = ""; + acknowledgement_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AcknowledgeUserDataCollectionRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AcknowledgeUserDataCollectionRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + property_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + acknowledgement_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_AcknowledgeUserDataCollectionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_AcknowledgeUserDataCollectionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest.class, + com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest.Builder.class); + } + + public static final int PROPERTY_FIELD_NUMBER = 1; + private volatile java.lang.Object property_; + /** + * + * + *
+   * Required. The property for which to acknowledge user data collection.
+   * 
+ * + * + * string property = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The property. + */ + @java.lang.Override + public java.lang.String getProperty() { + java.lang.Object ref = property_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + property_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The property for which to acknowledge user data collection.
+   * 
+ * + * + * string property = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for property. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPropertyBytes() { + java.lang.Object ref = property_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + property_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ACKNOWLEDGEMENT_FIELD_NUMBER = 2; + private volatile java.lang.Object acknowledgement_; + /** + * + * + *
+   * Required. An acknowledgement that the caller of this method understands the terms
+   * of user data collection.
+   * This field must contain the exact value:
+   * "I acknowledge that I have the necessary privacy disclosures and rights
+   * from my end users for the collection and processing of their data,
+   * including the association of such data with the visitation information
+   * Google Analytics collects from my site and/or app property."
+   * 
+ * + * string acknowledgement = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The acknowledgement. + */ + @java.lang.Override + public java.lang.String getAcknowledgement() { + java.lang.Object ref = acknowledgement_; + 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(); + acknowledgement_ = s; + return s; + } + } + /** + * + * + *
+   * Required. An acknowledgement that the caller of this method understands the terms
+   * of user data collection.
+   * This field must contain the exact value:
+   * "I acknowledge that I have the necessary privacy disclosures and rights
+   * from my end users for the collection and processing of their data,
+   * including the association of such data with the visitation information
+   * Google Analytics collects from my site and/or app property."
+   * 
+ * + * string acknowledgement = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for acknowledgement. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAcknowledgementBytes() { + java.lang.Object ref = acknowledgement_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + acknowledgement_ = 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(property_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, property_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(acknowledgement_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, acknowledgement_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(property_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, property_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(acknowledgement_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, acknowledgement_); + } + size += unknownFields.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.admin.v1beta.AcknowledgeUserDataCollectionRequest)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest other = + (com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest) obj; + + if (!getProperty().equals(other.getProperty())) return false; + if (!getAcknowledgement().equals(other.getAcknowledgement())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PROPERTY_FIELD_NUMBER; + hash = (53 * hash) + getProperty().hashCode(); + hash = (37 * hash) + ACKNOWLEDGEMENT_FIELD_NUMBER; + hash = (53 * hash) + getAcknowledgement().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest 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.admin.v1beta.AcknowledgeUserDataCollectionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest 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.admin.v1beta.AcknowledgeUserDataCollectionRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest 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.admin.v1beta.AcknowledgeUserDataCollectionRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest + 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.admin.v1beta.AcknowledgeUserDataCollectionRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest 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.admin.v1beta.AcknowledgeUserDataCollectionRequest 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; + } + /** + * + * + *
+   * Request message for AcknowledgeUserDataCollection RPC.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest) + com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_AcknowledgeUserDataCollectionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_AcknowledgeUserDataCollectionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest.class, + com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest.Builder.class); + } + + // Construct using + // com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + property_ = ""; + + acknowledgement_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_AcknowledgeUserDataCollectionRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest + getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest build() { + com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest buildPartial() { + com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest result = + new com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest(this); + result.property_ = property_; + result.acknowledgement_ = acknowledgement_; + onBuilt(); + return result; + } + + @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.admin.v1beta.AcknowledgeUserDataCollectionRequest) { + return mergeFrom( + (com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest other) { + if (other + == com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest + .getDefaultInstance()) return this; + if (!other.getProperty().isEmpty()) { + property_ = other.property_; + onChanged(); + } + if (!other.getAcknowledgement().isEmpty()) { + acknowledgement_ = other.acknowledgement_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object property_ = ""; + /** + * + * + *
+     * Required. The property for which to acknowledge user data collection.
+     * 
+ * + * + * string property = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The property. + */ + public java.lang.String getProperty() { + java.lang.Object ref = property_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + property_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The property for which to acknowledge user data collection.
+     * 
+ * + * + * string property = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for property. + */ + public com.google.protobuf.ByteString getPropertyBytes() { + java.lang.Object ref = property_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + property_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The property for which to acknowledge user data collection.
+     * 
+ * + * + * string property = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The property to set. + * @return This builder for chaining. + */ + public Builder setProperty(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + property_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The property for which to acknowledge user data collection.
+     * 
+ * + * + * string property = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearProperty() { + + property_ = getDefaultInstance().getProperty(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The property for which to acknowledge user data collection.
+     * 
+ * + * + * string property = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for property to set. + * @return This builder for chaining. + */ + public Builder setPropertyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + property_ = value; + onChanged(); + return this; + } + + private java.lang.Object acknowledgement_ = ""; + /** + * + * + *
+     * Required. An acknowledgement that the caller of this method understands the terms
+     * of user data collection.
+     * This field must contain the exact value:
+     * "I acknowledge that I have the necessary privacy disclosures and rights
+     * from my end users for the collection and processing of their data,
+     * including the association of such data with the visitation information
+     * Google Analytics collects from my site and/or app property."
+     * 
+ * + * string acknowledgement = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The acknowledgement. + */ + public java.lang.String getAcknowledgement() { + java.lang.Object ref = acknowledgement_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + acknowledgement_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. An acknowledgement that the caller of this method understands the terms
+     * of user data collection.
+     * This field must contain the exact value:
+     * "I acknowledge that I have the necessary privacy disclosures and rights
+     * from my end users for the collection and processing of their data,
+     * including the association of such data with the visitation information
+     * Google Analytics collects from my site and/or app property."
+     * 
+ * + * string acknowledgement = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for acknowledgement. + */ + public com.google.protobuf.ByteString getAcknowledgementBytes() { + java.lang.Object ref = acknowledgement_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + acknowledgement_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. An acknowledgement that the caller of this method understands the terms
+     * of user data collection.
+     * This field must contain the exact value:
+     * "I acknowledge that I have the necessary privacy disclosures and rights
+     * from my end users for the collection and processing of their data,
+     * including the association of such data with the visitation information
+     * Google Analytics collects from my site and/or app property."
+     * 
+ * + * string acknowledgement = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The acknowledgement to set. + * @return This builder for chaining. + */ + public Builder setAcknowledgement(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + acknowledgement_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. An acknowledgement that the caller of this method understands the terms
+     * of user data collection.
+     * This field must contain the exact value:
+     * "I acknowledge that I have the necessary privacy disclosures and rights
+     * from my end users for the collection and processing of their data,
+     * including the association of such data with the visitation information
+     * Google Analytics collects from my site and/or app property."
+     * 
+ * + * string acknowledgement = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearAcknowledgement() { + + acknowledgement_ = getDefaultInstance().getAcknowledgement(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. An acknowledgement that the caller of this method understands the terms
+     * of user data collection.
+     * This field must contain the exact value:
+     * "I acknowledge that I have the necessary privacy disclosures and rights
+     * from my end users for the collection and processing of their data,
+     * including the association of such data with the visitation information
+     * Google Analytics collects from my site and/or app property."
+     * 
+ * + * string acknowledgement = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for acknowledgement to set. + * @return This builder for chaining. + */ + public Builder setAcknowledgementBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + acknowledgement_ = value; + 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.admin.v1beta.AcknowledgeUserDataCollectionRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest) + private static final com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest(); + } + + public static com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AcknowledgeUserDataCollectionRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AcknowledgeUserDataCollectionRequest(input, extensionRegistry); + } + }; + + 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.admin.v1beta.AcknowledgeUserDataCollectionRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/AcknowledgeUserDataCollectionRequestOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/AcknowledgeUserDataCollectionRequestOrBuilder.java new file mode 100644 index 000000000000..528bdff1e8e5 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/AcknowledgeUserDataCollectionRequestOrBuilder.java @@ -0,0 +1,91 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +public interface AcknowledgeUserDataCollectionRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The property for which to acknowledge user data collection.
+   * 
+ * + * + * string property = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The property. + */ + java.lang.String getProperty(); + /** + * + * + *
+   * Required. The property for which to acknowledge user data collection.
+   * 
+ * + * + * string property = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for property. + */ + com.google.protobuf.ByteString getPropertyBytes(); + + /** + * + * + *
+   * Required. An acknowledgement that the caller of this method understands the terms
+   * of user data collection.
+   * This field must contain the exact value:
+   * "I acknowledge that I have the necessary privacy disclosures and rights
+   * from my end users for the collection and processing of their data,
+   * including the association of such data with the visitation information
+   * Google Analytics collects from my site and/or app property."
+   * 
+ * + * string acknowledgement = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The acknowledgement. + */ + java.lang.String getAcknowledgement(); + /** + * + * + *
+   * Required. An acknowledgement that the caller of this method understands the terms
+   * of user data collection.
+   * This field must contain the exact value:
+   * "I acknowledge that I have the necessary privacy disclosures and rights
+   * from my end users for the collection and processing of their data,
+   * including the association of such data with the visitation information
+   * Google Analytics collects from my site and/or app property."
+   * 
+ * + * string acknowledgement = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for acknowledgement. + */ + com.google.protobuf.ByteString getAcknowledgementBytes(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/AcknowledgeUserDataCollectionResponse.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/AcknowledgeUserDataCollectionResponse.java new file mode 100644 index 000000000000..67d95d6a1c2e --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/AcknowledgeUserDataCollectionResponse.java @@ -0,0 +1,476 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * Response message for AcknowledgeUserDataCollection RPC.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse} + */ +public final class AcknowledgeUserDataCollectionResponse + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse) + AcknowledgeUserDataCollectionResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use AcknowledgeUserDataCollectionResponse.newBuilder() to construct. + private AcknowledgeUserDataCollectionResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AcknowledgeUserDataCollectionResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AcknowledgeUserDataCollectionResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AcknowledgeUserDataCollectionResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_AcknowledgeUserDataCollectionResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_AcknowledgeUserDataCollectionResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse.class, + com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse.Builder.class); + } + + 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 { + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.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.admin.v1beta.AcknowledgeUserDataCollectionResponse)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse other = + (com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse) obj; + + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse 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.admin.v1beta.AcknowledgeUserDataCollectionResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse 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.admin.v1beta.AcknowledgeUserDataCollectionResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse 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.admin.v1beta.AcknowledgeUserDataCollectionResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse + 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.admin.v1beta.AcknowledgeUserDataCollectionResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse 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.admin.v1beta.AcknowledgeUserDataCollectionResponse 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; + } + /** + * + * + *
+   * Response message for AcknowledgeUserDataCollection RPC.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse) + com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_AcknowledgeUserDataCollectionResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_AcknowledgeUserDataCollectionResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse.class, + com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse.Builder + .class); + } + + // Construct using + // com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_AcknowledgeUserDataCollectionResponse_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse + getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse build() { + com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse buildPartial() { + com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse result = + new com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse(this); + onBuilt(); + return result; + } + + @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.admin.v1beta.AcknowledgeUserDataCollectionResponse) { + return mergeFrom( + (com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse other) { + if (other + == com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse + .getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + 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.admin.v1beta.AcknowledgeUserDataCollectionResponse) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse) + private static final com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse(); + } + + public static com.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AcknowledgeUserDataCollectionResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AcknowledgeUserDataCollectionResponse(input, extensionRegistry); + } + }; + + 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.admin.v1beta.AcknowledgeUserDataCollectionResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/AcknowledgeUserDataCollectionResponseOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/AcknowledgeUserDataCollectionResponseOrBuilder.java new file mode 100644 index 000000000000..8b67545d3ee7 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/AcknowledgeUserDataCollectionResponseOrBuilder.java @@ -0,0 +1,24 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +public interface AcknowledgeUserDataCollectionResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ActionType.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ActionType.java new file mode 100644 index 000000000000..88a782e29801 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ActionType.java @@ -0,0 +1,198 @@ +/* + * Copyright 2020 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/admin/v1beta/resources.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * Types of actions that may change a resource.
+ * 
+ * + * Protobuf enum {@code google.analytics.admin.v1beta.ActionType} + */ +public enum ActionType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Action type unknown or not specified.
+   * 
+ * + * ACTION_TYPE_UNSPECIFIED = 0; + */ + ACTION_TYPE_UNSPECIFIED(0), + /** + * + * + *
+   * Resource was created in this change.
+   * 
+ * + * CREATED = 1; + */ + CREATED(1), + /** + * + * + *
+   * Resource was updated in this change.
+   * 
+ * + * UPDATED = 2; + */ + UPDATED(2), + /** + * + * + *
+   * Resource was deleted in this change.
+   * 
+ * + * DELETED = 3; + */ + DELETED(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Action type unknown or not specified.
+   * 
+ * + * ACTION_TYPE_UNSPECIFIED = 0; + */ + public static final int ACTION_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Resource was created in this change.
+   * 
+ * + * CREATED = 1; + */ + public static final int CREATED_VALUE = 1; + /** + * + * + *
+   * Resource was updated in this change.
+   * 
+ * + * UPDATED = 2; + */ + public static final int UPDATED_VALUE = 2; + /** + * + * + *
+   * Resource was deleted in this change.
+   * 
+ * + * DELETED = 3; + */ + public static final int DELETED_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ActionType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ActionType forNumber(int value) { + switch (value) { + case 0: + return ACTION_TYPE_UNSPECIFIED; + case 1: + return CREATED; + case 2: + return UPDATED; + case 3: + return DELETED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ActionType findValueByNumber(int number) { + return ActionType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.analytics.admin.v1beta.ResourcesProto.getDescriptor().getEnumTypes().get(3); + } + + private static final ActionType[] VALUES = values(); + + public static ActionType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ActionType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.analytics.admin.v1beta.ActionType) +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ActorType.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ActorType.java new file mode 100644 index 000000000000..b3d1ccfb59fa --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ActorType.java @@ -0,0 +1,199 @@ +/* + * Copyright 2020 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/admin/v1beta/resources.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * Different kinds of actors that can make changes to Google Analytics
+ * resources.
+ * 
+ * + * Protobuf enum {@code google.analytics.admin.v1beta.ActorType} + */ +public enum ActorType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Unknown or unspecified actor type.
+   * 
+ * + * ACTOR_TYPE_UNSPECIFIED = 0; + */ + ACTOR_TYPE_UNSPECIFIED(0), + /** + * + * + *
+   * Changes made by the user specified in actor_email.
+   * 
+ * + * USER = 1; + */ + USER(1), + /** + * + * + *
+   * Changes made by the Google Analytics system.
+   * 
+ * + * SYSTEM = 2; + */ + SYSTEM(2), + /** + * + * + *
+   * Changes made by Google Analytics support team staff.
+   * 
+ * + * SUPPORT = 3; + */ + SUPPORT(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Unknown or unspecified actor type.
+   * 
+ * + * ACTOR_TYPE_UNSPECIFIED = 0; + */ + public static final int ACTOR_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Changes made by the user specified in actor_email.
+   * 
+ * + * USER = 1; + */ + public static final int USER_VALUE = 1; + /** + * + * + *
+   * Changes made by the Google Analytics system.
+   * 
+ * + * SYSTEM = 2; + */ + public static final int SYSTEM_VALUE = 2; + /** + * + * + *
+   * Changes made by Google Analytics support team staff.
+   * 
+ * + * SUPPORT = 3; + */ + public static final int SUPPORT_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ActorType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ActorType forNumber(int value) { + switch (value) { + case 0: + return ACTOR_TYPE_UNSPECIFIED; + case 1: + return USER; + case 2: + return SYSTEM; + case 3: + return SUPPORT; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ActorType findValueByNumber(int number) { + return ActorType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.analytics.admin.v1beta.ResourcesProto.getDescriptor().getEnumTypes().get(2); + } + + private static final ActorType[] VALUES = values(); + + public static ActorType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ActorType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.analytics.admin.v1beta.ActorType) +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/AnalyticsAdminProto.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/AnalyticsAdminProto.java new file mode 100644 index 000000000000..dbb0229e3770 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/AnalyticsAdminProto.java @@ -0,0 +1,1256 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +public final class AnalyticsAdminProto { + private AnalyticsAdminProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_GetAccountRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_GetAccountRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_ListAccountsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_ListAccountsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_ListAccountsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_ListAccountsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_DeleteAccountRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_DeleteAccountRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_UpdateAccountRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_UpdateAccountRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_ProvisionAccountTicketRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_ProvisionAccountTicketRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_ProvisionAccountTicketResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_ProvisionAccountTicketResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_GetPropertyRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_GetPropertyRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_ListPropertiesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_ListPropertiesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_ListPropertiesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_ListPropertiesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_UpdatePropertyRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_UpdatePropertyRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_CreatePropertyRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_CreatePropertyRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_DeletePropertyRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_DeletePropertyRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_CreateFirebaseLinkRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_CreateFirebaseLinkRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_DeleteFirebaseLinkRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_DeleteFirebaseLinkRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_ListFirebaseLinksRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_ListFirebaseLinksRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_ListFirebaseLinksResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_ListFirebaseLinksResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_CreateGoogleAdsLinkRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_CreateGoogleAdsLinkRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_UpdateGoogleAdsLinkRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_UpdateGoogleAdsLinkRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_DeleteGoogleAdsLinkRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_DeleteGoogleAdsLinkRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_ListGoogleAdsLinksRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_ListGoogleAdsLinksRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_ListGoogleAdsLinksResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_ListGoogleAdsLinksResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_GetDataSharingSettingsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_GetDataSharingSettingsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_ListAccountSummariesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_ListAccountSummariesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_ListAccountSummariesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_ListAccountSummariesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_AcknowledgeUserDataCollectionRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_AcknowledgeUserDataCollectionRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_AcknowledgeUserDataCollectionResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_AcknowledgeUserDataCollectionResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_SearchChangeHistoryEventsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_SearchChangeHistoryEventsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_SearchChangeHistoryEventsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_SearchChangeHistoryEventsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_GetMeasurementProtocolSecretRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_GetMeasurementProtocolSecretRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_CreateMeasurementProtocolSecretRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_CreateMeasurementProtocolSecretRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_DeleteMeasurementProtocolSecretRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_DeleteMeasurementProtocolSecretRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_UpdateMeasurementProtocolSecretRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_UpdateMeasurementProtocolSecretRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_ListMeasurementProtocolSecretsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_ListMeasurementProtocolSecretsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_ListMeasurementProtocolSecretsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_ListMeasurementProtocolSecretsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_CreateConversionEventRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_CreateConversionEventRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_GetConversionEventRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_GetConversionEventRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_DeleteConversionEventRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_DeleteConversionEventRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_ListConversionEventsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_ListConversionEventsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_ListConversionEventsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_ListConversionEventsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_CreateCustomDimensionRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_CreateCustomDimensionRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_UpdateCustomDimensionRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_UpdateCustomDimensionRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_ListCustomDimensionsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_ListCustomDimensionsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_ListCustomDimensionsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_ListCustomDimensionsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_ArchiveCustomDimensionRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_ArchiveCustomDimensionRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_GetCustomDimensionRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_GetCustomDimensionRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_CreateCustomMetricRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_CreateCustomMetricRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_UpdateCustomMetricRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_UpdateCustomMetricRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_ListCustomMetricsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_ListCustomMetricsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_ListCustomMetricsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_ListCustomMetricsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_ArchiveCustomMetricRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_ArchiveCustomMetricRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_GetCustomMetricRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_GetCustomMetricRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_GetDataRetentionSettingsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_GetDataRetentionSettingsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_UpdateDataRetentionSettingsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_UpdateDataRetentionSettingsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_CreateDataStreamRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_CreateDataStreamRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_DeleteDataStreamRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_DeleteDataStreamRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_UpdateDataStreamRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_UpdateDataStreamRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_ListDataStreamsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_ListDataStreamsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_ListDataStreamsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_ListDataStreamsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_GetDataStreamRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_GetDataStreamRequest_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n3google/analytics/admin/v1beta/analytic" + + "s_admin.proto\022\035google.analytics.admin.v1" + + "beta\032-google/analytics/admin/v1beta/reso" + + "urces.proto\032\034google/api/annotations.prot" + + "o\032\027google/api/client.proto\032\037google/api/f" + + "ield_behavior.proto\032\031google/api/resource" + + ".proto\032\033google/protobuf/empty.proto\032 goo" + + "gle/protobuf/field_mask.proto\032\037google/pr" + + "otobuf/timestamp.proto\"P\n\021GetAccountRequ" + + "est\022;\n\004name\030\001 \001(\tB-\340A\002\372A\'\n%analyticsadmi" + + "n.googleapis.com/Account\"R\n\023ListAccounts" + + "Request\022\021\n\tpage_size\030\001 \001(\005\022\022\n\npage_token" + + "\030\002 \001(\t\022\024\n\014show_deleted\030\003 \001(\010\"i\n\024ListAcco" + + "untsResponse\0228\n\010accounts\030\001 \003(\0132&.google." + + "analytics.admin.v1beta.Account\022\027\n\017next_p" + + "age_token\030\002 \001(\t\"S\n\024DeleteAccountRequest\022" + + ";\n\004name\030\001 \001(\tB-\340A\002\372A\'\n%analyticsadmin.go" + + "ogleapis.com/Account\"\212\001\n\024UpdateAccountRe" + + "quest\022<\n\007account\030\001 \001(\0132&.google.analytic" + + "s.admin.v1beta.AccountB\003\340A\002\0224\n\013update_ma" + + "sk\030\002 \001(\0132\032.google.protobuf.FieldMaskB\003\340A" + + "\002\"n\n\035ProvisionAccountTicketRequest\0227\n\007ac" + + "count\030\001 \001(\0132&.google.analytics.admin.v1b" + + "eta.Account\022\024\n\014redirect_uri\030\002 \001(\t\";\n\036Pro" + + "visionAccountTicketResponse\022\031\n\021account_t" + + "icket_id\030\001 \001(\t\"R\n\022GetPropertyRequest\022<\n\004" + + "name\030\001 \001(\tB.\340A\002\372A(\n&analyticsadmin.googl" + + "eapis.com/Property\"i\n\025ListPropertiesRequ" + + "est\022\023\n\006filter\030\001 \001(\tB\003\340A\002\022\021\n\tpage_size\030\002 " + + "\001(\005\022\022\n\npage_token\030\003 \001(\t\022\024\n\014show_deleted\030" + + "\004 \001(\010\"n\n\026ListPropertiesResponse\022;\n\nprope" + + "rties\030\001 \003(\0132\'.google.analytics.admin.v1b" + + "eta.Property\022\027\n\017next_page_token\030\002 \001(\t\"\215\001" + + "\n\025UpdatePropertyRequest\022>\n\010property\030\001 \001(" + + "\0132\'.google.analytics.admin.v1beta.Proper" + + "tyB\003\340A\002\0224\n\013update_mask\030\002 \001(\0132\032.google.pr" + + "otobuf.FieldMaskB\003\340A\002\"W\n\025CreatePropertyR" + + "equest\022>\n\010property\030\001 \001(\0132\'.google.analyt" + + "ics.admin.v1beta.PropertyB\003\340A\002\"U\n\025Delete" + + "PropertyRequest\022<\n\004name\030\001 \001(\tB.\340A\002\372A(\n&a" + + "nalyticsadmin.googleapis.com/Property\"\250\001" + + "\n\031CreateFirebaseLinkRequest\022B\n\006parent\030\001 " + + "\001(\tB2\340A\002\372A,\022*analyticsadmin.googleapis.c" + + "om/FirebaseLink\022G\n\rfirebase_link\030\002 \001(\0132+" + + ".google.analytics.admin.v1beta.FirebaseL" + + "inkB\003\340A\002\"]\n\031DeleteFirebaseLinkRequest\022@\n" + + "\004name\030\001 \001(\tB2\340A\002\372A,\n*analyticsadmin.goog" + + "leapis.com/FirebaseLink\"\205\001\n\030ListFirebase" + + "LinksRequest\022B\n\006parent\030\001 \001(\tB2\340A\002\372A,\022*an" + + "alyticsadmin.googleapis.com/FirebaseLink" + + "\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"" + + "y\n\031ListFirebaseLinksResponse\022C\n\016firebase" + + "_links\030\001 \003(\0132+.google.analytics.admin.v1" + + "beta.FirebaseLink\022\027\n\017next_page_token\030\002 \001" + + "(\t\"\255\001\n\032CreateGoogleAdsLinkRequest\022C\n\006par" + + "ent\030\001 \001(\tB3\340A\002\372A-\022+analyticsadmin.google" + + "apis.com/GoogleAdsLink\022J\n\017google_ads_lin" + + "k\030\002 \001(\0132,.google.analytics.admin.v1beta." + + "GoogleAdsLinkB\003\340A\002\"\231\001\n\032UpdateGoogleAdsLi" + + "nkRequest\022E\n\017google_ads_link\030\001 \001(\0132,.goo" + + "gle.analytics.admin.v1beta.GoogleAdsLink" + + "\0224\n\013update_mask\030\002 \001(\0132\032.google.protobuf." + + "FieldMaskB\003\340A\002\"_\n\032DeleteGoogleAdsLinkReq" + + "uest\022A\n\004name\030\001 \001(\tB3\340A\002\372A-\n+analyticsadm" + + "in.googleapis.com/GoogleAdsLink\"\207\001\n\031List" + + "GoogleAdsLinksRequest\022C\n\006parent\030\001 \001(\tB3\340" + + "A\002\372A-\022+analyticsadmin.googleapis.com/Goo" + + "gleAdsLink\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_to" + + "ken\030\003 \001(\t\"}\n\032ListGoogleAdsLinksResponse\022" + + "F\n\020google_ads_links\030\001 \003(\0132,.google.analy" + + "tics.admin.v1beta.GoogleAdsLink\022\027\n\017next_" + + "page_token\030\002 \001(\t\"h\n\035GetDataSharingSettin" + + "gsRequest\022G\n\004name\030\001 \001(\tB9\340A\002\372A3\n1analyti" + + "csadmin.googleapis.com/DataSharingSettin" + + "gs\"D\n\033ListAccountSummariesRequest\022\021\n\tpag" + + "e_size\030\001 \001(\005\022\022\n\npage_token\030\002 \001(\t\"\201\001\n\034Lis" + + "tAccountSummariesResponse\022H\n\021account_sum" + + "maries\030\001 \003(\0132-.google.analytics.admin.v1" + + "beta.AccountSummary\022\027\n\017next_page_token\030\002" + + " \001(\t\"\206\001\n$AcknowledgeUserDataCollectionRe" + + "quest\022@\n\010property\030\001 \001(\tB.\340A\002\372A(\n&analyti" + + "csadmin.googleapis.com/Property\022\034\n\017ackno" + + "wledgement\030\002 \001(\tB\003\340A\002\"\'\n%AcknowledgeUser" + + "DataCollectionResponse\"\201\004\n SearchChangeH" + + "istoryEventsRequest\022>\n\007account\030\001 \001(\tB-\340A" + + "\002\372A\'\n%analyticsadmin.googleapis.com/Acco" + + "unt\022@\n\010property\030\002 \001(\tB.\340A\001\372A(\n&analytics" + + "admin.googleapis.com/Property\022T\n\rresourc" + + "e_type\030\003 \003(\01628.google.analytics.admin.v1" + + "beta.ChangeHistoryResourceTypeB\003\340A\001\022>\n\006a" + + "ction\030\004 \003(\0162).google.analytics.admin.v1b" + + "eta.ActionTypeB\003\340A\001\022\030\n\013actor_email\030\005 \003(\t" + + "B\003\340A\001\022=\n\024earliest_change_time\030\006 \001(\0132\032.go" + + "ogle.protobuf.TimestampB\003\340A\001\022;\n\022latest_c" + + "hange_time\030\007 \001(\0132\032.google.protobuf.Times" + + "tampB\003\340A\001\022\026\n\tpage_size\030\010 \001(\005B\003\340A\001\022\027\n\npag" + + "e_token\030\t \001(\tB\003\340A\001\"\216\001\n!SearchChangeHisto" + + "ryEventsResponse\022P\n\025change_history_event" + + "s\030\001 \003(\01321.google.analytics.admin.v1beta." + + "ChangeHistoryEvent\022\027\n\017next_page_token\030\002 " + + "\001(\t\"t\n#GetMeasurementProtocolSecretReque" + + "st\022M\n\004name\030\001 \001(\tB?\340A\002\372A9\n7analyticsadmin" + + ".googleapis.com/MeasurementProtocolSecre" + + "t\"\335\001\n&CreateMeasurementProtocolSecretReq" + + "uest\022O\n\006parent\030\001 \001(\tB?\340A\002\372A9\0227analyticsa" + + "dmin.googleapis.com/MeasurementProtocolS" + + "ecret\022b\n\033measurement_protocol_secret\030\002 \001" + + "(\01328.google.analytics.admin.v1beta.Measu" + + "rementProtocolSecretB\003\340A\002\"w\n&DeleteMeasu" + + "rementProtocolSecretRequest\022M\n\004name\030\001 \001(" + + "\tB?\340A\002\372A9\n7analyticsadmin.googleapis.com" + + "/MeasurementProtocolSecret\"\275\001\n&UpdateMea" + + "surementProtocolSecretRequest\022b\n\033measure" + + "ment_protocol_secret\030\001 \001(\01328.google.anal" + + "ytics.admin.v1beta.MeasurementProtocolSe" + + "cretB\003\340A\002\022/\n\013update_mask\030\002 \001(\0132\032.google." + + "protobuf.FieldMask\"\237\001\n%ListMeasurementPr" + + "otocolSecretsRequest\022O\n\006parent\030\001 \001(\tB?\340A" + + "\002\372A9\0227analyticsadmin.googleapis.com/Meas" + + "urementProtocolSecret\022\021\n\tpage_size\030\002 \001(\005" + + "\022\022\n\npage_token\030\003 \001(\t\"\241\001\n&ListMeasurement" + + "ProtocolSecretsResponse\022^\n\034measurement_p" + + "rotocol_secrets\030\001 \003(\01328.google.analytics" + + ".admin.v1beta.MeasurementProtocolSecret\022" + + "\027\n\017next_page_token\030\002 \001(\t\"\264\001\n\034CreateConve" + + "rsionEventRequest\022M\n\020conversion_event\030\001 " + + "\001(\0132..google.analytics.admin.v1beta.Conv" + + "ersionEventB\003\340A\002\022E\n\006parent\030\002 \001(\tB5\340A\002\372A/" + + "\022-analyticsadmin.googleapis.com/Conversi" + + "onEvent\"`\n\031GetConversionEventRequest\022C\n\004" + + "name\030\001 \001(\tB5\340A\002\372A/\n-analyticsadmin.googl" + + "eapis.com/ConversionEvent\"c\n\034DeleteConve" + + "rsionEventRequest\022C\n\004name\030\001 \001(\tB5\340A\002\372A/\n" + + "-analyticsadmin.googleapis.com/Conversio" + + "nEvent\"\213\001\n\033ListConversionEventsRequest\022E" + + "\n\006parent\030\001 \001(\tB5\340A\002\372A/\022-analyticsadmin.g" + + "oogleapis.com/ConversionEvent\022\021\n\tpage_si" + + "ze\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"\202\001\n\034ListCon" + + "versionEventsResponse\022I\n\021conversion_even" + + "ts\030\001 \003(\0132..google.analytics.admin.v1beta" + + ".ConversionEvent\022\027\n\017next_page_token\030\002 \001(" + + "\t\"\264\001\n\034CreateCustomDimensionRequest\022E\n\006pa" + + "rent\030\001 \001(\tB5\340A\002\372A/\022-analyticsadmin.googl" + + "eapis.com/CustomDimension\022M\n\020custom_dime" + + "nsion\030\002 \001(\0132..google.analytics.admin.v1b" + + "eta.CustomDimensionB\003\340A\002\"\236\001\n\034UpdateCusto" + + "mDimensionRequest\022H\n\020custom_dimension\030\001 " + + "\001(\0132..google.analytics.admin.v1beta.Cust" + + "omDimension\0224\n\013update_mask\030\002 \001(\0132\032.googl" + + "e.protobuf.FieldMaskB\003\340A\002\"\213\001\n\033ListCustom" + + "DimensionsRequest\022E\n\006parent\030\001 \001(\tB5\340A\002\372A" + + "/\022-analyticsadmin.googleapis.com/CustomD" + + "imension\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_toke" + + "n\030\003 \001(\t\"\202\001\n\034ListCustomDimensionsResponse" + + "\022I\n\021custom_dimensions\030\001 \003(\0132..google.ana" + + "lytics.admin.v1beta.CustomDimension\022\027\n\017n" + + "ext_page_token\030\002 \001(\t\"d\n\035ArchiveCustomDim" + + "ensionRequest\022C\n\004name\030\001 \001(\tB5\340A\002\372A/\n-ana" + + "lyticsadmin.googleapis.com/CustomDimensi" + + "on\"`\n\031GetCustomDimensionRequest\022C\n\004name\030" + + "\001 \001(\tB5\340A\002\372A/\n-analyticsadmin.googleapis" + + ".com/CustomDimension\"\250\001\n\031CreateCustomMet" + + "ricRequest\022B\n\006parent\030\001 \001(\tB2\340A\002\372A,\022*anal" + + "yticsadmin.googleapis.com/CustomMetric\022G" + + "\n\rcustom_metric\030\002 \001(\0132+.google.analytics" + + ".admin.v1beta.CustomMetricB\003\340A\002\"\225\001\n\031Upda" + + "teCustomMetricRequest\022B\n\rcustom_metric\030\001" + + " \001(\0132+.google.analytics.admin.v1beta.Cus" + + "tomMetric\0224\n\013update_mask\030\002 \001(\0132\032.google." + + "protobuf.FieldMaskB\003\340A\002\"\205\001\n\030ListCustomMe" + + "tricsRequest\022B\n\006parent\030\001 \001(\tB2\340A\002\372A,\022*an" + + "alyticsadmin.googleapis.com/CustomMetric" + + "\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"" + + "y\n\031ListCustomMetricsResponse\022C\n\016custom_m" + + "etrics\030\001 \003(\0132+.google.analytics.admin.v1" + + "beta.CustomMetric\022\027\n\017next_page_token\030\002 \001" + + "(\t\"^\n\032ArchiveCustomMetricRequest\022@\n\004name" + + "\030\001 \001(\tB2\340A\002\372A,\n*analyticsadmin.googleapi" + + "s.com/CustomMetric\"Z\n\026GetCustomMetricReq" + + "uest\022@\n\004name\030\001 \001(\tB2\340A\002\372A,\n*analyticsadm" + + "in.googleapis.com/CustomMetric\"l\n\037GetDat" + + "aRetentionSettingsRequest\022I\n\004name\030\001 \001(\tB" + + ";\340A\002\372A5\n3analyticsadmin.googleapis.com/D" + + "ataRetentionSettings\"\266\001\n\"UpdateDataReten" + + "tionSettingsRequest\022Z\n\027data_retention_se" + + "ttings\030\001 \001(\01324.google.analytics.admin.v1" + + "beta.DataRetentionSettingsB\003\340A\002\0224\n\013updat" + + "e_mask\030\002 \001(\0132\032.google.protobuf.FieldMask" + + "B\003\340A\002\"\240\001\n\027CreateDataStreamRequest\022@\n\006par" + + "ent\030\001 \001(\tB0\340A\002\372A*\022(analyticsadmin.google" + + "apis.com/DataStream\022C\n\013data_stream\030\002 \001(\013" + + "2).google.analytics.admin.v1beta.DataStr" + + "eamB\003\340A\002\"Y\n\027DeleteDataStreamRequest\022>\n\004n" + + "ame\030\001 \001(\tB0\340A\002\372A*\n(analyticsadmin.google" + + "apis.com/DataStream\"\217\001\n\027UpdateDataStream" + + "Request\022>\n\013data_stream\030\001 \001(\0132).google.an" + + "alytics.admin.v1beta.DataStream\0224\n\013updat" + + "e_mask\030\002 \001(\0132\032.google.protobuf.FieldMask" + + "B\003\340A\002\"\201\001\n\026ListDataStreamsRequest\022@\n\006pare" + + "nt\030\001 \001(\tB0\340A\002\372A*\022(analyticsadmin.googlea" + + "pis.com/DataStream\022\021\n\tpage_size\030\002 \001(\005\022\022\n" + + "\npage_token\030\003 \001(\t\"s\n\027ListDataStreamsResp" + + "onse\022?\n\014data_streams\030\001 \003(\0132).google.anal" + + "ytics.admin.v1beta.DataStream\022\027\n\017next_pa" + + "ge_token\030\002 \001(\t\"V\n\024GetDataStreamRequest\022>" + + "\n\004name\030\001 \001(\tB0\340A\002\372A*\n(analyticsadmin.goo" + + "gleapis.com/DataStream2\353L\n\025AnalyticsAdmi" + + "nService\022\220\001\n\nGetAccount\0220.google.analyti" + + "cs.admin.v1beta.GetAccountRequest\032&.goog" + + "le.analytics.admin.v1beta.Account\"(\202\323\344\223\002" + + "\033\022\031/v1beta/{name=accounts/*}\332A\004name\022\221\001\n\014" + + "ListAccounts\0222.google.analytics.admin.v1" + + "beta.ListAccountsRequest\0323.google.analyt" + + "ics.admin.v1beta.ListAccountsResponse\"\030\202" + + "\323\344\223\002\022\022\020/v1beta/accounts\022\206\001\n\rDeleteAccoun" + + "t\0223.google.analytics.admin.v1beta.Delete" + + "AccountRequest\032\026.google.protobuf.Empty\"(" + + "\202\323\344\223\002\033*\031/v1beta/{name=accounts/*}\332A\004name" + + "\022\266\001\n\rUpdateAccount\0223.google.analytics.ad" + + "min.v1beta.UpdateAccountRequest\032&.google" + + ".analytics.admin.v1beta.Account\"H\202\323\344\223\002,2" + + "!/v1beta/{account.name=accounts/*}:\007acco" + + "unt\332A\023account,update_mask\022\311\001\n\026ProvisionA" + + "ccountTicket\022<.google.analytics.admin.v1" + + "beta.ProvisionAccountTicketRequest\032=.goo" + + "gle.analytics.admin.v1beta.ProvisionAcco" + + "untTicketResponse\"2\202\323\344\223\002,\"\'/v1beta/accou" + + "nts:provisionAccountTicket:\001*\022\261\001\n\024ListAc" + + "countSummaries\022:.google.analytics.admin." + + "v1beta.ListAccountSummariesRequest\032;.goo" + + "gle.analytics.admin.v1beta.ListAccountSu" + + "mmariesResponse\" \202\323\344\223\002\032\022\030/v1beta/account" + + "Summaries\022\225\001\n\013GetProperty\0221.google.analy" + + "tics.admin.v1beta.GetPropertyRequest\032\'.g" + + "oogle.analytics.admin.v1beta.Property\"*\202" + + "\323\344\223\002\035\022\033/v1beta/{name=properties/*}\332A\004nam" + + "e\022\231\001\n\016ListProperties\0224.google.analytics." + + "admin.v1beta.ListPropertiesRequest\0325.goo" + + "gle.analytics.admin.v1beta.ListPropertie" + + "sResponse\"\032\202\323\344\223\002\024\022\022/v1beta/properties\022\240\001" + + "\n\016CreateProperty\0224.google.analytics.admi" + + "n.v1beta.CreatePropertyRequest\032\'.google." + + "analytics.admin.v1beta.Property\"/\202\323\344\223\002\036\"" + + "\022/v1beta/properties:\010property\332A\010property" + + "\022\233\001\n\016DeleteProperty\0224.google.analytics.a" + + "dmin.v1beta.DeletePropertyRequest\032\'.goog" + + "le.analytics.admin.v1beta.Property\"*\202\323\344\223" + + "\002\035*\033/v1beta/{name=properties/*}\332A\004name\022\276" + + "\001\n\016UpdateProperty\0224.google.analytics.adm" + + "in.v1beta.UpdatePropertyRequest\032\'.google" + + ".analytics.admin.v1beta.Property\"M\202\323\344\223\0020" + + "2$/v1beta/{property.name=properties/*}:\010" + + "property\332A\024property,update_mask\022\326\001\n\022Crea" + + "teFirebaseLink\0228.google.analytics.admin." + + "v1beta.CreateFirebaseLinkRequest\032+.googl" + + "e.analytics.admin.v1beta.FirebaseLink\"Y\202" + + "\323\344\223\002<\"+/v1beta/{parent=properties/*}/fir" + + "ebaseLinks:\rfirebase_link\332A\024parent,fireb" + + "ase_link\022\242\001\n\022DeleteFirebaseLink\0228.google" + + ".analytics.admin.v1beta.DeleteFirebaseLi" + + "nkRequest\032\026.google.protobuf.Empty\":\202\323\344\223\002" + + "-*+/v1beta/{name=properties/*/firebaseLi" + + "nks/*}\332A\004name\022\304\001\n\021ListFirebaseLinks\0227.go" + + "ogle.analytics.admin.v1beta.ListFirebase" + + "LinksRequest\0328.google.analytics.admin.v1" + + "beta.ListFirebaseLinksResponse\"<\202\323\344\223\002-\022+" + + "/v1beta/{parent=properties/*}/firebaseLi" + + "nks\332A\006parent\022\336\001\n\023CreateGoogleAdsLink\0229.g" + + "oogle.analytics.admin.v1beta.CreateGoogl" + + "eAdsLinkRequest\032,.google.analytics.admin" + + ".v1beta.GoogleAdsLink\"^\202\323\344\223\002?\",/v1beta/{" + + "parent=properties/*}/googleAdsLinks:\017goo" + + "gle_ads_link\332A\026parent,google_ads_link\022\363\001" + + "\n\023UpdateGoogleAdsLink\0229.google.analytics" + + ".admin.v1beta.UpdateGoogleAdsLinkRequest" + + "\032,.google.analytics.admin.v1beta.GoogleA" + + "dsLink\"s\202\323\344\223\002O2.google.analytics.admin.v1" + + "beta.GetDataRetentionSettingsRequest\0324.g" + + "oogle.analytics.admin.v1beta.DataRetenti" + + "onSettings\"@\202\323\344\223\0023\0221/v1beta/{name=proper" + + "ties/*/dataRetentionSettings}\332A\004name\022\251\002\n" + + "\033UpdateDataRetentionSettings\022A.google.an" + + "alytics.admin.v1beta.UpdateDataRetention" + + "SettingsRequest\0324.google.analytics.admin" + + ".v1beta.DataRetentionSettings\"\220\001\202\323\344\223\002d2I" + + "/v1beta/{data_retention_settings.name=pr" + + "operties/*/dataRetentionSettings}:\027data_" + + "retention_settings\332A#data_retention_sett" + + "ings,update_mask\022\312\001\n\020CreateDataStream\0226." + + "google.analytics.admin.v1beta.CreateData" + + "StreamRequest\032).google.analytics.admin.v" + + "1beta.DataStream\"S\202\323\344\223\0028\")/v1beta/{paren" + + "t=properties/*}/dataStreams:\013data_stream" + + "\332A\022parent,data_stream\022\234\001\n\020DeleteDataStre" + + "am\0226.google.analytics.admin.v1beta.Delet" + + "eDataStreamRequest\032\026.google.protobuf.Emp" + + "ty\"8\202\323\344\223\002+*)/v1beta/{name=properties/*/d" + + "ataStreams/*}\332A\004name\022\333\001\n\020UpdateDataStrea" + + "m\0226.google.analytics.admin.v1beta.Update" + + "DataStreamRequest\032).google.analytics.adm" + + "in.v1beta.DataStream\"d\202\323\344\223\002D25/v1beta/{d" + + "ata_stream.name=properties/*/dataStreams" + + "/*}:\013data_stream\332A\027data_stream,update_ma" + + "sk\022\274\001\n\017ListDataStreams\0225.google.analytic" + + "s.admin.v1beta.ListDataStreamsRequest\0326." + + "google.analytics.admin.v1beta.ListDataSt" + + "reamsResponse\":\202\323\344\223\002+\022)/v1beta/{parent=p" + + "roperties/*}/dataStreams\332A\006parent\022\251\001\n\rGe" + + "tDataStream\0223.google.analytics.admin.v1b" + + "eta.GetDataStreamRequest\032).google.analyt" + + "ics.admin.v1beta.DataStream\"8\202\323\344\223\002+\022)/v1" + + "beta/{name=properties/*/dataStreams/*}\332A" + + "\004name\032\204\001\312A\035analyticsadmin.googleapis.com" + + "\322Aahttps://www.googleapis.com/auth/analy" + + "tics.edit,https://www.googleapis.com/aut" + + "h/analytics.readonlyB~\n!com.google.analy" + + "tics.admin.v1betaB\023AnalyticsAdminProtoP\001" + + "ZBgoogle.golang.org/genproto/googleapis/" + + "analytics/admin/v1beta;adminb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.analytics.admin.v1beta.ResourcesProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_analytics_admin_v1beta_GetAccountRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_analytics_admin_v1beta_GetAccountRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_GetAccountRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_analytics_admin_v1beta_ListAccountsRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_analytics_admin_v1beta_ListAccountsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_ListAccountsRequest_descriptor, + new java.lang.String[] { + "PageSize", "PageToken", "ShowDeleted", + }); + internal_static_google_analytics_admin_v1beta_ListAccountsResponse_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_analytics_admin_v1beta_ListAccountsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_ListAccountsResponse_descriptor, + new java.lang.String[] { + "Accounts", "NextPageToken", + }); + internal_static_google_analytics_admin_v1beta_DeleteAccountRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_analytics_admin_v1beta_DeleteAccountRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_DeleteAccountRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_analytics_admin_v1beta_UpdateAccountRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_analytics_admin_v1beta_UpdateAccountRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_UpdateAccountRequest_descriptor, + new java.lang.String[] { + "Account", "UpdateMask", + }); + internal_static_google_analytics_admin_v1beta_ProvisionAccountTicketRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_analytics_admin_v1beta_ProvisionAccountTicketRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_ProvisionAccountTicketRequest_descriptor, + new java.lang.String[] { + "Account", "RedirectUri", + }); + internal_static_google_analytics_admin_v1beta_ProvisionAccountTicketResponse_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_analytics_admin_v1beta_ProvisionAccountTicketResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_ProvisionAccountTicketResponse_descriptor, + new java.lang.String[] { + "AccountTicketId", + }); + internal_static_google_analytics_admin_v1beta_GetPropertyRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_analytics_admin_v1beta_GetPropertyRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_GetPropertyRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_analytics_admin_v1beta_ListPropertiesRequest_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_analytics_admin_v1beta_ListPropertiesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_ListPropertiesRequest_descriptor, + new java.lang.String[] { + "Filter", "PageSize", "PageToken", "ShowDeleted", + }); + internal_static_google_analytics_admin_v1beta_ListPropertiesResponse_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_analytics_admin_v1beta_ListPropertiesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_ListPropertiesResponse_descriptor, + new java.lang.String[] { + "Properties", "NextPageToken", + }); + internal_static_google_analytics_admin_v1beta_UpdatePropertyRequest_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_analytics_admin_v1beta_UpdatePropertyRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_UpdatePropertyRequest_descriptor, + new java.lang.String[] { + "Property", "UpdateMask", + }); + internal_static_google_analytics_admin_v1beta_CreatePropertyRequest_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_analytics_admin_v1beta_CreatePropertyRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_CreatePropertyRequest_descriptor, + new java.lang.String[] { + "Property", + }); + internal_static_google_analytics_admin_v1beta_DeletePropertyRequest_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_analytics_admin_v1beta_DeletePropertyRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_DeletePropertyRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_analytics_admin_v1beta_CreateFirebaseLinkRequest_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_analytics_admin_v1beta_CreateFirebaseLinkRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_CreateFirebaseLinkRequest_descriptor, + new java.lang.String[] { + "Parent", "FirebaseLink", + }); + internal_static_google_analytics_admin_v1beta_DeleteFirebaseLinkRequest_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_analytics_admin_v1beta_DeleteFirebaseLinkRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_DeleteFirebaseLinkRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_analytics_admin_v1beta_ListFirebaseLinksRequest_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_analytics_admin_v1beta_ListFirebaseLinksRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_ListFirebaseLinksRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_analytics_admin_v1beta_ListFirebaseLinksResponse_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_analytics_admin_v1beta_ListFirebaseLinksResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_ListFirebaseLinksResponse_descriptor, + new java.lang.String[] { + "FirebaseLinks", "NextPageToken", + }); + internal_static_google_analytics_admin_v1beta_CreateGoogleAdsLinkRequest_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_analytics_admin_v1beta_CreateGoogleAdsLinkRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_CreateGoogleAdsLinkRequest_descriptor, + new java.lang.String[] { + "Parent", "GoogleAdsLink", + }); + internal_static_google_analytics_admin_v1beta_UpdateGoogleAdsLinkRequest_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_google_analytics_admin_v1beta_UpdateGoogleAdsLinkRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_UpdateGoogleAdsLinkRequest_descriptor, + new java.lang.String[] { + "GoogleAdsLink", "UpdateMask", + }); + internal_static_google_analytics_admin_v1beta_DeleteGoogleAdsLinkRequest_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_google_analytics_admin_v1beta_DeleteGoogleAdsLinkRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_DeleteGoogleAdsLinkRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_analytics_admin_v1beta_ListGoogleAdsLinksRequest_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_google_analytics_admin_v1beta_ListGoogleAdsLinksRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_ListGoogleAdsLinksRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_analytics_admin_v1beta_ListGoogleAdsLinksResponse_descriptor = + getDescriptor().getMessageTypes().get(21); + internal_static_google_analytics_admin_v1beta_ListGoogleAdsLinksResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_ListGoogleAdsLinksResponse_descriptor, + new java.lang.String[] { + "GoogleAdsLinks", "NextPageToken", + }); + internal_static_google_analytics_admin_v1beta_GetDataSharingSettingsRequest_descriptor = + getDescriptor().getMessageTypes().get(22); + internal_static_google_analytics_admin_v1beta_GetDataSharingSettingsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_GetDataSharingSettingsRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_analytics_admin_v1beta_ListAccountSummariesRequest_descriptor = + getDescriptor().getMessageTypes().get(23); + internal_static_google_analytics_admin_v1beta_ListAccountSummariesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_ListAccountSummariesRequest_descriptor, + new java.lang.String[] { + "PageSize", "PageToken", + }); + internal_static_google_analytics_admin_v1beta_ListAccountSummariesResponse_descriptor = + getDescriptor().getMessageTypes().get(24); + internal_static_google_analytics_admin_v1beta_ListAccountSummariesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_ListAccountSummariesResponse_descriptor, + new java.lang.String[] { + "AccountSummaries", "NextPageToken", + }); + internal_static_google_analytics_admin_v1beta_AcknowledgeUserDataCollectionRequest_descriptor = + getDescriptor().getMessageTypes().get(25); + internal_static_google_analytics_admin_v1beta_AcknowledgeUserDataCollectionRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_AcknowledgeUserDataCollectionRequest_descriptor, + new java.lang.String[] { + "Property", "Acknowledgement", + }); + internal_static_google_analytics_admin_v1beta_AcknowledgeUserDataCollectionResponse_descriptor = + getDescriptor().getMessageTypes().get(26); + internal_static_google_analytics_admin_v1beta_AcknowledgeUserDataCollectionResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_AcknowledgeUserDataCollectionResponse_descriptor, + new java.lang.String[] {}); + internal_static_google_analytics_admin_v1beta_SearchChangeHistoryEventsRequest_descriptor = + getDescriptor().getMessageTypes().get(27); + internal_static_google_analytics_admin_v1beta_SearchChangeHistoryEventsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_SearchChangeHistoryEventsRequest_descriptor, + new java.lang.String[] { + "Account", + "Property", + "ResourceType", + "Action", + "ActorEmail", + "EarliestChangeTime", + "LatestChangeTime", + "PageSize", + "PageToken", + }); + internal_static_google_analytics_admin_v1beta_SearchChangeHistoryEventsResponse_descriptor = + getDescriptor().getMessageTypes().get(28); + internal_static_google_analytics_admin_v1beta_SearchChangeHistoryEventsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_SearchChangeHistoryEventsResponse_descriptor, + new java.lang.String[] { + "ChangeHistoryEvents", "NextPageToken", + }); + internal_static_google_analytics_admin_v1beta_GetMeasurementProtocolSecretRequest_descriptor = + getDescriptor().getMessageTypes().get(29); + internal_static_google_analytics_admin_v1beta_GetMeasurementProtocolSecretRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_GetMeasurementProtocolSecretRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_analytics_admin_v1beta_CreateMeasurementProtocolSecretRequest_descriptor = + getDescriptor().getMessageTypes().get(30); + internal_static_google_analytics_admin_v1beta_CreateMeasurementProtocolSecretRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_CreateMeasurementProtocolSecretRequest_descriptor, + new java.lang.String[] { + "Parent", "MeasurementProtocolSecret", + }); + internal_static_google_analytics_admin_v1beta_DeleteMeasurementProtocolSecretRequest_descriptor = + getDescriptor().getMessageTypes().get(31); + internal_static_google_analytics_admin_v1beta_DeleteMeasurementProtocolSecretRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_DeleteMeasurementProtocolSecretRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_analytics_admin_v1beta_UpdateMeasurementProtocolSecretRequest_descriptor = + getDescriptor().getMessageTypes().get(32); + internal_static_google_analytics_admin_v1beta_UpdateMeasurementProtocolSecretRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_UpdateMeasurementProtocolSecretRequest_descriptor, + new java.lang.String[] { + "MeasurementProtocolSecret", "UpdateMask", + }); + internal_static_google_analytics_admin_v1beta_ListMeasurementProtocolSecretsRequest_descriptor = + getDescriptor().getMessageTypes().get(33); + internal_static_google_analytics_admin_v1beta_ListMeasurementProtocolSecretsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_ListMeasurementProtocolSecretsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_analytics_admin_v1beta_ListMeasurementProtocolSecretsResponse_descriptor = + getDescriptor().getMessageTypes().get(34); + internal_static_google_analytics_admin_v1beta_ListMeasurementProtocolSecretsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_ListMeasurementProtocolSecretsResponse_descriptor, + new java.lang.String[] { + "MeasurementProtocolSecrets", "NextPageToken", + }); + internal_static_google_analytics_admin_v1beta_CreateConversionEventRequest_descriptor = + getDescriptor().getMessageTypes().get(35); + internal_static_google_analytics_admin_v1beta_CreateConversionEventRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_CreateConversionEventRequest_descriptor, + new java.lang.String[] { + "ConversionEvent", "Parent", + }); + internal_static_google_analytics_admin_v1beta_GetConversionEventRequest_descriptor = + getDescriptor().getMessageTypes().get(36); + internal_static_google_analytics_admin_v1beta_GetConversionEventRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_GetConversionEventRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_analytics_admin_v1beta_DeleteConversionEventRequest_descriptor = + getDescriptor().getMessageTypes().get(37); + internal_static_google_analytics_admin_v1beta_DeleteConversionEventRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_DeleteConversionEventRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_analytics_admin_v1beta_ListConversionEventsRequest_descriptor = + getDescriptor().getMessageTypes().get(38); + internal_static_google_analytics_admin_v1beta_ListConversionEventsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_ListConversionEventsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_analytics_admin_v1beta_ListConversionEventsResponse_descriptor = + getDescriptor().getMessageTypes().get(39); + internal_static_google_analytics_admin_v1beta_ListConversionEventsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_ListConversionEventsResponse_descriptor, + new java.lang.String[] { + "ConversionEvents", "NextPageToken", + }); + internal_static_google_analytics_admin_v1beta_CreateCustomDimensionRequest_descriptor = + getDescriptor().getMessageTypes().get(40); + internal_static_google_analytics_admin_v1beta_CreateCustomDimensionRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_CreateCustomDimensionRequest_descriptor, + new java.lang.String[] { + "Parent", "CustomDimension", + }); + internal_static_google_analytics_admin_v1beta_UpdateCustomDimensionRequest_descriptor = + getDescriptor().getMessageTypes().get(41); + internal_static_google_analytics_admin_v1beta_UpdateCustomDimensionRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_UpdateCustomDimensionRequest_descriptor, + new java.lang.String[] { + "CustomDimension", "UpdateMask", + }); + internal_static_google_analytics_admin_v1beta_ListCustomDimensionsRequest_descriptor = + getDescriptor().getMessageTypes().get(42); + internal_static_google_analytics_admin_v1beta_ListCustomDimensionsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_ListCustomDimensionsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_analytics_admin_v1beta_ListCustomDimensionsResponse_descriptor = + getDescriptor().getMessageTypes().get(43); + internal_static_google_analytics_admin_v1beta_ListCustomDimensionsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_ListCustomDimensionsResponse_descriptor, + new java.lang.String[] { + "CustomDimensions", "NextPageToken", + }); + internal_static_google_analytics_admin_v1beta_ArchiveCustomDimensionRequest_descriptor = + getDescriptor().getMessageTypes().get(44); + internal_static_google_analytics_admin_v1beta_ArchiveCustomDimensionRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_ArchiveCustomDimensionRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_analytics_admin_v1beta_GetCustomDimensionRequest_descriptor = + getDescriptor().getMessageTypes().get(45); + internal_static_google_analytics_admin_v1beta_GetCustomDimensionRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_GetCustomDimensionRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_analytics_admin_v1beta_CreateCustomMetricRequest_descriptor = + getDescriptor().getMessageTypes().get(46); + internal_static_google_analytics_admin_v1beta_CreateCustomMetricRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_CreateCustomMetricRequest_descriptor, + new java.lang.String[] { + "Parent", "CustomMetric", + }); + internal_static_google_analytics_admin_v1beta_UpdateCustomMetricRequest_descriptor = + getDescriptor().getMessageTypes().get(47); + internal_static_google_analytics_admin_v1beta_UpdateCustomMetricRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_UpdateCustomMetricRequest_descriptor, + new java.lang.String[] { + "CustomMetric", "UpdateMask", + }); + internal_static_google_analytics_admin_v1beta_ListCustomMetricsRequest_descriptor = + getDescriptor().getMessageTypes().get(48); + internal_static_google_analytics_admin_v1beta_ListCustomMetricsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_ListCustomMetricsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_analytics_admin_v1beta_ListCustomMetricsResponse_descriptor = + getDescriptor().getMessageTypes().get(49); + internal_static_google_analytics_admin_v1beta_ListCustomMetricsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_ListCustomMetricsResponse_descriptor, + new java.lang.String[] { + "CustomMetrics", "NextPageToken", + }); + internal_static_google_analytics_admin_v1beta_ArchiveCustomMetricRequest_descriptor = + getDescriptor().getMessageTypes().get(50); + internal_static_google_analytics_admin_v1beta_ArchiveCustomMetricRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_ArchiveCustomMetricRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_analytics_admin_v1beta_GetCustomMetricRequest_descriptor = + getDescriptor().getMessageTypes().get(51); + internal_static_google_analytics_admin_v1beta_GetCustomMetricRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_GetCustomMetricRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_analytics_admin_v1beta_GetDataRetentionSettingsRequest_descriptor = + getDescriptor().getMessageTypes().get(52); + internal_static_google_analytics_admin_v1beta_GetDataRetentionSettingsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_GetDataRetentionSettingsRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_analytics_admin_v1beta_UpdateDataRetentionSettingsRequest_descriptor = + getDescriptor().getMessageTypes().get(53); + internal_static_google_analytics_admin_v1beta_UpdateDataRetentionSettingsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_UpdateDataRetentionSettingsRequest_descriptor, + new java.lang.String[] { + "DataRetentionSettings", "UpdateMask", + }); + internal_static_google_analytics_admin_v1beta_CreateDataStreamRequest_descriptor = + getDescriptor().getMessageTypes().get(54); + internal_static_google_analytics_admin_v1beta_CreateDataStreamRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_CreateDataStreamRequest_descriptor, + new java.lang.String[] { + "Parent", "DataStream", + }); + internal_static_google_analytics_admin_v1beta_DeleteDataStreamRequest_descriptor = + getDescriptor().getMessageTypes().get(55); + internal_static_google_analytics_admin_v1beta_DeleteDataStreamRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_DeleteDataStreamRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_analytics_admin_v1beta_UpdateDataStreamRequest_descriptor = + getDescriptor().getMessageTypes().get(56); + internal_static_google_analytics_admin_v1beta_UpdateDataStreamRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_UpdateDataStreamRequest_descriptor, + new java.lang.String[] { + "DataStream", "UpdateMask", + }); + internal_static_google_analytics_admin_v1beta_ListDataStreamsRequest_descriptor = + getDescriptor().getMessageTypes().get(57); + internal_static_google_analytics_admin_v1beta_ListDataStreamsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_ListDataStreamsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_analytics_admin_v1beta_ListDataStreamsResponse_descriptor = + getDescriptor().getMessageTypes().get(58); + internal_static_google_analytics_admin_v1beta_ListDataStreamsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_ListDataStreamsResponse_descriptor, + new java.lang.String[] { + "DataStreams", "NextPageToken", + }); + internal_static_google_analytics_admin_v1beta_GetDataStreamRequest_descriptor = + getDescriptor().getMessageTypes().get(59); + internal_static_google_analytics_admin_v1beta_GetDataStreamRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_GetDataStreamRequest_descriptor, + new java.lang.String[] { + "Name", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.analytics.admin.v1beta.ResourcesProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ArchiveCustomDimensionRequest.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ArchiveCustomDimensionRequest.java new file mode 100644 index 000000000000..b77b91824f1d --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ArchiveCustomDimensionRequest.java @@ -0,0 +1,667 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * Request message for ArchiveCustomDimension RPC.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.ArchiveCustomDimensionRequest} + */ +public final class ArchiveCustomDimensionRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.ArchiveCustomDimensionRequest) + ArchiveCustomDimensionRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ArchiveCustomDimensionRequest.newBuilder() to construct. + private ArchiveCustomDimensionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ArchiveCustomDimensionRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ArchiveCustomDimensionRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ArchiveCustomDimensionRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ArchiveCustomDimensionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ArchiveCustomDimensionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.ArchiveCustomDimensionRequest.class, + com.google.analytics.admin.v1beta.ArchiveCustomDimensionRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the CustomDimension to archive.
+   * Example format: properties/1234/customDimensions/5678
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the CustomDimension to archive.
+   * Example format: properties/1234/customDimensions/5678
+   * 
+ * + * + * 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_); + } + unknownFields.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 += unknownFields.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.admin.v1beta.ArchiveCustomDimensionRequest)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.ArchiveCustomDimensionRequest other = + (com.google.analytics.admin.v1beta.ArchiveCustomDimensionRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.ArchiveCustomDimensionRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ArchiveCustomDimensionRequest 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.admin.v1beta.ArchiveCustomDimensionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ArchiveCustomDimensionRequest 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.admin.v1beta.ArchiveCustomDimensionRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ArchiveCustomDimensionRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.ArchiveCustomDimensionRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ArchiveCustomDimensionRequest 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.admin.v1beta.ArchiveCustomDimensionRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ArchiveCustomDimensionRequest 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.admin.v1beta.ArchiveCustomDimensionRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ArchiveCustomDimensionRequest 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.admin.v1beta.ArchiveCustomDimensionRequest 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; + } + /** + * + * + *
+   * Request message for ArchiveCustomDimension RPC.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.ArchiveCustomDimensionRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.ArchiveCustomDimensionRequest) + com.google.analytics.admin.v1beta.ArchiveCustomDimensionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ArchiveCustomDimensionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ArchiveCustomDimensionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.ArchiveCustomDimensionRequest.class, + com.google.analytics.admin.v1beta.ArchiveCustomDimensionRequest.Builder.class); + } + + // Construct using com.google.analytics.admin.v1beta.ArchiveCustomDimensionRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ArchiveCustomDimensionRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ArchiveCustomDimensionRequest + getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.ArchiveCustomDimensionRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ArchiveCustomDimensionRequest build() { + com.google.analytics.admin.v1beta.ArchiveCustomDimensionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ArchiveCustomDimensionRequest buildPartial() { + com.google.analytics.admin.v1beta.ArchiveCustomDimensionRequest result = + new com.google.analytics.admin.v1beta.ArchiveCustomDimensionRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @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.admin.v1beta.ArchiveCustomDimensionRequest) { + return mergeFrom((com.google.analytics.admin.v1beta.ArchiveCustomDimensionRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.analytics.admin.v1beta.ArchiveCustomDimensionRequest other) { + if (other + == com.google.analytics.admin.v1beta.ArchiveCustomDimensionRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.ArchiveCustomDimensionRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.ArchiveCustomDimensionRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the CustomDimension to archive.
+     * Example format: properties/1234/customDimensions/5678
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the CustomDimension to archive.
+     * Example format: properties/1234/customDimensions/5678
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the CustomDimension to archive.
+     * Example format: properties/1234/customDimensions/5678
+     * 
+ * + * + * 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; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the CustomDimension to archive.
+     * Example format: properties/1234/customDimensions/5678
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the CustomDimension to archive.
+     * Example format: properties/1234/customDimensions/5678
+     * 
+ * + * + * 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; + 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.admin.v1beta.ArchiveCustomDimensionRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.ArchiveCustomDimensionRequest) + private static final com.google.analytics.admin.v1beta.ArchiveCustomDimensionRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.ArchiveCustomDimensionRequest(); + } + + public static com.google.analytics.admin.v1beta.ArchiveCustomDimensionRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ArchiveCustomDimensionRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ArchiveCustomDimensionRequest(input, extensionRegistry); + } + }; + + 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.admin.v1beta.ArchiveCustomDimensionRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ArchiveCustomDimensionRequestOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ArchiveCustomDimensionRequestOrBuilder.java new file mode 100644 index 000000000000..e8f8c4bb6f5e --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ArchiveCustomDimensionRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +public interface ArchiveCustomDimensionRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.ArchiveCustomDimensionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the CustomDimension to archive.
+   * Example format: properties/1234/customDimensions/5678
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the CustomDimension to archive.
+   * Example format: properties/1234/customDimensions/5678
+   * 
+ * + * + * 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-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ArchiveCustomMetricRequest.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ArchiveCustomMetricRequest.java new file mode 100644 index 000000000000..3ba4d8a6e531 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ArchiveCustomMetricRequest.java @@ -0,0 +1,663 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * Request message for ArchiveCustomMetric RPC.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.ArchiveCustomMetricRequest} + */ +public final class ArchiveCustomMetricRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.ArchiveCustomMetricRequest) + ArchiveCustomMetricRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ArchiveCustomMetricRequest.newBuilder() to construct. + private ArchiveCustomMetricRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ArchiveCustomMetricRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ArchiveCustomMetricRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ArchiveCustomMetricRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ArchiveCustomMetricRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ArchiveCustomMetricRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.ArchiveCustomMetricRequest.class, + com.google.analytics.admin.v1beta.ArchiveCustomMetricRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the CustomMetric to archive.
+   * Example format: properties/1234/customMetrics/5678
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the CustomMetric to archive.
+   * Example format: properties/1234/customMetrics/5678
+   * 
+ * + * + * 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_); + } + unknownFields.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 += unknownFields.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.admin.v1beta.ArchiveCustomMetricRequest)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.ArchiveCustomMetricRequest other = + (com.google.analytics.admin.v1beta.ArchiveCustomMetricRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.ArchiveCustomMetricRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ArchiveCustomMetricRequest 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.admin.v1beta.ArchiveCustomMetricRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ArchiveCustomMetricRequest 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.admin.v1beta.ArchiveCustomMetricRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ArchiveCustomMetricRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.ArchiveCustomMetricRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ArchiveCustomMetricRequest 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.admin.v1beta.ArchiveCustomMetricRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ArchiveCustomMetricRequest 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.admin.v1beta.ArchiveCustomMetricRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ArchiveCustomMetricRequest 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.admin.v1beta.ArchiveCustomMetricRequest 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; + } + /** + * + * + *
+   * Request message for ArchiveCustomMetric RPC.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.ArchiveCustomMetricRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.ArchiveCustomMetricRequest) + com.google.analytics.admin.v1beta.ArchiveCustomMetricRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ArchiveCustomMetricRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ArchiveCustomMetricRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.ArchiveCustomMetricRequest.class, + com.google.analytics.admin.v1beta.ArchiveCustomMetricRequest.Builder.class); + } + + // Construct using com.google.analytics.admin.v1beta.ArchiveCustomMetricRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ArchiveCustomMetricRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ArchiveCustomMetricRequest + getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.ArchiveCustomMetricRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ArchiveCustomMetricRequest build() { + com.google.analytics.admin.v1beta.ArchiveCustomMetricRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ArchiveCustomMetricRequest buildPartial() { + com.google.analytics.admin.v1beta.ArchiveCustomMetricRequest result = + new com.google.analytics.admin.v1beta.ArchiveCustomMetricRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @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.admin.v1beta.ArchiveCustomMetricRequest) { + return mergeFrom((com.google.analytics.admin.v1beta.ArchiveCustomMetricRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1beta.ArchiveCustomMetricRequest other) { + if (other + == com.google.analytics.admin.v1beta.ArchiveCustomMetricRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.ArchiveCustomMetricRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.ArchiveCustomMetricRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the CustomMetric to archive.
+     * Example format: properties/1234/customMetrics/5678
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the CustomMetric to archive.
+     * Example format: properties/1234/customMetrics/5678
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the CustomMetric to archive.
+     * Example format: properties/1234/customMetrics/5678
+     * 
+ * + * + * 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; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the CustomMetric to archive.
+     * Example format: properties/1234/customMetrics/5678
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the CustomMetric to archive.
+     * Example format: properties/1234/customMetrics/5678
+     * 
+ * + * + * 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; + 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.admin.v1beta.ArchiveCustomMetricRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.ArchiveCustomMetricRequest) + private static final com.google.analytics.admin.v1beta.ArchiveCustomMetricRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.ArchiveCustomMetricRequest(); + } + + public static com.google.analytics.admin.v1beta.ArchiveCustomMetricRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ArchiveCustomMetricRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ArchiveCustomMetricRequest(input, extensionRegistry); + } + }; + + 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.admin.v1beta.ArchiveCustomMetricRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ArchiveCustomMetricRequestOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ArchiveCustomMetricRequestOrBuilder.java new file mode 100644 index 000000000000..1a2428dc456e --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ArchiveCustomMetricRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +public interface ArchiveCustomMetricRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.ArchiveCustomMetricRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the CustomMetric to archive.
+   * Example format: properties/1234/customMetrics/5678
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the CustomMetric to archive.
+   * Example format: properties/1234/customMetrics/5678
+   * 
+ * + * + * 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-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ChangeHistoryChange.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ChangeHistoryChange.java new file mode 100644 index 000000000000..1cbd9e0d2eea --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ChangeHistoryChange.java @@ -0,0 +1,4831 @@ +/* + * Copyright 2020 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/admin/v1beta/resources.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * A description of a change to a single Google Analytics resource.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.ChangeHistoryChange} + */ +public final class ChangeHistoryChange extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.ChangeHistoryChange) + ChangeHistoryChangeOrBuilder { + private static final long serialVersionUID = 0L; + // Use ChangeHistoryChange.newBuilder() to construct. + private ChangeHistoryChange(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ChangeHistoryChange() { + resource_ = ""; + action_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ChangeHistoryChange(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ChangeHistoryChange( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + resource_ = s; + break; + } + case 16: + { + int rawValue = input.readEnum(); + + action_ = rawValue; + break; + } + case 26: + { + com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource.Builder + subBuilder = null; + if (resourceBeforeChange_ != null) { + subBuilder = resourceBeforeChange_.toBuilder(); + } + resourceBeforeChange_ = + input.readMessage( + com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(resourceBeforeChange_); + resourceBeforeChange_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource.Builder + subBuilder = null; + if (resourceAfterChange_ != null) { + subBuilder = resourceAfterChange_.toBuilder(); + } + resourceAfterChange_ = + input.readMessage( + com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(resourceAfterChange_); + resourceAfterChange_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_ChangeHistoryChange_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_ChangeHistoryChange_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.ChangeHistoryChange.class, + com.google.analytics.admin.v1beta.ChangeHistoryChange.Builder.class); + } + + public interface ChangeHistoryResourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * A snapshot of an Account resource in change history.
+     * 
+ * + * .google.analytics.admin.v1beta.Account account = 1; + * + * @return Whether the account field is set. + */ + boolean hasAccount(); + /** + * + * + *
+     * A snapshot of an Account resource in change history.
+     * 
+ * + * .google.analytics.admin.v1beta.Account account = 1; + * + * @return The account. + */ + com.google.analytics.admin.v1beta.Account getAccount(); + /** + * + * + *
+     * A snapshot of an Account resource in change history.
+     * 
+ * + * .google.analytics.admin.v1beta.Account account = 1; + */ + com.google.analytics.admin.v1beta.AccountOrBuilder getAccountOrBuilder(); + + /** + * + * + *
+     * A snapshot of a Property resource in change history.
+     * 
+ * + * .google.analytics.admin.v1beta.Property property = 2; + * + * @return Whether the property field is set. + */ + boolean hasProperty(); + /** + * + * + *
+     * A snapshot of a Property resource in change history.
+     * 
+ * + * .google.analytics.admin.v1beta.Property property = 2; + * + * @return The property. + */ + com.google.analytics.admin.v1beta.Property getProperty(); + /** + * + * + *
+     * A snapshot of a Property resource in change history.
+     * 
+ * + * .google.analytics.admin.v1beta.Property property = 2; + */ + com.google.analytics.admin.v1beta.PropertyOrBuilder getPropertyOrBuilder(); + + /** + * + * + *
+     * A snapshot of a FirebaseLink resource in change history.
+     * 
+ * + * .google.analytics.admin.v1beta.FirebaseLink firebase_link = 6; + * + * @return Whether the firebaseLink field is set. + */ + boolean hasFirebaseLink(); + /** + * + * + *
+     * A snapshot of a FirebaseLink resource in change history.
+     * 
+ * + * .google.analytics.admin.v1beta.FirebaseLink firebase_link = 6; + * + * @return The firebaseLink. + */ + com.google.analytics.admin.v1beta.FirebaseLink getFirebaseLink(); + /** + * + * + *
+     * A snapshot of a FirebaseLink resource in change history.
+     * 
+ * + * .google.analytics.admin.v1beta.FirebaseLink firebase_link = 6; + */ + com.google.analytics.admin.v1beta.FirebaseLinkOrBuilder getFirebaseLinkOrBuilder(); + + /** + * + * + *
+     * A snapshot of a GoogleAdsLink resource in change history.
+     * 
+ * + * .google.analytics.admin.v1beta.GoogleAdsLink google_ads_link = 7; + * + * @return Whether the googleAdsLink field is set. + */ + boolean hasGoogleAdsLink(); + /** + * + * + *
+     * A snapshot of a GoogleAdsLink resource in change history.
+     * 
+ * + * .google.analytics.admin.v1beta.GoogleAdsLink google_ads_link = 7; + * + * @return The googleAdsLink. + */ + com.google.analytics.admin.v1beta.GoogleAdsLink getGoogleAdsLink(); + /** + * + * + *
+     * A snapshot of a GoogleAdsLink resource in change history.
+     * 
+ * + * .google.analytics.admin.v1beta.GoogleAdsLink google_ads_link = 7; + */ + com.google.analytics.admin.v1beta.GoogleAdsLinkOrBuilder getGoogleAdsLinkOrBuilder(); + + /** + * + * + *
+     * A snapshot of a ConversionEvent resource in change history.
+     * 
+ * + * .google.analytics.admin.v1beta.ConversionEvent conversion_event = 11; + * + * @return Whether the conversionEvent field is set. + */ + boolean hasConversionEvent(); + /** + * + * + *
+     * A snapshot of a ConversionEvent resource in change history.
+     * 
+ * + * .google.analytics.admin.v1beta.ConversionEvent conversion_event = 11; + * + * @return The conversionEvent. + */ + com.google.analytics.admin.v1beta.ConversionEvent getConversionEvent(); + /** + * + * + *
+     * A snapshot of a ConversionEvent resource in change history.
+     * 
+ * + * .google.analytics.admin.v1beta.ConversionEvent conversion_event = 11; + */ + com.google.analytics.admin.v1beta.ConversionEventOrBuilder getConversionEventOrBuilder(); + + /** + * + * + *
+     * A snapshot of a MeasurementProtocolSecret resource in change history.
+     * 
+ * + * + * .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secret = 12; + * + * + * @return Whether the measurementProtocolSecret field is set. + */ + boolean hasMeasurementProtocolSecret(); + /** + * + * + *
+     * A snapshot of a MeasurementProtocolSecret resource in change history.
+     * 
+ * + * + * .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secret = 12; + * + * + * @return The measurementProtocolSecret. + */ + com.google.analytics.admin.v1beta.MeasurementProtocolSecret getMeasurementProtocolSecret(); + /** + * + * + *
+     * A snapshot of a MeasurementProtocolSecret resource in change history.
+     * 
+ * + * + * .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secret = 12; + * + */ + com.google.analytics.admin.v1beta.MeasurementProtocolSecretOrBuilder + getMeasurementProtocolSecretOrBuilder(); + + /** + * + * + *
+     * A snapshot of a data retention settings resource in change history.
+     * 
+ * + * .google.analytics.admin.v1beta.DataRetentionSettings data_retention_settings = 15; + * + * + * @return Whether the dataRetentionSettings field is set. + */ + boolean hasDataRetentionSettings(); + /** + * + * + *
+     * A snapshot of a data retention settings resource in change history.
+     * 
+ * + * .google.analytics.admin.v1beta.DataRetentionSettings data_retention_settings = 15; + * + * + * @return The dataRetentionSettings. + */ + com.google.analytics.admin.v1beta.DataRetentionSettings getDataRetentionSettings(); + /** + * + * + *
+     * A snapshot of a data retention settings resource in change history.
+     * 
+ * + * .google.analytics.admin.v1beta.DataRetentionSettings data_retention_settings = 15; + * + */ + com.google.analytics.admin.v1beta.DataRetentionSettingsOrBuilder + getDataRetentionSettingsOrBuilder(); + + /** + * + * + *
+     * A snapshot of a DataStream resource in change history.
+     * 
+ * + * .google.analytics.admin.v1beta.DataStream data_stream = 18; + * + * @return Whether the dataStream field is set. + */ + boolean hasDataStream(); + /** + * + * + *
+     * A snapshot of a DataStream resource in change history.
+     * 
+ * + * .google.analytics.admin.v1beta.DataStream data_stream = 18; + * + * @return The dataStream. + */ + com.google.analytics.admin.v1beta.DataStream getDataStream(); + /** + * + * + *
+     * A snapshot of a DataStream resource in change history.
+     * 
+ * + * .google.analytics.admin.v1beta.DataStream data_stream = 18; + */ + com.google.analytics.admin.v1beta.DataStreamOrBuilder getDataStreamOrBuilder(); + + public com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource.ResourceCase + getResourceCase(); + } + /** + * + * + *
+   * A snapshot of a resource as before or after the result of a change in
+   * change history.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource} + */ + public static final class ChangeHistoryResource extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource) + ChangeHistoryResourceOrBuilder { + private static final long serialVersionUID = 0L; + // Use ChangeHistoryResource.newBuilder() to construct. + private ChangeHistoryResource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ChangeHistoryResource() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ChangeHistoryResource(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ChangeHistoryResource( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.analytics.admin.v1beta.Account.Builder subBuilder = null; + if (resourceCase_ == 1) { + subBuilder = ((com.google.analytics.admin.v1beta.Account) resource_).toBuilder(); + } + resource_ = + input.readMessage( + com.google.analytics.admin.v1beta.Account.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.analytics.admin.v1beta.Account) resource_); + resource_ = subBuilder.buildPartial(); + } + resourceCase_ = 1; + break; + } + case 18: + { + com.google.analytics.admin.v1beta.Property.Builder subBuilder = null; + if (resourceCase_ == 2) { + subBuilder = ((com.google.analytics.admin.v1beta.Property) resource_).toBuilder(); + } + resource_ = + input.readMessage( + com.google.analytics.admin.v1beta.Property.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.analytics.admin.v1beta.Property) resource_); + resource_ = subBuilder.buildPartial(); + } + resourceCase_ = 2; + break; + } + case 50: + { + com.google.analytics.admin.v1beta.FirebaseLink.Builder subBuilder = null; + if (resourceCase_ == 6) { + subBuilder = + ((com.google.analytics.admin.v1beta.FirebaseLink) resource_).toBuilder(); + } + resource_ = + input.readMessage( + com.google.analytics.admin.v1beta.FirebaseLink.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.analytics.admin.v1beta.FirebaseLink) resource_); + resource_ = subBuilder.buildPartial(); + } + resourceCase_ = 6; + break; + } + case 58: + { + com.google.analytics.admin.v1beta.GoogleAdsLink.Builder subBuilder = null; + if (resourceCase_ == 7) { + subBuilder = + ((com.google.analytics.admin.v1beta.GoogleAdsLink) resource_).toBuilder(); + } + resource_ = + input.readMessage( + com.google.analytics.admin.v1beta.GoogleAdsLink.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.analytics.admin.v1beta.GoogleAdsLink) resource_); + resource_ = subBuilder.buildPartial(); + } + resourceCase_ = 7; + break; + } + case 90: + { + com.google.analytics.admin.v1beta.ConversionEvent.Builder subBuilder = null; + if (resourceCase_ == 11) { + subBuilder = + ((com.google.analytics.admin.v1beta.ConversionEvent) resource_).toBuilder(); + } + resource_ = + input.readMessage( + com.google.analytics.admin.v1beta.ConversionEvent.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.analytics.admin.v1beta.ConversionEvent) resource_); + resource_ = subBuilder.buildPartial(); + } + resourceCase_ = 11; + break; + } + case 98: + { + com.google.analytics.admin.v1beta.MeasurementProtocolSecret.Builder subBuilder = + null; + if (resourceCase_ == 12) { + subBuilder = + ((com.google.analytics.admin.v1beta.MeasurementProtocolSecret) resource_) + .toBuilder(); + } + resource_ = + input.readMessage( + com.google.analytics.admin.v1beta.MeasurementProtocolSecret.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.analytics.admin.v1beta.MeasurementProtocolSecret) resource_); + resource_ = subBuilder.buildPartial(); + } + resourceCase_ = 12; + break; + } + case 122: + { + com.google.analytics.admin.v1beta.DataRetentionSettings.Builder subBuilder = null; + if (resourceCase_ == 15) { + subBuilder = + ((com.google.analytics.admin.v1beta.DataRetentionSettings) resource_) + .toBuilder(); + } + resource_ = + input.readMessage( + com.google.analytics.admin.v1beta.DataRetentionSettings.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.analytics.admin.v1beta.DataRetentionSettings) resource_); + resource_ = subBuilder.buildPartial(); + } + resourceCase_ = 15; + break; + } + case 146: + { + com.google.analytics.admin.v1beta.DataStream.Builder subBuilder = null; + if (resourceCase_ == 18) { + subBuilder = + ((com.google.analytics.admin.v1beta.DataStream) resource_).toBuilder(); + } + resource_ = + input.readMessage( + com.google.analytics.admin.v1beta.DataStream.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.analytics.admin.v1beta.DataStream) resource_); + resource_ = subBuilder.buildPartial(); + } + resourceCase_ = 18; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_ChangeHistoryChange_ChangeHistoryResource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_ChangeHistoryChange_ChangeHistoryResource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource.class, + com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource.Builder + .class); + } + + private int resourceCase_ = 0; + private java.lang.Object resource_; + + public enum ResourceCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + ACCOUNT(1), + PROPERTY(2), + FIREBASE_LINK(6), + GOOGLE_ADS_LINK(7), + CONVERSION_EVENT(11), + MEASUREMENT_PROTOCOL_SECRET(12), + DATA_RETENTION_SETTINGS(15), + DATA_STREAM(18), + RESOURCE_NOT_SET(0); + private final int value; + + private ResourceCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ResourceCase valueOf(int value) { + return forNumber(value); + } + + public static ResourceCase forNumber(int value) { + switch (value) { + case 1: + return ACCOUNT; + case 2: + return PROPERTY; + case 6: + return FIREBASE_LINK; + case 7: + return GOOGLE_ADS_LINK; + case 11: + return CONVERSION_EVENT; + case 12: + return MEASUREMENT_PROTOCOL_SECRET; + case 15: + return DATA_RETENTION_SETTINGS; + case 18: + return DATA_STREAM; + case 0: + return RESOURCE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ResourceCase getResourceCase() { + return ResourceCase.forNumber(resourceCase_); + } + + public static final int ACCOUNT_FIELD_NUMBER = 1; + /** + * + * + *
+     * A snapshot of an Account resource in change history.
+     * 
+ * + * .google.analytics.admin.v1beta.Account account = 1; + * + * @return Whether the account field is set. + */ + @java.lang.Override + public boolean hasAccount() { + return resourceCase_ == 1; + } + /** + * + * + *
+     * A snapshot of an Account resource in change history.
+     * 
+ * + * .google.analytics.admin.v1beta.Account account = 1; + * + * @return The account. + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.Account getAccount() { + if (resourceCase_ == 1) { + return (com.google.analytics.admin.v1beta.Account) resource_; + } + return com.google.analytics.admin.v1beta.Account.getDefaultInstance(); + } + /** + * + * + *
+     * A snapshot of an Account resource in change history.
+     * 
+ * + * .google.analytics.admin.v1beta.Account account = 1; + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.AccountOrBuilder getAccountOrBuilder() { + if (resourceCase_ == 1) { + return (com.google.analytics.admin.v1beta.Account) resource_; + } + return com.google.analytics.admin.v1beta.Account.getDefaultInstance(); + } + + public static final int PROPERTY_FIELD_NUMBER = 2; + /** + * + * + *
+     * A snapshot of a Property resource in change history.
+     * 
+ * + * .google.analytics.admin.v1beta.Property property = 2; + * + * @return Whether the property field is set. + */ + @java.lang.Override + public boolean hasProperty() { + return resourceCase_ == 2; + } + /** + * + * + *
+     * A snapshot of a Property resource in change history.
+     * 
+ * + * .google.analytics.admin.v1beta.Property property = 2; + * + * @return The property. + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.Property getProperty() { + if (resourceCase_ == 2) { + return (com.google.analytics.admin.v1beta.Property) resource_; + } + return com.google.analytics.admin.v1beta.Property.getDefaultInstance(); + } + /** + * + * + *
+     * A snapshot of a Property resource in change history.
+     * 
+ * + * .google.analytics.admin.v1beta.Property property = 2; + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.PropertyOrBuilder getPropertyOrBuilder() { + if (resourceCase_ == 2) { + return (com.google.analytics.admin.v1beta.Property) resource_; + } + return com.google.analytics.admin.v1beta.Property.getDefaultInstance(); + } + + public static final int FIREBASE_LINK_FIELD_NUMBER = 6; + /** + * + * + *
+     * A snapshot of a FirebaseLink resource in change history.
+     * 
+ * + * .google.analytics.admin.v1beta.FirebaseLink firebase_link = 6; + * + * @return Whether the firebaseLink field is set. + */ + @java.lang.Override + public boolean hasFirebaseLink() { + return resourceCase_ == 6; + } + /** + * + * + *
+     * A snapshot of a FirebaseLink resource in change history.
+     * 
+ * + * .google.analytics.admin.v1beta.FirebaseLink firebase_link = 6; + * + * @return The firebaseLink. + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.FirebaseLink getFirebaseLink() { + if (resourceCase_ == 6) { + return (com.google.analytics.admin.v1beta.FirebaseLink) resource_; + } + return com.google.analytics.admin.v1beta.FirebaseLink.getDefaultInstance(); + } + /** + * + * + *
+     * A snapshot of a FirebaseLink resource in change history.
+     * 
+ * + * .google.analytics.admin.v1beta.FirebaseLink firebase_link = 6; + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.FirebaseLinkOrBuilder getFirebaseLinkOrBuilder() { + if (resourceCase_ == 6) { + return (com.google.analytics.admin.v1beta.FirebaseLink) resource_; + } + return com.google.analytics.admin.v1beta.FirebaseLink.getDefaultInstance(); + } + + public static final int GOOGLE_ADS_LINK_FIELD_NUMBER = 7; + /** + * + * + *
+     * A snapshot of a GoogleAdsLink resource in change history.
+     * 
+ * + * .google.analytics.admin.v1beta.GoogleAdsLink google_ads_link = 7; + * + * @return Whether the googleAdsLink field is set. + */ + @java.lang.Override + public boolean hasGoogleAdsLink() { + return resourceCase_ == 7; + } + /** + * + * + *
+     * A snapshot of a GoogleAdsLink resource in change history.
+     * 
+ * + * .google.analytics.admin.v1beta.GoogleAdsLink google_ads_link = 7; + * + * @return The googleAdsLink. + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.GoogleAdsLink getGoogleAdsLink() { + if (resourceCase_ == 7) { + return (com.google.analytics.admin.v1beta.GoogleAdsLink) resource_; + } + return com.google.analytics.admin.v1beta.GoogleAdsLink.getDefaultInstance(); + } + /** + * + * + *
+     * A snapshot of a GoogleAdsLink resource in change history.
+     * 
+ * + * .google.analytics.admin.v1beta.GoogleAdsLink google_ads_link = 7; + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.GoogleAdsLinkOrBuilder getGoogleAdsLinkOrBuilder() { + if (resourceCase_ == 7) { + return (com.google.analytics.admin.v1beta.GoogleAdsLink) resource_; + } + return com.google.analytics.admin.v1beta.GoogleAdsLink.getDefaultInstance(); + } + + public static final int CONVERSION_EVENT_FIELD_NUMBER = 11; + /** + * + * + *
+     * A snapshot of a ConversionEvent resource in change history.
+     * 
+ * + * .google.analytics.admin.v1beta.ConversionEvent conversion_event = 11; + * + * @return Whether the conversionEvent field is set. + */ + @java.lang.Override + public boolean hasConversionEvent() { + return resourceCase_ == 11; + } + /** + * + * + *
+     * A snapshot of a ConversionEvent resource in change history.
+     * 
+ * + * .google.analytics.admin.v1beta.ConversionEvent conversion_event = 11; + * + * @return The conversionEvent. + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.ConversionEvent getConversionEvent() { + if (resourceCase_ == 11) { + return (com.google.analytics.admin.v1beta.ConversionEvent) resource_; + } + return com.google.analytics.admin.v1beta.ConversionEvent.getDefaultInstance(); + } + /** + * + * + *
+     * A snapshot of a ConversionEvent resource in change history.
+     * 
+ * + * .google.analytics.admin.v1beta.ConversionEvent conversion_event = 11; + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.ConversionEventOrBuilder + getConversionEventOrBuilder() { + if (resourceCase_ == 11) { + return (com.google.analytics.admin.v1beta.ConversionEvent) resource_; + } + return com.google.analytics.admin.v1beta.ConversionEvent.getDefaultInstance(); + } + + public static final int MEASUREMENT_PROTOCOL_SECRET_FIELD_NUMBER = 12; + /** + * + * + *
+     * A snapshot of a MeasurementProtocolSecret resource in change history.
+     * 
+ * + * + * .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secret = 12; + * + * + * @return Whether the measurementProtocolSecret field is set. + */ + @java.lang.Override + public boolean hasMeasurementProtocolSecret() { + return resourceCase_ == 12; + } + /** + * + * + *
+     * A snapshot of a MeasurementProtocolSecret resource in change history.
+     * 
+ * + * + * .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secret = 12; + * + * + * @return The measurementProtocolSecret. + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.MeasurementProtocolSecret + getMeasurementProtocolSecret() { + if (resourceCase_ == 12) { + return (com.google.analytics.admin.v1beta.MeasurementProtocolSecret) resource_; + } + return com.google.analytics.admin.v1beta.MeasurementProtocolSecret.getDefaultInstance(); + } + /** + * + * + *
+     * A snapshot of a MeasurementProtocolSecret resource in change history.
+     * 
+ * + * + * .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secret = 12; + * + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.MeasurementProtocolSecretOrBuilder + getMeasurementProtocolSecretOrBuilder() { + if (resourceCase_ == 12) { + return (com.google.analytics.admin.v1beta.MeasurementProtocolSecret) resource_; + } + return com.google.analytics.admin.v1beta.MeasurementProtocolSecret.getDefaultInstance(); + } + + public static final int DATA_RETENTION_SETTINGS_FIELD_NUMBER = 15; + /** + * + * + *
+     * A snapshot of a data retention settings resource in change history.
+     * 
+ * + * .google.analytics.admin.v1beta.DataRetentionSettings data_retention_settings = 15; + * + * + * @return Whether the dataRetentionSettings field is set. + */ + @java.lang.Override + public boolean hasDataRetentionSettings() { + return resourceCase_ == 15; + } + /** + * + * + *
+     * A snapshot of a data retention settings resource in change history.
+     * 
+ * + * .google.analytics.admin.v1beta.DataRetentionSettings data_retention_settings = 15; + * + * + * @return The dataRetentionSettings. + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.DataRetentionSettings getDataRetentionSettings() { + if (resourceCase_ == 15) { + return (com.google.analytics.admin.v1beta.DataRetentionSettings) resource_; + } + return com.google.analytics.admin.v1beta.DataRetentionSettings.getDefaultInstance(); + } + /** + * + * + *
+     * A snapshot of a data retention settings resource in change history.
+     * 
+ * + * .google.analytics.admin.v1beta.DataRetentionSettings data_retention_settings = 15; + * + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.DataRetentionSettingsOrBuilder + getDataRetentionSettingsOrBuilder() { + if (resourceCase_ == 15) { + return (com.google.analytics.admin.v1beta.DataRetentionSettings) resource_; + } + return com.google.analytics.admin.v1beta.DataRetentionSettings.getDefaultInstance(); + } + + public static final int DATA_STREAM_FIELD_NUMBER = 18; + /** + * + * + *
+     * A snapshot of a DataStream resource in change history.
+     * 
+ * + * .google.analytics.admin.v1beta.DataStream data_stream = 18; + * + * @return Whether the dataStream field is set. + */ + @java.lang.Override + public boolean hasDataStream() { + return resourceCase_ == 18; + } + /** + * + * + *
+     * A snapshot of a DataStream resource in change history.
+     * 
+ * + * .google.analytics.admin.v1beta.DataStream data_stream = 18; + * + * @return The dataStream. + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.DataStream getDataStream() { + if (resourceCase_ == 18) { + return (com.google.analytics.admin.v1beta.DataStream) resource_; + } + return com.google.analytics.admin.v1beta.DataStream.getDefaultInstance(); + } + /** + * + * + *
+     * A snapshot of a DataStream resource in change history.
+     * 
+ * + * .google.analytics.admin.v1beta.DataStream data_stream = 18; + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.DataStreamOrBuilder getDataStreamOrBuilder() { + if (resourceCase_ == 18) { + return (com.google.analytics.admin.v1beta.DataStream) resource_; + } + return com.google.analytics.admin.v1beta.DataStream.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (resourceCase_ == 1) { + output.writeMessage(1, (com.google.analytics.admin.v1beta.Account) resource_); + } + if (resourceCase_ == 2) { + output.writeMessage(2, (com.google.analytics.admin.v1beta.Property) resource_); + } + if (resourceCase_ == 6) { + output.writeMessage(6, (com.google.analytics.admin.v1beta.FirebaseLink) resource_); + } + if (resourceCase_ == 7) { + output.writeMessage(7, (com.google.analytics.admin.v1beta.GoogleAdsLink) resource_); + } + if (resourceCase_ == 11) { + output.writeMessage(11, (com.google.analytics.admin.v1beta.ConversionEvent) resource_); + } + if (resourceCase_ == 12) { + output.writeMessage( + 12, (com.google.analytics.admin.v1beta.MeasurementProtocolSecret) resource_); + } + if (resourceCase_ == 15) { + output.writeMessage( + 15, (com.google.analytics.admin.v1beta.DataRetentionSettings) resource_); + } + if (resourceCase_ == 18) { + output.writeMessage(18, (com.google.analytics.admin.v1beta.DataStream) resource_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (resourceCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.analytics.admin.v1beta.Account) resource_); + } + if (resourceCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.analytics.admin.v1beta.Property) resource_); + } + if (resourceCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.analytics.admin.v1beta.FirebaseLink) resource_); + } + if (resourceCase_ == 7) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, (com.google.analytics.admin.v1beta.GoogleAdsLink) resource_); + } + if (resourceCase_ == 11) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 11, (com.google.analytics.admin.v1beta.ConversionEvent) resource_); + } + if (resourceCase_ == 12) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 12, (com.google.analytics.admin.v1beta.MeasurementProtocolSecret) resource_); + } + if (resourceCase_ == 15) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 15, (com.google.analytics.admin.v1beta.DataRetentionSettings) resource_); + } + if (resourceCase_ == 18) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 18, (com.google.analytics.admin.v1beta.DataStream) resource_); + } + size += unknownFields.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.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource other = + (com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource) obj; + + if (!getResourceCase().equals(other.getResourceCase())) return false; + switch (resourceCase_) { + case 1: + if (!getAccount().equals(other.getAccount())) return false; + break; + case 2: + if (!getProperty().equals(other.getProperty())) return false; + break; + case 6: + if (!getFirebaseLink().equals(other.getFirebaseLink())) return false; + break; + case 7: + if (!getGoogleAdsLink().equals(other.getGoogleAdsLink())) return false; + break; + case 11: + if (!getConversionEvent().equals(other.getConversionEvent())) return false; + break; + case 12: + if (!getMeasurementProtocolSecret().equals(other.getMeasurementProtocolSecret())) + return false; + break; + case 15: + if (!getDataRetentionSettings().equals(other.getDataRetentionSettings())) return false; + break; + case 18: + if (!getDataStream().equals(other.getDataStream())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (resourceCase_) { + case 1: + hash = (37 * hash) + ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getAccount().hashCode(); + break; + case 2: + hash = (37 * hash) + PROPERTY_FIELD_NUMBER; + hash = (53 * hash) + getProperty().hashCode(); + break; + case 6: + hash = (37 * hash) + FIREBASE_LINK_FIELD_NUMBER; + hash = (53 * hash) + getFirebaseLink().hashCode(); + break; + case 7: + hash = (37 * hash) + GOOGLE_ADS_LINK_FIELD_NUMBER; + hash = (53 * hash) + getGoogleAdsLink().hashCode(); + break; + case 11: + hash = (37 * hash) + CONVERSION_EVENT_FIELD_NUMBER; + hash = (53 * hash) + getConversionEvent().hashCode(); + break; + case 12: + hash = (37 * hash) + MEASUREMENT_PROTOCOL_SECRET_FIELD_NUMBER; + hash = (53 * hash) + getMeasurementProtocolSecret().hashCode(); + break; + case 15: + hash = (37 * hash) + DATA_RETENTION_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getDataRetentionSettings().hashCode(); + break; + case 18: + hash = (37 * hash) + DATA_STREAM_FIELD_NUMBER; + hash = (53 * hash) + getDataStream().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource + 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.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource + 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.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource + 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.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource + 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.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource + 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.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource 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 snapshot of a resource as before or after the result of a change in
+     * change history.
+     * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource) + com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_ChangeHistoryChange_ChangeHistoryResource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_ChangeHistoryChange_ChangeHistoryResource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource.class, + com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource.Builder + .class); + } + + // Construct using + // com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + resourceCase_ = 0; + resource_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_ChangeHistoryChange_ChangeHistoryResource_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource + getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource build() { + com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource + buildPartial() { + com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource result = + new com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource(this); + if (resourceCase_ == 1) { + if (accountBuilder_ == null) { + result.resource_ = resource_; + } else { + result.resource_ = accountBuilder_.build(); + } + } + if (resourceCase_ == 2) { + if (propertyBuilder_ == null) { + result.resource_ = resource_; + } else { + result.resource_ = propertyBuilder_.build(); + } + } + if (resourceCase_ == 6) { + if (firebaseLinkBuilder_ == null) { + result.resource_ = resource_; + } else { + result.resource_ = firebaseLinkBuilder_.build(); + } + } + if (resourceCase_ == 7) { + if (googleAdsLinkBuilder_ == null) { + result.resource_ = resource_; + } else { + result.resource_ = googleAdsLinkBuilder_.build(); + } + } + if (resourceCase_ == 11) { + if (conversionEventBuilder_ == null) { + result.resource_ = resource_; + } else { + result.resource_ = conversionEventBuilder_.build(); + } + } + if (resourceCase_ == 12) { + if (measurementProtocolSecretBuilder_ == null) { + result.resource_ = resource_; + } else { + result.resource_ = measurementProtocolSecretBuilder_.build(); + } + } + if (resourceCase_ == 15) { + if (dataRetentionSettingsBuilder_ == null) { + result.resource_ = resource_; + } else { + result.resource_ = dataRetentionSettingsBuilder_.build(); + } + } + if (resourceCase_ == 18) { + if (dataStreamBuilder_ == null) { + result.resource_ = resource_; + } else { + result.resource_ = dataStreamBuilder_.build(); + } + } + result.resourceCase_ = resourceCase_; + onBuilt(); + return result; + } + + @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.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource) { + return mergeFrom( + (com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource other) { + if (other + == com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource + .getDefaultInstance()) return this; + switch (other.getResourceCase()) { + case ACCOUNT: + { + mergeAccount(other.getAccount()); + break; + } + case PROPERTY: + { + mergeProperty(other.getProperty()); + break; + } + case FIREBASE_LINK: + { + mergeFirebaseLink(other.getFirebaseLink()); + break; + } + case GOOGLE_ADS_LINK: + { + mergeGoogleAdsLink(other.getGoogleAdsLink()); + break; + } + case CONVERSION_EVENT: + { + mergeConversionEvent(other.getConversionEvent()); + break; + } + case MEASUREMENT_PROTOCOL_SECRET: + { + mergeMeasurementProtocolSecret(other.getMeasurementProtocolSecret()); + break; + } + case DATA_RETENTION_SETTINGS: + { + mergeDataRetentionSettings(other.getDataRetentionSettings()); + break; + } + case DATA_STREAM: + { + mergeDataStream(other.getDataStream()); + break; + } + case RESOURCE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int resourceCase_ = 0; + private java.lang.Object resource_; + + public ResourceCase getResourceCase() { + return ResourceCase.forNumber(resourceCase_); + } + + public Builder clearResource() { + resourceCase_ = 0; + resource_ = null; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.Account, + com.google.analytics.admin.v1beta.Account.Builder, + com.google.analytics.admin.v1beta.AccountOrBuilder> + accountBuilder_; + /** + * + * + *
+       * A snapshot of an Account resource in change history.
+       * 
+ * + * .google.analytics.admin.v1beta.Account account = 1; + * + * @return Whether the account field is set. + */ + @java.lang.Override + public boolean hasAccount() { + return resourceCase_ == 1; + } + /** + * + * + *
+       * A snapshot of an Account resource in change history.
+       * 
+ * + * .google.analytics.admin.v1beta.Account account = 1; + * + * @return The account. + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.Account getAccount() { + if (accountBuilder_ == null) { + if (resourceCase_ == 1) { + return (com.google.analytics.admin.v1beta.Account) resource_; + } + return com.google.analytics.admin.v1beta.Account.getDefaultInstance(); + } else { + if (resourceCase_ == 1) { + return accountBuilder_.getMessage(); + } + return com.google.analytics.admin.v1beta.Account.getDefaultInstance(); + } + } + /** + * + * + *
+       * A snapshot of an Account resource in change history.
+       * 
+ * + * .google.analytics.admin.v1beta.Account account = 1; + */ + public Builder setAccount(com.google.analytics.admin.v1beta.Account value) { + if (accountBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resource_ = value; + onChanged(); + } else { + accountBuilder_.setMessage(value); + } + resourceCase_ = 1; + return this; + } + /** + * + * + *
+       * A snapshot of an Account resource in change history.
+       * 
+ * + * .google.analytics.admin.v1beta.Account account = 1; + */ + public Builder setAccount(com.google.analytics.admin.v1beta.Account.Builder builderForValue) { + if (accountBuilder_ == null) { + resource_ = builderForValue.build(); + onChanged(); + } else { + accountBuilder_.setMessage(builderForValue.build()); + } + resourceCase_ = 1; + return this; + } + /** + * + * + *
+       * A snapshot of an Account resource in change history.
+       * 
+ * + * .google.analytics.admin.v1beta.Account account = 1; + */ + public Builder mergeAccount(com.google.analytics.admin.v1beta.Account value) { + if (accountBuilder_ == null) { + if (resourceCase_ == 1 + && resource_ != com.google.analytics.admin.v1beta.Account.getDefaultInstance()) { + resource_ = + com.google.analytics.admin.v1beta.Account.newBuilder( + (com.google.analytics.admin.v1beta.Account) resource_) + .mergeFrom(value) + .buildPartial(); + } else { + resource_ = value; + } + onChanged(); + } else { + if (resourceCase_ == 1) { + accountBuilder_.mergeFrom(value); + } else { + accountBuilder_.setMessage(value); + } + } + resourceCase_ = 1; + return this; + } + /** + * + * + *
+       * A snapshot of an Account resource in change history.
+       * 
+ * + * .google.analytics.admin.v1beta.Account account = 1; + */ + public Builder clearAccount() { + if (accountBuilder_ == null) { + if (resourceCase_ == 1) { + resourceCase_ = 0; + resource_ = null; + onChanged(); + } + } else { + if (resourceCase_ == 1) { + resourceCase_ = 0; + resource_ = null; + } + accountBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * A snapshot of an Account resource in change history.
+       * 
+ * + * .google.analytics.admin.v1beta.Account account = 1; + */ + public com.google.analytics.admin.v1beta.Account.Builder getAccountBuilder() { + return getAccountFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * A snapshot of an Account resource in change history.
+       * 
+ * + * .google.analytics.admin.v1beta.Account account = 1; + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.AccountOrBuilder getAccountOrBuilder() { + if ((resourceCase_ == 1) && (accountBuilder_ != null)) { + return accountBuilder_.getMessageOrBuilder(); + } else { + if (resourceCase_ == 1) { + return (com.google.analytics.admin.v1beta.Account) resource_; + } + return com.google.analytics.admin.v1beta.Account.getDefaultInstance(); + } + } + /** + * + * + *
+       * A snapshot of an Account resource in change history.
+       * 
+ * + * .google.analytics.admin.v1beta.Account account = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.Account, + com.google.analytics.admin.v1beta.Account.Builder, + com.google.analytics.admin.v1beta.AccountOrBuilder> + getAccountFieldBuilder() { + if (accountBuilder_ == null) { + if (!(resourceCase_ == 1)) { + resource_ = com.google.analytics.admin.v1beta.Account.getDefaultInstance(); + } + accountBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.Account, + com.google.analytics.admin.v1beta.Account.Builder, + com.google.analytics.admin.v1beta.AccountOrBuilder>( + (com.google.analytics.admin.v1beta.Account) resource_, + getParentForChildren(), + isClean()); + resource_ = null; + } + resourceCase_ = 1; + onChanged(); + ; + return accountBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.Property, + com.google.analytics.admin.v1beta.Property.Builder, + com.google.analytics.admin.v1beta.PropertyOrBuilder> + propertyBuilder_; + /** + * + * + *
+       * A snapshot of a Property resource in change history.
+       * 
+ * + * .google.analytics.admin.v1beta.Property property = 2; + * + * @return Whether the property field is set. + */ + @java.lang.Override + public boolean hasProperty() { + return resourceCase_ == 2; + } + /** + * + * + *
+       * A snapshot of a Property resource in change history.
+       * 
+ * + * .google.analytics.admin.v1beta.Property property = 2; + * + * @return The property. + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.Property getProperty() { + if (propertyBuilder_ == null) { + if (resourceCase_ == 2) { + return (com.google.analytics.admin.v1beta.Property) resource_; + } + return com.google.analytics.admin.v1beta.Property.getDefaultInstance(); + } else { + if (resourceCase_ == 2) { + return propertyBuilder_.getMessage(); + } + return com.google.analytics.admin.v1beta.Property.getDefaultInstance(); + } + } + /** + * + * + *
+       * A snapshot of a Property resource in change history.
+       * 
+ * + * .google.analytics.admin.v1beta.Property property = 2; + */ + public Builder setProperty(com.google.analytics.admin.v1beta.Property value) { + if (propertyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resource_ = value; + onChanged(); + } else { + propertyBuilder_.setMessage(value); + } + resourceCase_ = 2; + return this; + } + /** + * + * + *
+       * A snapshot of a Property resource in change history.
+       * 
+ * + * .google.analytics.admin.v1beta.Property property = 2; + */ + public Builder setProperty( + com.google.analytics.admin.v1beta.Property.Builder builderForValue) { + if (propertyBuilder_ == null) { + resource_ = builderForValue.build(); + onChanged(); + } else { + propertyBuilder_.setMessage(builderForValue.build()); + } + resourceCase_ = 2; + return this; + } + /** + * + * + *
+       * A snapshot of a Property resource in change history.
+       * 
+ * + * .google.analytics.admin.v1beta.Property property = 2; + */ + public Builder mergeProperty(com.google.analytics.admin.v1beta.Property value) { + if (propertyBuilder_ == null) { + if (resourceCase_ == 2 + && resource_ != com.google.analytics.admin.v1beta.Property.getDefaultInstance()) { + resource_ = + com.google.analytics.admin.v1beta.Property.newBuilder( + (com.google.analytics.admin.v1beta.Property) resource_) + .mergeFrom(value) + .buildPartial(); + } else { + resource_ = value; + } + onChanged(); + } else { + if (resourceCase_ == 2) { + propertyBuilder_.mergeFrom(value); + } else { + propertyBuilder_.setMessage(value); + } + } + resourceCase_ = 2; + return this; + } + /** + * + * + *
+       * A snapshot of a Property resource in change history.
+       * 
+ * + * .google.analytics.admin.v1beta.Property property = 2; + */ + public Builder clearProperty() { + if (propertyBuilder_ == null) { + if (resourceCase_ == 2) { + resourceCase_ = 0; + resource_ = null; + onChanged(); + } + } else { + if (resourceCase_ == 2) { + resourceCase_ = 0; + resource_ = null; + } + propertyBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * A snapshot of a Property resource in change history.
+       * 
+ * + * .google.analytics.admin.v1beta.Property property = 2; + */ + public com.google.analytics.admin.v1beta.Property.Builder getPropertyBuilder() { + return getPropertyFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * A snapshot of a Property resource in change history.
+       * 
+ * + * .google.analytics.admin.v1beta.Property property = 2; + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.PropertyOrBuilder getPropertyOrBuilder() { + if ((resourceCase_ == 2) && (propertyBuilder_ != null)) { + return propertyBuilder_.getMessageOrBuilder(); + } else { + if (resourceCase_ == 2) { + return (com.google.analytics.admin.v1beta.Property) resource_; + } + return com.google.analytics.admin.v1beta.Property.getDefaultInstance(); + } + } + /** + * + * + *
+       * A snapshot of a Property resource in change history.
+       * 
+ * + * .google.analytics.admin.v1beta.Property property = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.Property, + com.google.analytics.admin.v1beta.Property.Builder, + com.google.analytics.admin.v1beta.PropertyOrBuilder> + getPropertyFieldBuilder() { + if (propertyBuilder_ == null) { + if (!(resourceCase_ == 2)) { + resource_ = com.google.analytics.admin.v1beta.Property.getDefaultInstance(); + } + propertyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.Property, + com.google.analytics.admin.v1beta.Property.Builder, + com.google.analytics.admin.v1beta.PropertyOrBuilder>( + (com.google.analytics.admin.v1beta.Property) resource_, + getParentForChildren(), + isClean()); + resource_ = null; + } + resourceCase_ = 2; + onChanged(); + ; + return propertyBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.FirebaseLink, + com.google.analytics.admin.v1beta.FirebaseLink.Builder, + com.google.analytics.admin.v1beta.FirebaseLinkOrBuilder> + firebaseLinkBuilder_; + /** + * + * + *
+       * A snapshot of a FirebaseLink resource in change history.
+       * 
+ * + * .google.analytics.admin.v1beta.FirebaseLink firebase_link = 6; + * + * @return Whether the firebaseLink field is set. + */ + @java.lang.Override + public boolean hasFirebaseLink() { + return resourceCase_ == 6; + } + /** + * + * + *
+       * A snapshot of a FirebaseLink resource in change history.
+       * 
+ * + * .google.analytics.admin.v1beta.FirebaseLink firebase_link = 6; + * + * @return The firebaseLink. + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.FirebaseLink getFirebaseLink() { + if (firebaseLinkBuilder_ == null) { + if (resourceCase_ == 6) { + return (com.google.analytics.admin.v1beta.FirebaseLink) resource_; + } + return com.google.analytics.admin.v1beta.FirebaseLink.getDefaultInstance(); + } else { + if (resourceCase_ == 6) { + return firebaseLinkBuilder_.getMessage(); + } + return com.google.analytics.admin.v1beta.FirebaseLink.getDefaultInstance(); + } + } + /** + * + * + *
+       * A snapshot of a FirebaseLink resource in change history.
+       * 
+ * + * .google.analytics.admin.v1beta.FirebaseLink firebase_link = 6; + */ + public Builder setFirebaseLink(com.google.analytics.admin.v1beta.FirebaseLink value) { + if (firebaseLinkBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resource_ = value; + onChanged(); + } else { + firebaseLinkBuilder_.setMessage(value); + } + resourceCase_ = 6; + return this; + } + /** + * + * + *
+       * A snapshot of a FirebaseLink resource in change history.
+       * 
+ * + * .google.analytics.admin.v1beta.FirebaseLink firebase_link = 6; + */ + public Builder setFirebaseLink( + com.google.analytics.admin.v1beta.FirebaseLink.Builder builderForValue) { + if (firebaseLinkBuilder_ == null) { + resource_ = builderForValue.build(); + onChanged(); + } else { + firebaseLinkBuilder_.setMessage(builderForValue.build()); + } + resourceCase_ = 6; + return this; + } + /** + * + * + *
+       * A snapshot of a FirebaseLink resource in change history.
+       * 
+ * + * .google.analytics.admin.v1beta.FirebaseLink firebase_link = 6; + */ + public Builder mergeFirebaseLink(com.google.analytics.admin.v1beta.FirebaseLink value) { + if (firebaseLinkBuilder_ == null) { + if (resourceCase_ == 6 + && resource_ != com.google.analytics.admin.v1beta.FirebaseLink.getDefaultInstance()) { + resource_ = + com.google.analytics.admin.v1beta.FirebaseLink.newBuilder( + (com.google.analytics.admin.v1beta.FirebaseLink) resource_) + .mergeFrom(value) + .buildPartial(); + } else { + resource_ = value; + } + onChanged(); + } else { + if (resourceCase_ == 6) { + firebaseLinkBuilder_.mergeFrom(value); + } else { + firebaseLinkBuilder_.setMessage(value); + } + } + resourceCase_ = 6; + return this; + } + /** + * + * + *
+       * A snapshot of a FirebaseLink resource in change history.
+       * 
+ * + * .google.analytics.admin.v1beta.FirebaseLink firebase_link = 6; + */ + public Builder clearFirebaseLink() { + if (firebaseLinkBuilder_ == null) { + if (resourceCase_ == 6) { + resourceCase_ = 0; + resource_ = null; + onChanged(); + } + } else { + if (resourceCase_ == 6) { + resourceCase_ = 0; + resource_ = null; + } + firebaseLinkBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * A snapshot of a FirebaseLink resource in change history.
+       * 
+ * + * .google.analytics.admin.v1beta.FirebaseLink firebase_link = 6; + */ + public com.google.analytics.admin.v1beta.FirebaseLink.Builder getFirebaseLinkBuilder() { + return getFirebaseLinkFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * A snapshot of a FirebaseLink resource in change history.
+       * 
+ * + * .google.analytics.admin.v1beta.FirebaseLink firebase_link = 6; + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.FirebaseLinkOrBuilder getFirebaseLinkOrBuilder() { + if ((resourceCase_ == 6) && (firebaseLinkBuilder_ != null)) { + return firebaseLinkBuilder_.getMessageOrBuilder(); + } else { + if (resourceCase_ == 6) { + return (com.google.analytics.admin.v1beta.FirebaseLink) resource_; + } + return com.google.analytics.admin.v1beta.FirebaseLink.getDefaultInstance(); + } + } + /** + * + * + *
+       * A snapshot of a FirebaseLink resource in change history.
+       * 
+ * + * .google.analytics.admin.v1beta.FirebaseLink firebase_link = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.FirebaseLink, + com.google.analytics.admin.v1beta.FirebaseLink.Builder, + com.google.analytics.admin.v1beta.FirebaseLinkOrBuilder> + getFirebaseLinkFieldBuilder() { + if (firebaseLinkBuilder_ == null) { + if (!(resourceCase_ == 6)) { + resource_ = com.google.analytics.admin.v1beta.FirebaseLink.getDefaultInstance(); + } + firebaseLinkBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.FirebaseLink, + com.google.analytics.admin.v1beta.FirebaseLink.Builder, + com.google.analytics.admin.v1beta.FirebaseLinkOrBuilder>( + (com.google.analytics.admin.v1beta.FirebaseLink) resource_, + getParentForChildren(), + isClean()); + resource_ = null; + } + resourceCase_ = 6; + onChanged(); + ; + return firebaseLinkBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.GoogleAdsLink, + com.google.analytics.admin.v1beta.GoogleAdsLink.Builder, + com.google.analytics.admin.v1beta.GoogleAdsLinkOrBuilder> + googleAdsLinkBuilder_; + /** + * + * + *
+       * A snapshot of a GoogleAdsLink resource in change history.
+       * 
+ * + * .google.analytics.admin.v1beta.GoogleAdsLink google_ads_link = 7; + * + * @return Whether the googleAdsLink field is set. + */ + @java.lang.Override + public boolean hasGoogleAdsLink() { + return resourceCase_ == 7; + } + /** + * + * + *
+       * A snapshot of a GoogleAdsLink resource in change history.
+       * 
+ * + * .google.analytics.admin.v1beta.GoogleAdsLink google_ads_link = 7; + * + * @return The googleAdsLink. + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.GoogleAdsLink getGoogleAdsLink() { + if (googleAdsLinkBuilder_ == null) { + if (resourceCase_ == 7) { + return (com.google.analytics.admin.v1beta.GoogleAdsLink) resource_; + } + return com.google.analytics.admin.v1beta.GoogleAdsLink.getDefaultInstance(); + } else { + if (resourceCase_ == 7) { + return googleAdsLinkBuilder_.getMessage(); + } + return com.google.analytics.admin.v1beta.GoogleAdsLink.getDefaultInstance(); + } + } + /** + * + * + *
+       * A snapshot of a GoogleAdsLink resource in change history.
+       * 
+ * + * .google.analytics.admin.v1beta.GoogleAdsLink google_ads_link = 7; + */ + public Builder setGoogleAdsLink(com.google.analytics.admin.v1beta.GoogleAdsLink value) { + if (googleAdsLinkBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resource_ = value; + onChanged(); + } else { + googleAdsLinkBuilder_.setMessage(value); + } + resourceCase_ = 7; + return this; + } + /** + * + * + *
+       * A snapshot of a GoogleAdsLink resource in change history.
+       * 
+ * + * .google.analytics.admin.v1beta.GoogleAdsLink google_ads_link = 7; + */ + public Builder setGoogleAdsLink( + com.google.analytics.admin.v1beta.GoogleAdsLink.Builder builderForValue) { + if (googleAdsLinkBuilder_ == null) { + resource_ = builderForValue.build(); + onChanged(); + } else { + googleAdsLinkBuilder_.setMessage(builderForValue.build()); + } + resourceCase_ = 7; + return this; + } + /** + * + * + *
+       * A snapshot of a GoogleAdsLink resource in change history.
+       * 
+ * + * .google.analytics.admin.v1beta.GoogleAdsLink google_ads_link = 7; + */ + public Builder mergeGoogleAdsLink(com.google.analytics.admin.v1beta.GoogleAdsLink value) { + if (googleAdsLinkBuilder_ == null) { + if (resourceCase_ == 7 + && resource_ + != com.google.analytics.admin.v1beta.GoogleAdsLink.getDefaultInstance()) { + resource_ = + com.google.analytics.admin.v1beta.GoogleAdsLink.newBuilder( + (com.google.analytics.admin.v1beta.GoogleAdsLink) resource_) + .mergeFrom(value) + .buildPartial(); + } else { + resource_ = value; + } + onChanged(); + } else { + if (resourceCase_ == 7) { + googleAdsLinkBuilder_.mergeFrom(value); + } else { + googleAdsLinkBuilder_.setMessage(value); + } + } + resourceCase_ = 7; + return this; + } + /** + * + * + *
+       * A snapshot of a GoogleAdsLink resource in change history.
+       * 
+ * + * .google.analytics.admin.v1beta.GoogleAdsLink google_ads_link = 7; + */ + public Builder clearGoogleAdsLink() { + if (googleAdsLinkBuilder_ == null) { + if (resourceCase_ == 7) { + resourceCase_ = 0; + resource_ = null; + onChanged(); + } + } else { + if (resourceCase_ == 7) { + resourceCase_ = 0; + resource_ = null; + } + googleAdsLinkBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * A snapshot of a GoogleAdsLink resource in change history.
+       * 
+ * + * .google.analytics.admin.v1beta.GoogleAdsLink google_ads_link = 7; + */ + public com.google.analytics.admin.v1beta.GoogleAdsLink.Builder getGoogleAdsLinkBuilder() { + return getGoogleAdsLinkFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * A snapshot of a GoogleAdsLink resource in change history.
+       * 
+ * + * .google.analytics.admin.v1beta.GoogleAdsLink google_ads_link = 7; + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.GoogleAdsLinkOrBuilder getGoogleAdsLinkOrBuilder() { + if ((resourceCase_ == 7) && (googleAdsLinkBuilder_ != null)) { + return googleAdsLinkBuilder_.getMessageOrBuilder(); + } else { + if (resourceCase_ == 7) { + return (com.google.analytics.admin.v1beta.GoogleAdsLink) resource_; + } + return com.google.analytics.admin.v1beta.GoogleAdsLink.getDefaultInstance(); + } + } + /** + * + * + *
+       * A snapshot of a GoogleAdsLink resource in change history.
+       * 
+ * + * .google.analytics.admin.v1beta.GoogleAdsLink google_ads_link = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.GoogleAdsLink, + com.google.analytics.admin.v1beta.GoogleAdsLink.Builder, + com.google.analytics.admin.v1beta.GoogleAdsLinkOrBuilder> + getGoogleAdsLinkFieldBuilder() { + if (googleAdsLinkBuilder_ == null) { + if (!(resourceCase_ == 7)) { + resource_ = com.google.analytics.admin.v1beta.GoogleAdsLink.getDefaultInstance(); + } + googleAdsLinkBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.GoogleAdsLink, + com.google.analytics.admin.v1beta.GoogleAdsLink.Builder, + com.google.analytics.admin.v1beta.GoogleAdsLinkOrBuilder>( + (com.google.analytics.admin.v1beta.GoogleAdsLink) resource_, + getParentForChildren(), + isClean()); + resource_ = null; + } + resourceCase_ = 7; + onChanged(); + ; + return googleAdsLinkBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.ConversionEvent, + com.google.analytics.admin.v1beta.ConversionEvent.Builder, + com.google.analytics.admin.v1beta.ConversionEventOrBuilder> + conversionEventBuilder_; + /** + * + * + *
+       * A snapshot of a ConversionEvent resource in change history.
+       * 
+ * + * .google.analytics.admin.v1beta.ConversionEvent conversion_event = 11; + * + * @return Whether the conversionEvent field is set. + */ + @java.lang.Override + public boolean hasConversionEvent() { + return resourceCase_ == 11; + } + /** + * + * + *
+       * A snapshot of a ConversionEvent resource in change history.
+       * 
+ * + * .google.analytics.admin.v1beta.ConversionEvent conversion_event = 11; + * + * @return The conversionEvent. + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.ConversionEvent getConversionEvent() { + if (conversionEventBuilder_ == null) { + if (resourceCase_ == 11) { + return (com.google.analytics.admin.v1beta.ConversionEvent) resource_; + } + return com.google.analytics.admin.v1beta.ConversionEvent.getDefaultInstance(); + } else { + if (resourceCase_ == 11) { + return conversionEventBuilder_.getMessage(); + } + return com.google.analytics.admin.v1beta.ConversionEvent.getDefaultInstance(); + } + } + /** + * + * + *
+       * A snapshot of a ConversionEvent resource in change history.
+       * 
+ * + * .google.analytics.admin.v1beta.ConversionEvent conversion_event = 11; + */ + public Builder setConversionEvent(com.google.analytics.admin.v1beta.ConversionEvent value) { + if (conversionEventBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resource_ = value; + onChanged(); + } else { + conversionEventBuilder_.setMessage(value); + } + resourceCase_ = 11; + return this; + } + /** + * + * + *
+       * A snapshot of a ConversionEvent resource in change history.
+       * 
+ * + * .google.analytics.admin.v1beta.ConversionEvent conversion_event = 11; + */ + public Builder setConversionEvent( + com.google.analytics.admin.v1beta.ConversionEvent.Builder builderForValue) { + if (conversionEventBuilder_ == null) { + resource_ = builderForValue.build(); + onChanged(); + } else { + conversionEventBuilder_.setMessage(builderForValue.build()); + } + resourceCase_ = 11; + return this; + } + /** + * + * + *
+       * A snapshot of a ConversionEvent resource in change history.
+       * 
+ * + * .google.analytics.admin.v1beta.ConversionEvent conversion_event = 11; + */ + public Builder mergeConversionEvent(com.google.analytics.admin.v1beta.ConversionEvent value) { + if (conversionEventBuilder_ == null) { + if (resourceCase_ == 11 + && resource_ + != com.google.analytics.admin.v1beta.ConversionEvent.getDefaultInstance()) { + resource_ = + com.google.analytics.admin.v1beta.ConversionEvent.newBuilder( + (com.google.analytics.admin.v1beta.ConversionEvent) resource_) + .mergeFrom(value) + .buildPartial(); + } else { + resource_ = value; + } + onChanged(); + } else { + if (resourceCase_ == 11) { + conversionEventBuilder_.mergeFrom(value); + } else { + conversionEventBuilder_.setMessage(value); + } + } + resourceCase_ = 11; + return this; + } + /** + * + * + *
+       * A snapshot of a ConversionEvent resource in change history.
+       * 
+ * + * .google.analytics.admin.v1beta.ConversionEvent conversion_event = 11; + */ + public Builder clearConversionEvent() { + if (conversionEventBuilder_ == null) { + if (resourceCase_ == 11) { + resourceCase_ = 0; + resource_ = null; + onChanged(); + } + } else { + if (resourceCase_ == 11) { + resourceCase_ = 0; + resource_ = null; + } + conversionEventBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * A snapshot of a ConversionEvent resource in change history.
+       * 
+ * + * .google.analytics.admin.v1beta.ConversionEvent conversion_event = 11; + */ + public com.google.analytics.admin.v1beta.ConversionEvent.Builder getConversionEventBuilder() { + return getConversionEventFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * A snapshot of a ConversionEvent resource in change history.
+       * 
+ * + * .google.analytics.admin.v1beta.ConversionEvent conversion_event = 11; + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.ConversionEventOrBuilder + getConversionEventOrBuilder() { + if ((resourceCase_ == 11) && (conversionEventBuilder_ != null)) { + return conversionEventBuilder_.getMessageOrBuilder(); + } else { + if (resourceCase_ == 11) { + return (com.google.analytics.admin.v1beta.ConversionEvent) resource_; + } + return com.google.analytics.admin.v1beta.ConversionEvent.getDefaultInstance(); + } + } + /** + * + * + *
+       * A snapshot of a ConversionEvent resource in change history.
+       * 
+ * + * .google.analytics.admin.v1beta.ConversionEvent conversion_event = 11; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.ConversionEvent, + com.google.analytics.admin.v1beta.ConversionEvent.Builder, + com.google.analytics.admin.v1beta.ConversionEventOrBuilder> + getConversionEventFieldBuilder() { + if (conversionEventBuilder_ == null) { + if (!(resourceCase_ == 11)) { + resource_ = com.google.analytics.admin.v1beta.ConversionEvent.getDefaultInstance(); + } + conversionEventBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.ConversionEvent, + com.google.analytics.admin.v1beta.ConversionEvent.Builder, + com.google.analytics.admin.v1beta.ConversionEventOrBuilder>( + (com.google.analytics.admin.v1beta.ConversionEvent) resource_, + getParentForChildren(), + isClean()); + resource_ = null; + } + resourceCase_ = 11; + onChanged(); + ; + return conversionEventBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.MeasurementProtocolSecret, + com.google.analytics.admin.v1beta.MeasurementProtocolSecret.Builder, + com.google.analytics.admin.v1beta.MeasurementProtocolSecretOrBuilder> + measurementProtocolSecretBuilder_; + /** + * + * + *
+       * A snapshot of a MeasurementProtocolSecret resource in change history.
+       * 
+ * + * + * .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secret = 12; + * + * + * @return Whether the measurementProtocolSecret field is set. + */ + @java.lang.Override + public boolean hasMeasurementProtocolSecret() { + return resourceCase_ == 12; + } + /** + * + * + *
+       * A snapshot of a MeasurementProtocolSecret resource in change history.
+       * 
+ * + * + * .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secret = 12; + * + * + * @return The measurementProtocolSecret. + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.MeasurementProtocolSecret + getMeasurementProtocolSecret() { + if (measurementProtocolSecretBuilder_ == null) { + if (resourceCase_ == 12) { + return (com.google.analytics.admin.v1beta.MeasurementProtocolSecret) resource_; + } + return com.google.analytics.admin.v1beta.MeasurementProtocolSecret.getDefaultInstance(); + } else { + if (resourceCase_ == 12) { + return measurementProtocolSecretBuilder_.getMessage(); + } + return com.google.analytics.admin.v1beta.MeasurementProtocolSecret.getDefaultInstance(); + } + } + /** + * + * + *
+       * A snapshot of a MeasurementProtocolSecret resource in change history.
+       * 
+ * + * + * .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secret = 12; + * + */ + public Builder setMeasurementProtocolSecret( + com.google.analytics.admin.v1beta.MeasurementProtocolSecret value) { + if (measurementProtocolSecretBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resource_ = value; + onChanged(); + } else { + measurementProtocolSecretBuilder_.setMessage(value); + } + resourceCase_ = 12; + return this; + } + /** + * + * + *
+       * A snapshot of a MeasurementProtocolSecret resource in change history.
+       * 
+ * + * + * .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secret = 12; + * + */ + public Builder setMeasurementProtocolSecret( + com.google.analytics.admin.v1beta.MeasurementProtocolSecret.Builder builderForValue) { + if (measurementProtocolSecretBuilder_ == null) { + resource_ = builderForValue.build(); + onChanged(); + } else { + measurementProtocolSecretBuilder_.setMessage(builderForValue.build()); + } + resourceCase_ = 12; + return this; + } + /** + * + * + *
+       * A snapshot of a MeasurementProtocolSecret resource in change history.
+       * 
+ * + * + * .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secret = 12; + * + */ + public Builder mergeMeasurementProtocolSecret( + com.google.analytics.admin.v1beta.MeasurementProtocolSecret value) { + if (measurementProtocolSecretBuilder_ == null) { + if (resourceCase_ == 12 + && resource_ + != com.google.analytics.admin.v1beta.MeasurementProtocolSecret + .getDefaultInstance()) { + resource_ = + com.google.analytics.admin.v1beta.MeasurementProtocolSecret.newBuilder( + (com.google.analytics.admin.v1beta.MeasurementProtocolSecret) resource_) + .mergeFrom(value) + .buildPartial(); + } else { + resource_ = value; + } + onChanged(); + } else { + if (resourceCase_ == 12) { + measurementProtocolSecretBuilder_.mergeFrom(value); + } else { + measurementProtocolSecretBuilder_.setMessage(value); + } + } + resourceCase_ = 12; + return this; + } + /** + * + * + *
+       * A snapshot of a MeasurementProtocolSecret resource in change history.
+       * 
+ * + * + * .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secret = 12; + * + */ + public Builder clearMeasurementProtocolSecret() { + if (measurementProtocolSecretBuilder_ == null) { + if (resourceCase_ == 12) { + resourceCase_ = 0; + resource_ = null; + onChanged(); + } + } else { + if (resourceCase_ == 12) { + resourceCase_ = 0; + resource_ = null; + } + measurementProtocolSecretBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * A snapshot of a MeasurementProtocolSecret resource in change history.
+       * 
+ * + * + * .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secret = 12; + * + */ + public com.google.analytics.admin.v1beta.MeasurementProtocolSecret.Builder + getMeasurementProtocolSecretBuilder() { + return getMeasurementProtocolSecretFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * A snapshot of a MeasurementProtocolSecret resource in change history.
+       * 
+ * + * + * .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secret = 12; + * + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.MeasurementProtocolSecretOrBuilder + getMeasurementProtocolSecretOrBuilder() { + if ((resourceCase_ == 12) && (measurementProtocolSecretBuilder_ != null)) { + return measurementProtocolSecretBuilder_.getMessageOrBuilder(); + } else { + if (resourceCase_ == 12) { + return (com.google.analytics.admin.v1beta.MeasurementProtocolSecret) resource_; + } + return com.google.analytics.admin.v1beta.MeasurementProtocolSecret.getDefaultInstance(); + } + } + /** + * + * + *
+       * A snapshot of a MeasurementProtocolSecret resource in change history.
+       * 
+ * + * + * .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secret = 12; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.MeasurementProtocolSecret, + com.google.analytics.admin.v1beta.MeasurementProtocolSecret.Builder, + com.google.analytics.admin.v1beta.MeasurementProtocolSecretOrBuilder> + getMeasurementProtocolSecretFieldBuilder() { + if (measurementProtocolSecretBuilder_ == null) { + if (!(resourceCase_ == 12)) { + resource_ = + com.google.analytics.admin.v1beta.MeasurementProtocolSecret.getDefaultInstance(); + } + measurementProtocolSecretBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.MeasurementProtocolSecret, + com.google.analytics.admin.v1beta.MeasurementProtocolSecret.Builder, + com.google.analytics.admin.v1beta.MeasurementProtocolSecretOrBuilder>( + (com.google.analytics.admin.v1beta.MeasurementProtocolSecret) resource_, + getParentForChildren(), + isClean()); + resource_ = null; + } + resourceCase_ = 12; + onChanged(); + ; + return measurementProtocolSecretBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.DataRetentionSettings, + com.google.analytics.admin.v1beta.DataRetentionSettings.Builder, + com.google.analytics.admin.v1beta.DataRetentionSettingsOrBuilder> + dataRetentionSettingsBuilder_; + /** + * + * + *
+       * A snapshot of a data retention settings resource in change history.
+       * 
+ * + * .google.analytics.admin.v1beta.DataRetentionSettings data_retention_settings = 15; + * + * + * @return Whether the dataRetentionSettings field is set. + */ + @java.lang.Override + public boolean hasDataRetentionSettings() { + return resourceCase_ == 15; + } + /** + * + * + *
+       * A snapshot of a data retention settings resource in change history.
+       * 
+ * + * .google.analytics.admin.v1beta.DataRetentionSettings data_retention_settings = 15; + * + * + * @return The dataRetentionSettings. + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.DataRetentionSettings getDataRetentionSettings() { + if (dataRetentionSettingsBuilder_ == null) { + if (resourceCase_ == 15) { + return (com.google.analytics.admin.v1beta.DataRetentionSettings) resource_; + } + return com.google.analytics.admin.v1beta.DataRetentionSettings.getDefaultInstance(); + } else { + if (resourceCase_ == 15) { + return dataRetentionSettingsBuilder_.getMessage(); + } + return com.google.analytics.admin.v1beta.DataRetentionSettings.getDefaultInstance(); + } + } + /** + * + * + *
+       * A snapshot of a data retention settings resource in change history.
+       * 
+ * + * .google.analytics.admin.v1beta.DataRetentionSettings data_retention_settings = 15; + * + */ + public Builder setDataRetentionSettings( + com.google.analytics.admin.v1beta.DataRetentionSettings value) { + if (dataRetentionSettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resource_ = value; + onChanged(); + } else { + dataRetentionSettingsBuilder_.setMessage(value); + } + resourceCase_ = 15; + return this; + } + /** + * + * + *
+       * A snapshot of a data retention settings resource in change history.
+       * 
+ * + * .google.analytics.admin.v1beta.DataRetentionSettings data_retention_settings = 15; + * + */ + public Builder setDataRetentionSettings( + com.google.analytics.admin.v1beta.DataRetentionSettings.Builder builderForValue) { + if (dataRetentionSettingsBuilder_ == null) { + resource_ = builderForValue.build(); + onChanged(); + } else { + dataRetentionSettingsBuilder_.setMessage(builderForValue.build()); + } + resourceCase_ = 15; + return this; + } + /** + * + * + *
+       * A snapshot of a data retention settings resource in change history.
+       * 
+ * + * .google.analytics.admin.v1beta.DataRetentionSettings data_retention_settings = 15; + * + */ + public Builder mergeDataRetentionSettings( + com.google.analytics.admin.v1beta.DataRetentionSettings value) { + if (dataRetentionSettingsBuilder_ == null) { + if (resourceCase_ == 15 + && resource_ + != com.google.analytics.admin.v1beta.DataRetentionSettings.getDefaultInstance()) { + resource_ = + com.google.analytics.admin.v1beta.DataRetentionSettings.newBuilder( + (com.google.analytics.admin.v1beta.DataRetentionSettings) resource_) + .mergeFrom(value) + .buildPartial(); + } else { + resource_ = value; + } + onChanged(); + } else { + if (resourceCase_ == 15) { + dataRetentionSettingsBuilder_.mergeFrom(value); + } else { + dataRetentionSettingsBuilder_.setMessage(value); + } + } + resourceCase_ = 15; + return this; + } + /** + * + * + *
+       * A snapshot of a data retention settings resource in change history.
+       * 
+ * + * .google.analytics.admin.v1beta.DataRetentionSettings data_retention_settings = 15; + * + */ + public Builder clearDataRetentionSettings() { + if (dataRetentionSettingsBuilder_ == null) { + if (resourceCase_ == 15) { + resourceCase_ = 0; + resource_ = null; + onChanged(); + } + } else { + if (resourceCase_ == 15) { + resourceCase_ = 0; + resource_ = null; + } + dataRetentionSettingsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * A snapshot of a data retention settings resource in change history.
+       * 
+ * + * .google.analytics.admin.v1beta.DataRetentionSettings data_retention_settings = 15; + * + */ + public com.google.analytics.admin.v1beta.DataRetentionSettings.Builder + getDataRetentionSettingsBuilder() { + return getDataRetentionSettingsFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * A snapshot of a data retention settings resource in change history.
+       * 
+ * + * .google.analytics.admin.v1beta.DataRetentionSettings data_retention_settings = 15; + * + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.DataRetentionSettingsOrBuilder + getDataRetentionSettingsOrBuilder() { + if ((resourceCase_ == 15) && (dataRetentionSettingsBuilder_ != null)) { + return dataRetentionSettingsBuilder_.getMessageOrBuilder(); + } else { + if (resourceCase_ == 15) { + return (com.google.analytics.admin.v1beta.DataRetentionSettings) resource_; + } + return com.google.analytics.admin.v1beta.DataRetentionSettings.getDefaultInstance(); + } + } + /** + * + * + *
+       * A snapshot of a data retention settings resource in change history.
+       * 
+ * + * .google.analytics.admin.v1beta.DataRetentionSettings data_retention_settings = 15; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.DataRetentionSettings, + com.google.analytics.admin.v1beta.DataRetentionSettings.Builder, + com.google.analytics.admin.v1beta.DataRetentionSettingsOrBuilder> + getDataRetentionSettingsFieldBuilder() { + if (dataRetentionSettingsBuilder_ == null) { + if (!(resourceCase_ == 15)) { + resource_ = + com.google.analytics.admin.v1beta.DataRetentionSettings.getDefaultInstance(); + } + dataRetentionSettingsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.DataRetentionSettings, + com.google.analytics.admin.v1beta.DataRetentionSettings.Builder, + com.google.analytics.admin.v1beta.DataRetentionSettingsOrBuilder>( + (com.google.analytics.admin.v1beta.DataRetentionSettings) resource_, + getParentForChildren(), + isClean()); + resource_ = null; + } + resourceCase_ = 15; + onChanged(); + ; + return dataRetentionSettingsBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.DataStream, + com.google.analytics.admin.v1beta.DataStream.Builder, + com.google.analytics.admin.v1beta.DataStreamOrBuilder> + dataStreamBuilder_; + /** + * + * + *
+       * A snapshot of a DataStream resource in change history.
+       * 
+ * + * .google.analytics.admin.v1beta.DataStream data_stream = 18; + * + * @return Whether the dataStream field is set. + */ + @java.lang.Override + public boolean hasDataStream() { + return resourceCase_ == 18; + } + /** + * + * + *
+       * A snapshot of a DataStream resource in change history.
+       * 
+ * + * .google.analytics.admin.v1beta.DataStream data_stream = 18; + * + * @return The dataStream. + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.DataStream getDataStream() { + if (dataStreamBuilder_ == null) { + if (resourceCase_ == 18) { + return (com.google.analytics.admin.v1beta.DataStream) resource_; + } + return com.google.analytics.admin.v1beta.DataStream.getDefaultInstance(); + } else { + if (resourceCase_ == 18) { + return dataStreamBuilder_.getMessage(); + } + return com.google.analytics.admin.v1beta.DataStream.getDefaultInstance(); + } + } + /** + * + * + *
+       * A snapshot of a DataStream resource in change history.
+       * 
+ * + * .google.analytics.admin.v1beta.DataStream data_stream = 18; + */ + public Builder setDataStream(com.google.analytics.admin.v1beta.DataStream value) { + if (dataStreamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resource_ = value; + onChanged(); + } else { + dataStreamBuilder_.setMessage(value); + } + resourceCase_ = 18; + return this; + } + /** + * + * + *
+       * A snapshot of a DataStream resource in change history.
+       * 
+ * + * .google.analytics.admin.v1beta.DataStream data_stream = 18; + */ + public Builder setDataStream( + com.google.analytics.admin.v1beta.DataStream.Builder builderForValue) { + if (dataStreamBuilder_ == null) { + resource_ = builderForValue.build(); + onChanged(); + } else { + dataStreamBuilder_.setMessage(builderForValue.build()); + } + resourceCase_ = 18; + return this; + } + /** + * + * + *
+       * A snapshot of a DataStream resource in change history.
+       * 
+ * + * .google.analytics.admin.v1beta.DataStream data_stream = 18; + */ + public Builder mergeDataStream(com.google.analytics.admin.v1beta.DataStream value) { + if (dataStreamBuilder_ == null) { + if (resourceCase_ == 18 + && resource_ != com.google.analytics.admin.v1beta.DataStream.getDefaultInstance()) { + resource_ = + com.google.analytics.admin.v1beta.DataStream.newBuilder( + (com.google.analytics.admin.v1beta.DataStream) resource_) + .mergeFrom(value) + .buildPartial(); + } else { + resource_ = value; + } + onChanged(); + } else { + if (resourceCase_ == 18) { + dataStreamBuilder_.mergeFrom(value); + } else { + dataStreamBuilder_.setMessage(value); + } + } + resourceCase_ = 18; + return this; + } + /** + * + * + *
+       * A snapshot of a DataStream resource in change history.
+       * 
+ * + * .google.analytics.admin.v1beta.DataStream data_stream = 18; + */ + public Builder clearDataStream() { + if (dataStreamBuilder_ == null) { + if (resourceCase_ == 18) { + resourceCase_ = 0; + resource_ = null; + onChanged(); + } + } else { + if (resourceCase_ == 18) { + resourceCase_ = 0; + resource_ = null; + } + dataStreamBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * A snapshot of a DataStream resource in change history.
+       * 
+ * + * .google.analytics.admin.v1beta.DataStream data_stream = 18; + */ + public com.google.analytics.admin.v1beta.DataStream.Builder getDataStreamBuilder() { + return getDataStreamFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * A snapshot of a DataStream resource in change history.
+       * 
+ * + * .google.analytics.admin.v1beta.DataStream data_stream = 18; + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.DataStreamOrBuilder getDataStreamOrBuilder() { + if ((resourceCase_ == 18) && (dataStreamBuilder_ != null)) { + return dataStreamBuilder_.getMessageOrBuilder(); + } else { + if (resourceCase_ == 18) { + return (com.google.analytics.admin.v1beta.DataStream) resource_; + } + return com.google.analytics.admin.v1beta.DataStream.getDefaultInstance(); + } + } + /** + * + * + *
+       * A snapshot of a DataStream resource in change history.
+       * 
+ * + * .google.analytics.admin.v1beta.DataStream data_stream = 18; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.DataStream, + com.google.analytics.admin.v1beta.DataStream.Builder, + com.google.analytics.admin.v1beta.DataStreamOrBuilder> + getDataStreamFieldBuilder() { + if (dataStreamBuilder_ == null) { + if (!(resourceCase_ == 18)) { + resource_ = com.google.analytics.admin.v1beta.DataStream.getDefaultInstance(); + } + dataStreamBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.DataStream, + com.google.analytics.admin.v1beta.DataStream.Builder, + com.google.analytics.admin.v1beta.DataStreamOrBuilder>( + (com.google.analytics.admin.v1beta.DataStream) resource_, + getParentForChildren(), + isClean()); + resource_ = null; + } + resourceCase_ = 18; + onChanged(); + ; + return dataStreamBuilder_; + } + + @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.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource) + private static final com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource(); + } + + public static com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ChangeHistoryResource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ChangeHistoryResource(input, extensionRegistry); + } + }; + + 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.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int RESOURCE_FIELD_NUMBER = 1; + private volatile java.lang.Object resource_; + /** + * + * + *
+   * Resource name of the resource whose changes are described by this entry.
+   * 
+ * + * string resource = 1; + * + * @return The resource. + */ + @java.lang.Override + public java.lang.String getResource() { + java.lang.Object ref = resource_; + 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(); + resource_ = s; + return s; + } + } + /** + * + * + *
+   * Resource name of the resource whose changes are described by this entry.
+   * 
+ * + * string resource = 1; + * + * @return The bytes for resource. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResourceBytes() { + java.lang.Object ref = resource_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ACTION_FIELD_NUMBER = 2; + private int action_; + /** + * + * + *
+   * The type of action that changed this resource.
+   * 
+ * + * .google.analytics.admin.v1beta.ActionType action = 2; + * + * @return The enum numeric value on the wire for action. + */ + @java.lang.Override + public int getActionValue() { + return action_; + } + /** + * + * + *
+   * The type of action that changed this resource.
+   * 
+ * + * .google.analytics.admin.v1beta.ActionType action = 2; + * + * @return The action. + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.ActionType getAction() { + @SuppressWarnings("deprecation") + com.google.analytics.admin.v1beta.ActionType result = + com.google.analytics.admin.v1beta.ActionType.valueOf(action_); + return result == null ? com.google.analytics.admin.v1beta.ActionType.UNRECOGNIZED : result; + } + + public static final int RESOURCE_BEFORE_CHANGE_FIELD_NUMBER = 3; + private com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource + resourceBeforeChange_; + /** + * + * + *
+   * Resource contents from before the change was made. If this resource was
+   * created in this change, this field will be missing.
+   * 
+ * + * + * .google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource resource_before_change = 3; + * + * + * @return Whether the resourceBeforeChange field is set. + */ + @java.lang.Override + public boolean hasResourceBeforeChange() { + return resourceBeforeChange_ != null; + } + /** + * + * + *
+   * Resource contents from before the change was made. If this resource was
+   * created in this change, this field will be missing.
+   * 
+ * + * + * .google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource resource_before_change = 3; + * + * + * @return The resourceBeforeChange. + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource + getResourceBeforeChange() { + return resourceBeforeChange_ == null + ? com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource + .getDefaultInstance() + : resourceBeforeChange_; + } + /** + * + * + *
+   * Resource contents from before the change was made. If this resource was
+   * created in this change, this field will be missing.
+   * 
+ * + * + * .google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource resource_before_change = 3; + * + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResourceOrBuilder + getResourceBeforeChangeOrBuilder() { + return getResourceBeforeChange(); + } + + public static final int RESOURCE_AFTER_CHANGE_FIELD_NUMBER = 4; + private com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource + resourceAfterChange_; + /** + * + * + *
+   * Resource contents from after the change was made. If this resource was
+   * deleted in this change, this field will be missing.
+   * 
+ * + * + * .google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource resource_after_change = 4; + * + * + * @return Whether the resourceAfterChange field is set. + */ + @java.lang.Override + public boolean hasResourceAfterChange() { + return resourceAfterChange_ != null; + } + /** + * + * + *
+   * Resource contents from after the change was made. If this resource was
+   * deleted in this change, this field will be missing.
+   * 
+ * + * + * .google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource resource_after_change = 4; + * + * + * @return The resourceAfterChange. + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource + getResourceAfterChange() { + return resourceAfterChange_ == null + ? com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource + .getDefaultInstance() + : resourceAfterChange_; + } + /** + * + * + *
+   * Resource contents from after the change was made. If this resource was
+   * deleted in this change, this field will be missing.
+   * 
+ * + * + * .google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource resource_after_change = 4; + * + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResourceOrBuilder + getResourceAfterChangeOrBuilder() { + return getResourceAfterChange(); + } + + 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(resource_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, resource_); + } + if (action_ + != com.google.analytics.admin.v1beta.ActionType.ACTION_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(2, action_); + } + if (resourceBeforeChange_ != null) { + output.writeMessage(3, getResourceBeforeChange()); + } + if (resourceAfterChange_ != null) { + output.writeMessage(4, getResourceAfterChange()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resource_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, resource_); + } + if (action_ + != com.google.analytics.admin.v1beta.ActionType.ACTION_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, action_); + } + if (resourceBeforeChange_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(3, getResourceBeforeChange()); + } + if (resourceAfterChange_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getResourceAfterChange()); + } + size += unknownFields.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.admin.v1beta.ChangeHistoryChange)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.ChangeHistoryChange other = + (com.google.analytics.admin.v1beta.ChangeHistoryChange) obj; + + if (!getResource().equals(other.getResource())) return false; + if (action_ != other.action_) return false; + if (hasResourceBeforeChange() != other.hasResourceBeforeChange()) return false; + if (hasResourceBeforeChange()) { + if (!getResourceBeforeChange().equals(other.getResourceBeforeChange())) return false; + } + if (hasResourceAfterChange() != other.hasResourceAfterChange()) return false; + if (hasResourceAfterChange()) { + if (!getResourceAfterChange().equals(other.getResourceAfterChange())) return false; + } + if (!unknownFields.equals(other.unknownFields)) 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) + RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getResource().hashCode(); + hash = (37 * hash) + ACTION_FIELD_NUMBER; + hash = (53 * hash) + action_; + if (hasResourceBeforeChange()) { + hash = (37 * hash) + RESOURCE_BEFORE_CHANGE_FIELD_NUMBER; + hash = (53 * hash) + getResourceBeforeChange().hashCode(); + } + if (hasResourceAfterChange()) { + hash = (37 * hash) + RESOURCE_AFTER_CHANGE_FIELD_NUMBER; + hash = (53 * hash) + getResourceAfterChange().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.ChangeHistoryChange parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ChangeHistoryChange 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.admin.v1beta.ChangeHistoryChange parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ChangeHistoryChange 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.admin.v1beta.ChangeHistoryChange parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ChangeHistoryChange parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.ChangeHistoryChange parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ChangeHistoryChange 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.admin.v1beta.ChangeHistoryChange parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ChangeHistoryChange 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.admin.v1beta.ChangeHistoryChange parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ChangeHistoryChange 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.admin.v1beta.ChangeHistoryChange 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 description of a change to a single Google Analytics resource.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.ChangeHistoryChange} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.ChangeHistoryChange) + com.google.analytics.admin.v1beta.ChangeHistoryChangeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_ChangeHistoryChange_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_ChangeHistoryChange_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.ChangeHistoryChange.class, + com.google.analytics.admin.v1beta.ChangeHistoryChange.Builder.class); + } + + // Construct using com.google.analytics.admin.v1beta.ChangeHistoryChange.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + resource_ = ""; + + action_ = 0; + + if (resourceBeforeChangeBuilder_ == null) { + resourceBeforeChange_ = null; + } else { + resourceBeforeChange_ = null; + resourceBeforeChangeBuilder_ = null; + } + if (resourceAfterChangeBuilder_ == null) { + resourceAfterChange_ = null; + } else { + resourceAfterChange_ = null; + resourceAfterChangeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_ChangeHistoryChange_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ChangeHistoryChange getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.ChangeHistoryChange.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ChangeHistoryChange build() { + com.google.analytics.admin.v1beta.ChangeHistoryChange result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ChangeHistoryChange buildPartial() { + com.google.analytics.admin.v1beta.ChangeHistoryChange result = + new com.google.analytics.admin.v1beta.ChangeHistoryChange(this); + result.resource_ = resource_; + result.action_ = action_; + if (resourceBeforeChangeBuilder_ == null) { + result.resourceBeforeChange_ = resourceBeforeChange_; + } else { + result.resourceBeforeChange_ = resourceBeforeChangeBuilder_.build(); + } + if (resourceAfterChangeBuilder_ == null) { + result.resourceAfterChange_ = resourceAfterChange_; + } else { + result.resourceAfterChange_ = resourceAfterChangeBuilder_.build(); + } + onBuilt(); + return result; + } + + @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.admin.v1beta.ChangeHistoryChange) { + return mergeFrom((com.google.analytics.admin.v1beta.ChangeHistoryChange) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1beta.ChangeHistoryChange other) { + if (other == com.google.analytics.admin.v1beta.ChangeHistoryChange.getDefaultInstance()) + return this; + if (!other.getResource().isEmpty()) { + resource_ = other.resource_; + onChanged(); + } + if (other.action_ != 0) { + setActionValue(other.getActionValue()); + } + if (other.hasResourceBeforeChange()) { + mergeResourceBeforeChange(other.getResourceBeforeChange()); + } + if (other.hasResourceAfterChange()) { + mergeResourceAfterChange(other.getResourceAfterChange()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.ChangeHistoryChange parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.ChangeHistoryChange) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object resource_ = ""; + /** + * + * + *
+     * Resource name of the resource whose changes are described by this entry.
+     * 
+ * + * string resource = 1; + * + * @return The resource. + */ + public java.lang.String getResource() { + java.lang.Object ref = resource_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resource_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Resource name of the resource whose changes are described by this entry.
+     * 
+ * + * string resource = 1; + * + * @return The bytes for resource. + */ + public com.google.protobuf.ByteString getResourceBytes() { + java.lang.Object ref = resource_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Resource name of the resource whose changes are described by this entry.
+     * 
+ * + * string resource = 1; + * + * @param value The resource to set. + * @return This builder for chaining. + */ + public Builder setResource(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + resource_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Resource name of the resource whose changes are described by this entry.
+     * 
+ * + * string resource = 1; + * + * @return This builder for chaining. + */ + public Builder clearResource() { + + resource_ = getDefaultInstance().getResource(); + onChanged(); + return this; + } + /** + * + * + *
+     * Resource name of the resource whose changes are described by this entry.
+     * 
+ * + * string resource = 1; + * + * @param value The bytes for resource to set. + * @return This builder for chaining. + */ + public Builder setResourceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + resource_ = value; + onChanged(); + return this; + } + + private int action_ = 0; + /** + * + * + *
+     * The type of action that changed this resource.
+     * 
+ * + * .google.analytics.admin.v1beta.ActionType action = 2; + * + * @return The enum numeric value on the wire for action. + */ + @java.lang.Override + public int getActionValue() { + return action_; + } + /** + * + * + *
+     * The type of action that changed this resource.
+     * 
+ * + * .google.analytics.admin.v1beta.ActionType action = 2; + * + * @param value The enum numeric value on the wire for action to set. + * @return This builder for chaining. + */ + public Builder setActionValue(int value) { + + action_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The type of action that changed this resource.
+     * 
+ * + * .google.analytics.admin.v1beta.ActionType action = 2; + * + * @return The action. + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.ActionType getAction() { + @SuppressWarnings("deprecation") + com.google.analytics.admin.v1beta.ActionType result = + com.google.analytics.admin.v1beta.ActionType.valueOf(action_); + return result == null ? com.google.analytics.admin.v1beta.ActionType.UNRECOGNIZED : result; + } + /** + * + * + *
+     * The type of action that changed this resource.
+     * 
+ * + * .google.analytics.admin.v1beta.ActionType action = 2; + * + * @param value The action to set. + * @return This builder for chaining. + */ + public Builder setAction(com.google.analytics.admin.v1beta.ActionType value) { + if (value == null) { + throw new NullPointerException(); + } + + action_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The type of action that changed this resource.
+     * 
+ * + * .google.analytics.admin.v1beta.ActionType action = 2; + * + * @return This builder for chaining. + */ + public Builder clearAction() { + + action_ = 0; + onChanged(); + return this; + } + + private com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource + resourceBeforeChange_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource, + com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource.Builder, + com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResourceOrBuilder> + resourceBeforeChangeBuilder_; + /** + * + * + *
+     * Resource contents from before the change was made. If this resource was
+     * created in this change, this field will be missing.
+     * 
+ * + * + * .google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource resource_before_change = 3; + * + * + * @return Whether the resourceBeforeChange field is set. + */ + public boolean hasResourceBeforeChange() { + return resourceBeforeChangeBuilder_ != null || resourceBeforeChange_ != null; + } + /** + * + * + *
+     * Resource contents from before the change was made. If this resource was
+     * created in this change, this field will be missing.
+     * 
+ * + * + * .google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource resource_before_change = 3; + * + * + * @return The resourceBeforeChange. + */ + public com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource + getResourceBeforeChange() { + if (resourceBeforeChangeBuilder_ == null) { + return resourceBeforeChange_ == null + ? com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource + .getDefaultInstance() + : resourceBeforeChange_; + } else { + return resourceBeforeChangeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Resource contents from before the change was made. If this resource was
+     * created in this change, this field will be missing.
+     * 
+ * + * + * .google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource resource_before_change = 3; + * + */ + public Builder setResourceBeforeChange( + com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource value) { + if (resourceBeforeChangeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resourceBeforeChange_ = value; + onChanged(); + } else { + resourceBeforeChangeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Resource contents from before the change was made. If this resource was
+     * created in this change, this field will be missing.
+     * 
+ * + * + * .google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource resource_before_change = 3; + * + */ + public Builder setResourceBeforeChange( + com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource.Builder + builderForValue) { + if (resourceBeforeChangeBuilder_ == null) { + resourceBeforeChange_ = builderForValue.build(); + onChanged(); + } else { + resourceBeforeChangeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Resource contents from before the change was made. If this resource was
+     * created in this change, this field will be missing.
+     * 
+ * + * + * .google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource resource_before_change = 3; + * + */ + public Builder mergeResourceBeforeChange( + com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource value) { + if (resourceBeforeChangeBuilder_ == null) { + if (resourceBeforeChange_ != null) { + resourceBeforeChange_ = + com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource + .newBuilder(resourceBeforeChange_) + .mergeFrom(value) + .buildPartial(); + } else { + resourceBeforeChange_ = value; + } + onChanged(); + } else { + resourceBeforeChangeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Resource contents from before the change was made. If this resource was
+     * created in this change, this field will be missing.
+     * 
+ * + * + * .google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource resource_before_change = 3; + * + */ + public Builder clearResourceBeforeChange() { + if (resourceBeforeChangeBuilder_ == null) { + resourceBeforeChange_ = null; + onChanged(); + } else { + resourceBeforeChange_ = null; + resourceBeforeChangeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Resource contents from before the change was made. If this resource was
+     * created in this change, this field will be missing.
+     * 
+ * + * + * .google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource resource_before_change = 3; + * + */ + public com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource.Builder + getResourceBeforeChangeBuilder() { + + onChanged(); + return getResourceBeforeChangeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Resource contents from before the change was made. If this resource was
+     * created in this change, this field will be missing.
+     * 
+ * + * + * .google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource resource_before_change = 3; + * + */ + public com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResourceOrBuilder + getResourceBeforeChangeOrBuilder() { + if (resourceBeforeChangeBuilder_ != null) { + return resourceBeforeChangeBuilder_.getMessageOrBuilder(); + } else { + return resourceBeforeChange_ == null + ? com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource + .getDefaultInstance() + : resourceBeforeChange_; + } + } + /** + * + * + *
+     * Resource contents from before the change was made. If this resource was
+     * created in this change, this field will be missing.
+     * 
+ * + * + * .google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource resource_before_change = 3; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource, + com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource.Builder, + com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResourceOrBuilder> + getResourceBeforeChangeFieldBuilder() { + if (resourceBeforeChangeBuilder_ == null) { + resourceBeforeChangeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource, + com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource.Builder, + com.google.analytics.admin.v1beta.ChangeHistoryChange + .ChangeHistoryResourceOrBuilder>( + getResourceBeforeChange(), getParentForChildren(), isClean()); + resourceBeforeChange_ = null; + } + return resourceBeforeChangeBuilder_; + } + + private com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource + resourceAfterChange_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource, + com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource.Builder, + com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResourceOrBuilder> + resourceAfterChangeBuilder_; + /** + * + * + *
+     * Resource contents from after the change was made. If this resource was
+     * deleted in this change, this field will be missing.
+     * 
+ * + * + * .google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource resource_after_change = 4; + * + * + * @return Whether the resourceAfterChange field is set. + */ + public boolean hasResourceAfterChange() { + return resourceAfterChangeBuilder_ != null || resourceAfterChange_ != null; + } + /** + * + * + *
+     * Resource contents from after the change was made. If this resource was
+     * deleted in this change, this field will be missing.
+     * 
+ * + * + * .google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource resource_after_change = 4; + * + * + * @return The resourceAfterChange. + */ + public com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource + getResourceAfterChange() { + if (resourceAfterChangeBuilder_ == null) { + return resourceAfterChange_ == null + ? com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource + .getDefaultInstance() + : resourceAfterChange_; + } else { + return resourceAfterChangeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Resource contents from after the change was made. If this resource was
+     * deleted in this change, this field will be missing.
+     * 
+ * + * + * .google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource resource_after_change = 4; + * + */ + public Builder setResourceAfterChange( + com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource value) { + if (resourceAfterChangeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resourceAfterChange_ = value; + onChanged(); + } else { + resourceAfterChangeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Resource contents from after the change was made. If this resource was
+     * deleted in this change, this field will be missing.
+     * 
+ * + * + * .google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource resource_after_change = 4; + * + */ + public Builder setResourceAfterChange( + com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource.Builder + builderForValue) { + if (resourceAfterChangeBuilder_ == null) { + resourceAfterChange_ = builderForValue.build(); + onChanged(); + } else { + resourceAfterChangeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Resource contents from after the change was made. If this resource was
+     * deleted in this change, this field will be missing.
+     * 
+ * + * + * .google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource resource_after_change = 4; + * + */ + public Builder mergeResourceAfterChange( + com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource value) { + if (resourceAfterChangeBuilder_ == null) { + if (resourceAfterChange_ != null) { + resourceAfterChange_ = + com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource + .newBuilder(resourceAfterChange_) + .mergeFrom(value) + .buildPartial(); + } else { + resourceAfterChange_ = value; + } + onChanged(); + } else { + resourceAfterChangeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Resource contents from after the change was made. If this resource was
+     * deleted in this change, this field will be missing.
+     * 
+ * + * + * .google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource resource_after_change = 4; + * + */ + public Builder clearResourceAfterChange() { + if (resourceAfterChangeBuilder_ == null) { + resourceAfterChange_ = null; + onChanged(); + } else { + resourceAfterChange_ = null; + resourceAfterChangeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Resource contents from after the change was made. If this resource was
+     * deleted in this change, this field will be missing.
+     * 
+ * + * + * .google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource resource_after_change = 4; + * + */ + public com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource.Builder + getResourceAfterChangeBuilder() { + + onChanged(); + return getResourceAfterChangeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Resource contents from after the change was made. If this resource was
+     * deleted in this change, this field will be missing.
+     * 
+ * + * + * .google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource resource_after_change = 4; + * + */ + public com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResourceOrBuilder + getResourceAfterChangeOrBuilder() { + if (resourceAfterChangeBuilder_ != null) { + return resourceAfterChangeBuilder_.getMessageOrBuilder(); + } else { + return resourceAfterChange_ == null + ? com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource + .getDefaultInstance() + : resourceAfterChange_; + } + } + /** + * + * + *
+     * Resource contents from after the change was made. If this resource was
+     * deleted in this change, this field will be missing.
+     * 
+ * + * + * .google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource resource_after_change = 4; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource, + com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource.Builder, + com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResourceOrBuilder> + getResourceAfterChangeFieldBuilder() { + if (resourceAfterChangeBuilder_ == null) { + resourceAfterChangeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource, + com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource.Builder, + com.google.analytics.admin.v1beta.ChangeHistoryChange + .ChangeHistoryResourceOrBuilder>( + getResourceAfterChange(), getParentForChildren(), isClean()); + resourceAfterChange_ = null; + } + return resourceAfterChangeBuilder_; + } + + @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.admin.v1beta.ChangeHistoryChange) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.ChangeHistoryChange) + private static final com.google.analytics.admin.v1beta.ChangeHistoryChange DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.ChangeHistoryChange(); + } + + public static com.google.analytics.admin.v1beta.ChangeHistoryChange getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ChangeHistoryChange parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ChangeHistoryChange(input, extensionRegistry); + } + }; + + 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.admin.v1beta.ChangeHistoryChange getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ChangeHistoryChangeOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ChangeHistoryChangeOrBuilder.java new file mode 100644 index 000000000000..cc1ae56f7184 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ChangeHistoryChangeOrBuilder.java @@ -0,0 +1,167 @@ +/* + * Copyright 2020 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/admin/v1beta/resources.proto + +package com.google.analytics.admin.v1beta; + +public interface ChangeHistoryChangeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.ChangeHistoryChange) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Resource name of the resource whose changes are described by this entry.
+   * 
+ * + * string resource = 1; + * + * @return The resource. + */ + java.lang.String getResource(); + /** + * + * + *
+   * Resource name of the resource whose changes are described by this entry.
+   * 
+ * + * string resource = 1; + * + * @return The bytes for resource. + */ + com.google.protobuf.ByteString getResourceBytes(); + + /** + * + * + *
+   * The type of action that changed this resource.
+   * 
+ * + * .google.analytics.admin.v1beta.ActionType action = 2; + * + * @return The enum numeric value on the wire for action. + */ + int getActionValue(); + /** + * + * + *
+   * The type of action that changed this resource.
+   * 
+ * + * .google.analytics.admin.v1beta.ActionType action = 2; + * + * @return The action. + */ + com.google.analytics.admin.v1beta.ActionType getAction(); + + /** + * + * + *
+   * Resource contents from before the change was made. If this resource was
+   * created in this change, this field will be missing.
+   * 
+ * + * + * .google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource resource_before_change = 3; + * + * + * @return Whether the resourceBeforeChange field is set. + */ + boolean hasResourceBeforeChange(); + /** + * + * + *
+   * Resource contents from before the change was made. If this resource was
+   * created in this change, this field will be missing.
+   * 
+ * + * + * .google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource resource_before_change = 3; + * + * + * @return The resourceBeforeChange. + */ + com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource + getResourceBeforeChange(); + /** + * + * + *
+   * Resource contents from before the change was made. If this resource was
+   * created in this change, this field will be missing.
+   * 
+ * + * + * .google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource resource_before_change = 3; + * + */ + com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResourceOrBuilder + getResourceBeforeChangeOrBuilder(); + + /** + * + * + *
+   * Resource contents from after the change was made. If this resource was
+   * deleted in this change, this field will be missing.
+   * 
+ * + * + * .google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource resource_after_change = 4; + * + * + * @return Whether the resourceAfterChange field is set. + */ + boolean hasResourceAfterChange(); + /** + * + * + *
+   * Resource contents from after the change was made. If this resource was
+   * deleted in this change, this field will be missing.
+   * 
+ * + * + * .google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource resource_after_change = 4; + * + * + * @return The resourceAfterChange. + */ + com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource + getResourceAfterChange(); + /** + * + * + *
+   * Resource contents from after the change was made. If this resource was
+   * deleted in this change, this field will be missing.
+   * 
+ * + * + * .google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource resource_after_change = 4; + * + */ + com.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResourceOrBuilder + getResourceAfterChangeOrBuilder(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ChangeHistoryEvent.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ChangeHistoryEvent.java new file mode 100644 index 000000000000..b269c01d92b1 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ChangeHistoryEvent.java @@ -0,0 +1,1884 @@ +/* + * Copyright 2020 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/admin/v1beta/resources.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * A set of changes within a Google Analytics account or its child properties
+ * that resulted from the same cause. Common causes would be updates made in the
+ * Google Analytics UI, changes from customer support, or automatic Google
+ * Analytics system changes.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.ChangeHistoryEvent} + */ +public final class ChangeHistoryEvent extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.ChangeHistoryEvent) + ChangeHistoryEventOrBuilder { + private static final long serialVersionUID = 0L; + // Use ChangeHistoryEvent.newBuilder() to construct. + private ChangeHistoryEvent(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ChangeHistoryEvent() { + id_ = ""; + actorType_ = 0; + userActorEmail_ = ""; + changes_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ChangeHistoryEvent(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ChangeHistoryEvent( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + id_ = s; + break; + } + case 18: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (changeTime_ != null) { + subBuilder = changeTime_.toBuilder(); + } + changeTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(changeTime_); + changeTime_ = subBuilder.buildPartial(); + } + + break; + } + case 24: + { + int rawValue = input.readEnum(); + + actorType_ = rawValue; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + userActorEmail_ = s; + break; + } + case 40: + { + changesFiltered_ = input.readBool(); + break; + } + case 50: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + changes_ = + new java.util.ArrayList< + com.google.analytics.admin.v1beta.ChangeHistoryChange>(); + mutable_bitField0_ |= 0x00000001; + } + changes_.add( + input.readMessage( + com.google.analytics.admin.v1beta.ChangeHistoryChange.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + changes_ = java.util.Collections.unmodifiableList(changes_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_ChangeHistoryEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_ChangeHistoryEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.ChangeHistoryEvent.class, + com.google.analytics.admin.v1beta.ChangeHistoryEvent.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + private volatile java.lang.Object id_; + /** + * + * + *
+   * ID of this change history event. This ID is unique across Google Analytics.
+   * 
+ * + * string id = 1; + * + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + 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(); + id_ = s; + return s; + } + } + /** + * + * + *
+   * ID of this change history event. This ID is unique across Google Analytics.
+   * 
+ * + * string id = 1; + * + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CHANGE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp changeTime_; + /** + * + * + *
+   * Time when change was made.
+   * 
+ * + * .google.protobuf.Timestamp change_time = 2; + * + * @return Whether the changeTime field is set. + */ + @java.lang.Override + public boolean hasChangeTime() { + return changeTime_ != null; + } + /** + * + * + *
+   * Time when change was made.
+   * 
+ * + * .google.protobuf.Timestamp change_time = 2; + * + * @return The changeTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getChangeTime() { + return changeTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : changeTime_; + } + /** + * + * + *
+   * Time when change was made.
+   * 
+ * + * .google.protobuf.Timestamp change_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getChangeTimeOrBuilder() { + return getChangeTime(); + } + + public static final int ACTOR_TYPE_FIELD_NUMBER = 3; + private int actorType_; + /** + * + * + *
+   * The type of actor that made this change.
+   * 
+ * + * .google.analytics.admin.v1beta.ActorType actor_type = 3; + * + * @return The enum numeric value on the wire for actorType. + */ + @java.lang.Override + public int getActorTypeValue() { + return actorType_; + } + /** + * + * + *
+   * The type of actor that made this change.
+   * 
+ * + * .google.analytics.admin.v1beta.ActorType actor_type = 3; + * + * @return The actorType. + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.ActorType getActorType() { + @SuppressWarnings("deprecation") + com.google.analytics.admin.v1beta.ActorType result = + com.google.analytics.admin.v1beta.ActorType.valueOf(actorType_); + return result == null ? com.google.analytics.admin.v1beta.ActorType.UNRECOGNIZED : result; + } + + public static final int USER_ACTOR_EMAIL_FIELD_NUMBER = 4; + private volatile java.lang.Object userActorEmail_; + /** + * + * + *
+   * Email address of the Google account that made the change. This will be a
+   * valid email address if the actor field is set to USER, and empty otherwise.
+   * Google accounts that have been deleted will cause an error.
+   * 
+ * + * string user_actor_email = 4; + * + * @return The userActorEmail. + */ + @java.lang.Override + public java.lang.String getUserActorEmail() { + java.lang.Object ref = userActorEmail_; + 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(); + userActorEmail_ = s; + return s; + } + } + /** + * + * + *
+   * Email address of the Google account that made the change. This will be a
+   * valid email address if the actor field is set to USER, and empty otherwise.
+   * Google accounts that have been deleted will cause an error.
+   * 
+ * + * string user_actor_email = 4; + * + * @return The bytes for userActorEmail. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUserActorEmailBytes() { + java.lang.Object ref = userActorEmail_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userActorEmail_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CHANGES_FILTERED_FIELD_NUMBER = 5; + private boolean changesFiltered_; + /** + * + * + *
+   * If true, then the list of changes returned was filtered, and does not
+   * represent all changes that occurred in this event.
+   * 
+ * + * bool changes_filtered = 5; + * + * @return The changesFiltered. + */ + @java.lang.Override + public boolean getChangesFiltered() { + return changesFiltered_; + } + + public static final int CHANGES_FIELD_NUMBER = 6; + private java.util.List changes_; + /** + * + * + *
+   * A list of changes made in this change history event that fit the filters
+   * specified in SearchChangeHistoryEventsRequest.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.ChangeHistoryChange changes = 6; + */ + @java.lang.Override + public java.util.List getChangesList() { + return changes_; + } + /** + * + * + *
+   * A list of changes made in this change history event that fit the filters
+   * specified in SearchChangeHistoryEventsRequest.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.ChangeHistoryChange changes = 6; + */ + @java.lang.Override + public java.util.List + getChangesOrBuilderList() { + return changes_; + } + /** + * + * + *
+   * A list of changes made in this change history event that fit the filters
+   * specified in SearchChangeHistoryEventsRequest.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.ChangeHistoryChange changes = 6; + */ + @java.lang.Override + public int getChangesCount() { + return changes_.size(); + } + /** + * + * + *
+   * A list of changes made in this change history event that fit the filters
+   * specified in SearchChangeHistoryEventsRequest.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.ChangeHistoryChange changes = 6; + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.ChangeHistoryChange getChanges(int index) { + return changes_.get(index); + } + /** + * + * + *
+   * A list of changes made in this change history event that fit the filters
+   * specified in SearchChangeHistoryEventsRequest.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.ChangeHistoryChange changes = 6; + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.ChangeHistoryChangeOrBuilder getChangesOrBuilder( + int index) { + return changes_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + if (changeTime_ != null) { + output.writeMessage(2, getChangeTime()); + } + if (actorType_ + != com.google.analytics.admin.v1beta.ActorType.ACTOR_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(3, actorType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userActorEmail_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, userActorEmail_); + } + if (changesFiltered_ != false) { + output.writeBool(5, changesFiltered_); + } + for (int i = 0; i < changes_.size(); i++) { + output.writeMessage(6, changes_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + if (changeTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getChangeTime()); + } + if (actorType_ + != com.google.analytics.admin.v1beta.ActorType.ACTOR_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, actorType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userActorEmail_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, userActorEmail_); + } + if (changesFiltered_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, changesFiltered_); + } + for (int i = 0; i < changes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, changes_.get(i)); + } + size += unknownFields.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.admin.v1beta.ChangeHistoryEvent)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.ChangeHistoryEvent other = + (com.google.analytics.admin.v1beta.ChangeHistoryEvent) obj; + + if (!getId().equals(other.getId())) return false; + if (hasChangeTime() != other.hasChangeTime()) return false; + if (hasChangeTime()) { + if (!getChangeTime().equals(other.getChangeTime())) return false; + } + if (actorType_ != other.actorType_) return false; + if (!getUserActorEmail().equals(other.getUserActorEmail())) return false; + if (getChangesFiltered() != other.getChangesFiltered()) return false; + if (!getChangesList().equals(other.getChangesList())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + if (hasChangeTime()) { + hash = (37 * hash) + CHANGE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getChangeTime().hashCode(); + } + hash = (37 * hash) + ACTOR_TYPE_FIELD_NUMBER; + hash = (53 * hash) + actorType_; + hash = (37 * hash) + USER_ACTOR_EMAIL_FIELD_NUMBER; + hash = (53 * hash) + getUserActorEmail().hashCode(); + hash = (37 * hash) + CHANGES_FILTERED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getChangesFiltered()); + if (getChangesCount() > 0) { + hash = (37 * hash) + CHANGES_FIELD_NUMBER; + hash = (53 * hash) + getChangesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.ChangeHistoryEvent parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ChangeHistoryEvent 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.admin.v1beta.ChangeHistoryEvent parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ChangeHistoryEvent 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.admin.v1beta.ChangeHistoryEvent parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ChangeHistoryEvent parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.ChangeHistoryEvent parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ChangeHistoryEvent 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.admin.v1beta.ChangeHistoryEvent parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ChangeHistoryEvent 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.admin.v1beta.ChangeHistoryEvent parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ChangeHistoryEvent 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.admin.v1beta.ChangeHistoryEvent 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 set of changes within a Google Analytics account or its child properties
+   * that resulted from the same cause. Common causes would be updates made in the
+   * Google Analytics UI, changes from customer support, or automatic Google
+   * Analytics system changes.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.ChangeHistoryEvent} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.ChangeHistoryEvent) + com.google.analytics.admin.v1beta.ChangeHistoryEventOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_ChangeHistoryEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_ChangeHistoryEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.ChangeHistoryEvent.class, + com.google.analytics.admin.v1beta.ChangeHistoryEvent.Builder.class); + } + + // Construct using com.google.analytics.admin.v1beta.ChangeHistoryEvent.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getChangesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + id_ = ""; + + if (changeTimeBuilder_ == null) { + changeTime_ = null; + } else { + changeTime_ = null; + changeTimeBuilder_ = null; + } + actorType_ = 0; + + userActorEmail_ = ""; + + changesFiltered_ = false; + + if (changesBuilder_ == null) { + changes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + changesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_ChangeHistoryEvent_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ChangeHistoryEvent getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.ChangeHistoryEvent.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ChangeHistoryEvent build() { + com.google.analytics.admin.v1beta.ChangeHistoryEvent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ChangeHistoryEvent buildPartial() { + com.google.analytics.admin.v1beta.ChangeHistoryEvent result = + new com.google.analytics.admin.v1beta.ChangeHistoryEvent(this); + int from_bitField0_ = bitField0_; + result.id_ = id_; + if (changeTimeBuilder_ == null) { + result.changeTime_ = changeTime_; + } else { + result.changeTime_ = changeTimeBuilder_.build(); + } + result.actorType_ = actorType_; + result.userActorEmail_ = userActorEmail_; + result.changesFiltered_ = changesFiltered_; + if (changesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + changes_ = java.util.Collections.unmodifiableList(changes_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.changes_ = changes_; + } else { + result.changes_ = changesBuilder_.build(); + } + onBuilt(); + return result; + } + + @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.admin.v1beta.ChangeHistoryEvent) { + return mergeFrom((com.google.analytics.admin.v1beta.ChangeHistoryEvent) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1beta.ChangeHistoryEvent other) { + if (other == com.google.analytics.admin.v1beta.ChangeHistoryEvent.getDefaultInstance()) + return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + onChanged(); + } + if (other.hasChangeTime()) { + mergeChangeTime(other.getChangeTime()); + } + if (other.actorType_ != 0) { + setActorTypeValue(other.getActorTypeValue()); + } + if (!other.getUserActorEmail().isEmpty()) { + userActorEmail_ = other.userActorEmail_; + onChanged(); + } + if (other.getChangesFiltered() != false) { + setChangesFiltered(other.getChangesFiltered()); + } + if (changesBuilder_ == null) { + if (!other.changes_.isEmpty()) { + if (changes_.isEmpty()) { + changes_ = other.changes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureChangesIsMutable(); + changes_.addAll(other.changes_); + } + onChanged(); + } + } else { + if (!other.changes_.isEmpty()) { + if (changesBuilder_.isEmpty()) { + changesBuilder_.dispose(); + changesBuilder_ = null; + changes_ = other.changes_; + bitField0_ = (bitField0_ & ~0x00000001); + changesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getChangesFieldBuilder() + : null; + } else { + changesBuilder_.addAllMessages(other.changes_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.ChangeHistoryEvent parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.ChangeHistoryEvent) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + * + * + *
+     * ID of this change history event. This ID is unique across Google Analytics.
+     * 
+ * + * string id = 1; + * + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * ID of this change history event. This ID is unique across Google Analytics.
+     * 
+ * + * string id = 1; + * + * @return The bytes for id. + */ + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * ID of this change history event. This ID is unique across Google Analytics.
+     * 
+ * + * string id = 1; + * + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + id_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * ID of this change history event. This ID is unique across Google Analytics.
+     * 
+ * + * string id = 1; + * + * @return This builder for chaining. + */ + public Builder clearId() { + + id_ = getDefaultInstance().getId(); + onChanged(); + return this; + } + /** + * + * + *
+     * ID of this change history event. This ID is unique across Google Analytics.
+     * 
+ * + * string id = 1; + * + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + id_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp changeTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + changeTimeBuilder_; + /** + * + * + *
+     * Time when change was made.
+     * 
+ * + * .google.protobuf.Timestamp change_time = 2; + * + * @return Whether the changeTime field is set. + */ + public boolean hasChangeTime() { + return changeTimeBuilder_ != null || changeTime_ != null; + } + /** + * + * + *
+     * Time when change was made.
+     * 
+ * + * .google.protobuf.Timestamp change_time = 2; + * + * @return The changeTime. + */ + public com.google.protobuf.Timestamp getChangeTime() { + if (changeTimeBuilder_ == null) { + return changeTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : changeTime_; + } else { + return changeTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Time when change was made.
+     * 
+ * + * .google.protobuf.Timestamp change_time = 2; + */ + public Builder setChangeTime(com.google.protobuf.Timestamp value) { + if (changeTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + changeTime_ = value; + onChanged(); + } else { + changeTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Time when change was made.
+     * 
+ * + * .google.protobuf.Timestamp change_time = 2; + */ + public Builder setChangeTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (changeTimeBuilder_ == null) { + changeTime_ = builderForValue.build(); + onChanged(); + } else { + changeTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Time when change was made.
+     * 
+ * + * .google.protobuf.Timestamp change_time = 2; + */ + public Builder mergeChangeTime(com.google.protobuf.Timestamp value) { + if (changeTimeBuilder_ == null) { + if (changeTime_ != null) { + changeTime_ = + com.google.protobuf.Timestamp.newBuilder(changeTime_).mergeFrom(value).buildPartial(); + } else { + changeTime_ = value; + } + onChanged(); + } else { + changeTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Time when change was made.
+     * 
+ * + * .google.protobuf.Timestamp change_time = 2; + */ + public Builder clearChangeTime() { + if (changeTimeBuilder_ == null) { + changeTime_ = null; + onChanged(); + } else { + changeTime_ = null; + changeTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Time when change was made.
+     * 
+ * + * .google.protobuf.Timestamp change_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getChangeTimeBuilder() { + + onChanged(); + return getChangeTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Time when change was made.
+     * 
+ * + * .google.protobuf.Timestamp change_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getChangeTimeOrBuilder() { + if (changeTimeBuilder_ != null) { + return changeTimeBuilder_.getMessageOrBuilder(); + } else { + return changeTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : changeTime_; + } + } + /** + * + * + *
+     * Time when change was made.
+     * 
+ * + * .google.protobuf.Timestamp change_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getChangeTimeFieldBuilder() { + if (changeTimeBuilder_ == null) { + changeTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getChangeTime(), getParentForChildren(), isClean()); + changeTime_ = null; + } + return changeTimeBuilder_; + } + + private int actorType_ = 0; + /** + * + * + *
+     * The type of actor that made this change.
+     * 
+ * + * .google.analytics.admin.v1beta.ActorType actor_type = 3; + * + * @return The enum numeric value on the wire for actorType. + */ + @java.lang.Override + public int getActorTypeValue() { + return actorType_; + } + /** + * + * + *
+     * The type of actor that made this change.
+     * 
+ * + * .google.analytics.admin.v1beta.ActorType actor_type = 3; + * + * @param value The enum numeric value on the wire for actorType to set. + * @return This builder for chaining. + */ + public Builder setActorTypeValue(int value) { + + actorType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The type of actor that made this change.
+     * 
+ * + * .google.analytics.admin.v1beta.ActorType actor_type = 3; + * + * @return The actorType. + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.ActorType getActorType() { + @SuppressWarnings("deprecation") + com.google.analytics.admin.v1beta.ActorType result = + com.google.analytics.admin.v1beta.ActorType.valueOf(actorType_); + return result == null ? com.google.analytics.admin.v1beta.ActorType.UNRECOGNIZED : result; + } + /** + * + * + *
+     * The type of actor that made this change.
+     * 
+ * + * .google.analytics.admin.v1beta.ActorType actor_type = 3; + * + * @param value The actorType to set. + * @return This builder for chaining. + */ + public Builder setActorType(com.google.analytics.admin.v1beta.ActorType value) { + if (value == null) { + throw new NullPointerException(); + } + + actorType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The type of actor that made this change.
+     * 
+ * + * .google.analytics.admin.v1beta.ActorType actor_type = 3; + * + * @return This builder for chaining. + */ + public Builder clearActorType() { + + actorType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object userActorEmail_ = ""; + /** + * + * + *
+     * Email address of the Google account that made the change. This will be a
+     * valid email address if the actor field is set to USER, and empty otherwise.
+     * Google accounts that have been deleted will cause an error.
+     * 
+ * + * string user_actor_email = 4; + * + * @return The userActorEmail. + */ + public java.lang.String getUserActorEmail() { + java.lang.Object ref = userActorEmail_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userActorEmail_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Email address of the Google account that made the change. This will be a
+     * valid email address if the actor field is set to USER, and empty otherwise.
+     * Google accounts that have been deleted will cause an error.
+     * 
+ * + * string user_actor_email = 4; + * + * @return The bytes for userActorEmail. + */ + public com.google.protobuf.ByteString getUserActorEmailBytes() { + java.lang.Object ref = userActorEmail_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userActorEmail_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Email address of the Google account that made the change. This will be a
+     * valid email address if the actor field is set to USER, and empty otherwise.
+     * Google accounts that have been deleted will cause an error.
+     * 
+ * + * string user_actor_email = 4; + * + * @param value The userActorEmail to set. + * @return This builder for chaining. + */ + public Builder setUserActorEmail(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + userActorEmail_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Email address of the Google account that made the change. This will be a
+     * valid email address if the actor field is set to USER, and empty otherwise.
+     * Google accounts that have been deleted will cause an error.
+     * 
+ * + * string user_actor_email = 4; + * + * @return This builder for chaining. + */ + public Builder clearUserActorEmail() { + + userActorEmail_ = getDefaultInstance().getUserActorEmail(); + onChanged(); + return this; + } + /** + * + * + *
+     * Email address of the Google account that made the change. This will be a
+     * valid email address if the actor field is set to USER, and empty otherwise.
+     * Google accounts that have been deleted will cause an error.
+     * 
+ * + * string user_actor_email = 4; + * + * @param value The bytes for userActorEmail to set. + * @return This builder for chaining. + */ + public Builder setUserActorEmailBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + userActorEmail_ = value; + onChanged(); + return this; + } + + private boolean changesFiltered_; + /** + * + * + *
+     * If true, then the list of changes returned was filtered, and does not
+     * represent all changes that occurred in this event.
+     * 
+ * + * bool changes_filtered = 5; + * + * @return The changesFiltered. + */ + @java.lang.Override + public boolean getChangesFiltered() { + return changesFiltered_; + } + /** + * + * + *
+     * If true, then the list of changes returned was filtered, and does not
+     * represent all changes that occurred in this event.
+     * 
+ * + * bool changes_filtered = 5; + * + * @param value The changesFiltered to set. + * @return This builder for chaining. + */ + public Builder setChangesFiltered(boolean value) { + + changesFiltered_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If true, then the list of changes returned was filtered, and does not
+     * represent all changes that occurred in this event.
+     * 
+ * + * bool changes_filtered = 5; + * + * @return This builder for chaining. + */ + public Builder clearChangesFiltered() { + + changesFiltered_ = false; + onChanged(); + return this; + } + + private java.util.List changes_ = + java.util.Collections.emptyList(); + + private void ensureChangesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + changes_ = + new java.util.ArrayList( + changes_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.admin.v1beta.ChangeHistoryChange, + com.google.analytics.admin.v1beta.ChangeHistoryChange.Builder, + com.google.analytics.admin.v1beta.ChangeHistoryChangeOrBuilder> + changesBuilder_; + + /** + * + * + *
+     * A list of changes made in this change history event that fit the filters
+     * specified in SearchChangeHistoryEventsRequest.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.ChangeHistoryChange changes = 6; + */ + public java.util.List getChangesList() { + if (changesBuilder_ == null) { + return java.util.Collections.unmodifiableList(changes_); + } else { + return changesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of changes made in this change history event that fit the filters
+     * specified in SearchChangeHistoryEventsRequest.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.ChangeHistoryChange changes = 6; + */ + public int getChangesCount() { + if (changesBuilder_ == null) { + return changes_.size(); + } else { + return changesBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of changes made in this change history event that fit the filters
+     * specified in SearchChangeHistoryEventsRequest.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.ChangeHistoryChange changes = 6; + */ + public com.google.analytics.admin.v1beta.ChangeHistoryChange getChanges(int index) { + if (changesBuilder_ == null) { + return changes_.get(index); + } else { + return changesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of changes made in this change history event that fit the filters
+     * specified in SearchChangeHistoryEventsRequest.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.ChangeHistoryChange changes = 6; + */ + public Builder setChanges( + int index, com.google.analytics.admin.v1beta.ChangeHistoryChange value) { + if (changesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureChangesIsMutable(); + changes_.set(index, value); + onChanged(); + } else { + changesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of changes made in this change history event that fit the filters
+     * specified in SearchChangeHistoryEventsRequest.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.ChangeHistoryChange changes = 6; + */ + public Builder setChanges( + int index, com.google.analytics.admin.v1beta.ChangeHistoryChange.Builder builderForValue) { + if (changesBuilder_ == null) { + ensureChangesIsMutable(); + changes_.set(index, builderForValue.build()); + onChanged(); + } else { + changesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of changes made in this change history event that fit the filters
+     * specified in SearchChangeHistoryEventsRequest.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.ChangeHistoryChange changes = 6; + */ + public Builder addChanges(com.google.analytics.admin.v1beta.ChangeHistoryChange value) { + if (changesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureChangesIsMutable(); + changes_.add(value); + onChanged(); + } else { + changesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of changes made in this change history event that fit the filters
+     * specified in SearchChangeHistoryEventsRequest.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.ChangeHistoryChange changes = 6; + */ + public Builder addChanges( + int index, com.google.analytics.admin.v1beta.ChangeHistoryChange value) { + if (changesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureChangesIsMutable(); + changes_.add(index, value); + onChanged(); + } else { + changesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of changes made in this change history event that fit the filters
+     * specified in SearchChangeHistoryEventsRequest.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.ChangeHistoryChange changes = 6; + */ + public Builder addChanges( + com.google.analytics.admin.v1beta.ChangeHistoryChange.Builder builderForValue) { + if (changesBuilder_ == null) { + ensureChangesIsMutable(); + changes_.add(builderForValue.build()); + onChanged(); + } else { + changesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of changes made in this change history event that fit the filters
+     * specified in SearchChangeHistoryEventsRequest.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.ChangeHistoryChange changes = 6; + */ + public Builder addChanges( + int index, com.google.analytics.admin.v1beta.ChangeHistoryChange.Builder builderForValue) { + if (changesBuilder_ == null) { + ensureChangesIsMutable(); + changes_.add(index, builderForValue.build()); + onChanged(); + } else { + changesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of changes made in this change history event that fit the filters
+     * specified in SearchChangeHistoryEventsRequest.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.ChangeHistoryChange changes = 6; + */ + public Builder addAllChanges( + java.lang.Iterable + values) { + if (changesBuilder_ == null) { + ensureChangesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, changes_); + onChanged(); + } else { + changesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of changes made in this change history event that fit the filters
+     * specified in SearchChangeHistoryEventsRequest.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.ChangeHistoryChange changes = 6; + */ + public Builder clearChanges() { + if (changesBuilder_ == null) { + changes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + changesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of changes made in this change history event that fit the filters
+     * specified in SearchChangeHistoryEventsRequest.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.ChangeHistoryChange changes = 6; + */ + public Builder removeChanges(int index) { + if (changesBuilder_ == null) { + ensureChangesIsMutable(); + changes_.remove(index); + onChanged(); + } else { + changesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of changes made in this change history event that fit the filters
+     * specified in SearchChangeHistoryEventsRequest.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.ChangeHistoryChange changes = 6; + */ + public com.google.analytics.admin.v1beta.ChangeHistoryChange.Builder getChangesBuilder( + int index) { + return getChangesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of changes made in this change history event that fit the filters
+     * specified in SearchChangeHistoryEventsRequest.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.ChangeHistoryChange changes = 6; + */ + public com.google.analytics.admin.v1beta.ChangeHistoryChangeOrBuilder getChangesOrBuilder( + int index) { + if (changesBuilder_ == null) { + return changes_.get(index); + } else { + return changesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of changes made in this change history event that fit the filters
+     * specified in SearchChangeHistoryEventsRequest.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.ChangeHistoryChange changes = 6; + */ + public java.util.List + getChangesOrBuilderList() { + if (changesBuilder_ != null) { + return changesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(changes_); + } + } + /** + * + * + *
+     * A list of changes made in this change history event that fit the filters
+     * specified in SearchChangeHistoryEventsRequest.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.ChangeHistoryChange changes = 6; + */ + public com.google.analytics.admin.v1beta.ChangeHistoryChange.Builder addChangesBuilder() { + return getChangesFieldBuilder() + .addBuilder(com.google.analytics.admin.v1beta.ChangeHistoryChange.getDefaultInstance()); + } + /** + * + * + *
+     * A list of changes made in this change history event that fit the filters
+     * specified in SearchChangeHistoryEventsRequest.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.ChangeHistoryChange changes = 6; + */ + public com.google.analytics.admin.v1beta.ChangeHistoryChange.Builder addChangesBuilder( + int index) { + return getChangesFieldBuilder() + .addBuilder( + index, com.google.analytics.admin.v1beta.ChangeHistoryChange.getDefaultInstance()); + } + /** + * + * + *
+     * A list of changes made in this change history event that fit the filters
+     * specified in SearchChangeHistoryEventsRequest.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.ChangeHistoryChange changes = 6; + */ + public java.util.List + getChangesBuilderList() { + return getChangesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.admin.v1beta.ChangeHistoryChange, + com.google.analytics.admin.v1beta.ChangeHistoryChange.Builder, + com.google.analytics.admin.v1beta.ChangeHistoryChangeOrBuilder> + getChangesFieldBuilder() { + if (changesBuilder_ == null) { + changesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.admin.v1beta.ChangeHistoryChange, + com.google.analytics.admin.v1beta.ChangeHistoryChange.Builder, + com.google.analytics.admin.v1beta.ChangeHistoryChangeOrBuilder>( + changes_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + changes_ = null; + } + return changesBuilder_; + } + + @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.admin.v1beta.ChangeHistoryEvent) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.ChangeHistoryEvent) + private static final com.google.analytics.admin.v1beta.ChangeHistoryEvent DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.ChangeHistoryEvent(); + } + + public static com.google.analytics.admin.v1beta.ChangeHistoryEvent getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ChangeHistoryEvent parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ChangeHistoryEvent(input, extensionRegistry); + } + }; + + 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.admin.v1beta.ChangeHistoryEvent getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ChangeHistoryEventOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ChangeHistoryEventOrBuilder.java new file mode 100644 index 000000000000..542dfc9e69b0 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ChangeHistoryEventOrBuilder.java @@ -0,0 +1,210 @@ +/* + * Copyright 2020 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/admin/v1beta/resources.proto + +package com.google.analytics.admin.v1beta; + +public interface ChangeHistoryEventOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.ChangeHistoryEvent) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * ID of this change history event. This ID is unique across Google Analytics.
+   * 
+ * + * string id = 1; + * + * @return The id. + */ + java.lang.String getId(); + /** + * + * + *
+   * ID of this change history event. This ID is unique across Google Analytics.
+   * 
+ * + * string id = 1; + * + * @return The bytes for id. + */ + com.google.protobuf.ByteString getIdBytes(); + + /** + * + * + *
+   * Time when change was made.
+   * 
+ * + * .google.protobuf.Timestamp change_time = 2; + * + * @return Whether the changeTime field is set. + */ + boolean hasChangeTime(); + /** + * + * + *
+   * Time when change was made.
+   * 
+ * + * .google.protobuf.Timestamp change_time = 2; + * + * @return The changeTime. + */ + com.google.protobuf.Timestamp getChangeTime(); + /** + * + * + *
+   * Time when change was made.
+   * 
+ * + * .google.protobuf.Timestamp change_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getChangeTimeOrBuilder(); + + /** + * + * + *
+   * The type of actor that made this change.
+   * 
+ * + * .google.analytics.admin.v1beta.ActorType actor_type = 3; + * + * @return The enum numeric value on the wire for actorType. + */ + int getActorTypeValue(); + /** + * + * + *
+   * The type of actor that made this change.
+   * 
+ * + * .google.analytics.admin.v1beta.ActorType actor_type = 3; + * + * @return The actorType. + */ + com.google.analytics.admin.v1beta.ActorType getActorType(); + + /** + * + * + *
+   * Email address of the Google account that made the change. This will be a
+   * valid email address if the actor field is set to USER, and empty otherwise.
+   * Google accounts that have been deleted will cause an error.
+   * 
+ * + * string user_actor_email = 4; + * + * @return The userActorEmail. + */ + java.lang.String getUserActorEmail(); + /** + * + * + *
+   * Email address of the Google account that made the change. This will be a
+   * valid email address if the actor field is set to USER, and empty otherwise.
+   * Google accounts that have been deleted will cause an error.
+   * 
+ * + * string user_actor_email = 4; + * + * @return The bytes for userActorEmail. + */ + com.google.protobuf.ByteString getUserActorEmailBytes(); + + /** + * + * + *
+   * If true, then the list of changes returned was filtered, and does not
+   * represent all changes that occurred in this event.
+   * 
+ * + * bool changes_filtered = 5; + * + * @return The changesFiltered. + */ + boolean getChangesFiltered(); + + /** + * + * + *
+   * A list of changes made in this change history event that fit the filters
+   * specified in SearchChangeHistoryEventsRequest.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.ChangeHistoryChange changes = 6; + */ + java.util.List getChangesList(); + /** + * + * + *
+   * A list of changes made in this change history event that fit the filters
+   * specified in SearchChangeHistoryEventsRequest.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.ChangeHistoryChange changes = 6; + */ + com.google.analytics.admin.v1beta.ChangeHistoryChange getChanges(int index); + /** + * + * + *
+   * A list of changes made in this change history event that fit the filters
+   * specified in SearchChangeHistoryEventsRequest.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.ChangeHistoryChange changes = 6; + */ + int getChangesCount(); + /** + * + * + *
+   * A list of changes made in this change history event that fit the filters
+   * specified in SearchChangeHistoryEventsRequest.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.ChangeHistoryChange changes = 6; + */ + java.util.List + getChangesOrBuilderList(); + /** + * + * + *
+   * A list of changes made in this change history event that fit the filters
+   * specified in SearchChangeHistoryEventsRequest.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.ChangeHistoryChange changes = 6; + */ + com.google.analytics.admin.v1beta.ChangeHistoryChangeOrBuilder getChangesOrBuilder(int index); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ChangeHistoryResourceType.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ChangeHistoryResourceType.java new file mode 100644 index 000000000000..415fd23df7b8 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ChangeHistoryResourceType.java @@ -0,0 +1,399 @@ +/* + * Copyright 2020 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/admin/v1beta/resources.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * Types of resources whose changes may be returned from change history.
+ * 
+ * + * Protobuf enum {@code google.analytics.admin.v1beta.ChangeHistoryResourceType} + */ +public enum ChangeHistoryResourceType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Resource type unknown or not specified.
+   * 
+ * + * CHANGE_HISTORY_RESOURCE_TYPE_UNSPECIFIED = 0; + */ + CHANGE_HISTORY_RESOURCE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+   * Account resource
+   * 
+ * + * ACCOUNT = 1; + */ + ACCOUNT(1), + /** + * + * + *
+   * Property resource
+   * 
+ * + * PROPERTY = 2; + */ + PROPERTY(2), + /** + * + * + *
+   * FirebaseLink resource
+   * 
+ * + * FIREBASE_LINK = 6; + */ + FIREBASE_LINK(6), + /** + * + * + *
+   * GoogleAdsLink resource
+   * 
+ * + * GOOGLE_ADS_LINK = 7; + */ + GOOGLE_ADS_LINK(7), + /** + * + * + *
+   * GoogleSignalsSettings resource
+   * 
+ * + * GOOGLE_SIGNALS_SETTINGS = 8; + */ + GOOGLE_SIGNALS_SETTINGS(8), + /** + * + * + *
+   * ConversionEvent resource
+   * 
+ * + * CONVERSION_EVENT = 9; + */ + CONVERSION_EVENT(9), + /** + * + * + *
+   * MeasurementProtocolSecret resource
+   * 
+ * + * MEASUREMENT_PROTOCOL_SECRET = 10; + */ + MEASUREMENT_PROTOCOL_SECRET(10), + /** + * + * + *
+   * DataRetentionSettings resource
+   * 
+ * + * DATA_RETENTION_SETTINGS = 13; + */ + DATA_RETENTION_SETTINGS(13), + /** + * + * + *
+   * DisplayVideo360AdvertiserLink resource
+   * 
+ * + * DISPLAY_VIDEO_360_ADVERTISER_LINK = 14; + */ + DISPLAY_VIDEO_360_ADVERTISER_LINK(14), + /** + * + * + *
+   * DisplayVideo360AdvertiserLinkProposal resource
+   * 
+ * + * DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL = 15; + */ + DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL(15), + /** + * + * + *
+   * DataStream resource
+   * 
+ * + * DATA_STREAM = 18; + */ + DATA_STREAM(18), + /** + * + * + *
+   * AttributionSettings resource
+   * 
+ * + * ATTRIBUTION_SETTINGS = 20; + */ + ATTRIBUTION_SETTINGS(20), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Resource type unknown or not specified.
+   * 
+ * + * CHANGE_HISTORY_RESOURCE_TYPE_UNSPECIFIED = 0; + */ + public static final int CHANGE_HISTORY_RESOURCE_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Account resource
+   * 
+ * + * ACCOUNT = 1; + */ + public static final int ACCOUNT_VALUE = 1; + /** + * + * + *
+   * Property resource
+   * 
+ * + * PROPERTY = 2; + */ + public static final int PROPERTY_VALUE = 2; + /** + * + * + *
+   * FirebaseLink resource
+   * 
+ * + * FIREBASE_LINK = 6; + */ + public static final int FIREBASE_LINK_VALUE = 6; + /** + * + * + *
+   * GoogleAdsLink resource
+   * 
+ * + * GOOGLE_ADS_LINK = 7; + */ + public static final int GOOGLE_ADS_LINK_VALUE = 7; + /** + * + * + *
+   * GoogleSignalsSettings resource
+   * 
+ * + * GOOGLE_SIGNALS_SETTINGS = 8; + */ + public static final int GOOGLE_SIGNALS_SETTINGS_VALUE = 8; + /** + * + * + *
+   * ConversionEvent resource
+   * 
+ * + * CONVERSION_EVENT = 9; + */ + public static final int CONVERSION_EVENT_VALUE = 9; + /** + * + * + *
+   * MeasurementProtocolSecret resource
+   * 
+ * + * MEASUREMENT_PROTOCOL_SECRET = 10; + */ + public static final int MEASUREMENT_PROTOCOL_SECRET_VALUE = 10; + /** + * + * + *
+   * DataRetentionSettings resource
+   * 
+ * + * DATA_RETENTION_SETTINGS = 13; + */ + public static final int DATA_RETENTION_SETTINGS_VALUE = 13; + /** + * + * + *
+   * DisplayVideo360AdvertiserLink resource
+   * 
+ * + * DISPLAY_VIDEO_360_ADVERTISER_LINK = 14; + */ + public static final int DISPLAY_VIDEO_360_ADVERTISER_LINK_VALUE = 14; + /** + * + * + *
+   * DisplayVideo360AdvertiserLinkProposal resource
+   * 
+ * + * DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL = 15; + */ + public static final int DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL_VALUE = 15; + /** + * + * + *
+   * DataStream resource
+   * 
+ * + * DATA_STREAM = 18; + */ + public static final int DATA_STREAM_VALUE = 18; + /** + * + * + *
+   * AttributionSettings resource
+   * 
+ * + * ATTRIBUTION_SETTINGS = 20; + */ + public static final int ATTRIBUTION_SETTINGS_VALUE = 20; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ChangeHistoryResourceType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ChangeHistoryResourceType forNumber(int value) { + switch (value) { + case 0: + return CHANGE_HISTORY_RESOURCE_TYPE_UNSPECIFIED; + case 1: + return ACCOUNT; + case 2: + return PROPERTY; + case 6: + return FIREBASE_LINK; + case 7: + return GOOGLE_ADS_LINK; + case 8: + return GOOGLE_SIGNALS_SETTINGS; + case 9: + return CONVERSION_EVENT; + case 10: + return MEASUREMENT_PROTOCOL_SECRET; + case 13: + return DATA_RETENTION_SETTINGS; + case 14: + return DISPLAY_VIDEO_360_ADVERTISER_LINK; + case 15: + return DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL; + case 18: + return DATA_STREAM; + case 20: + return ATTRIBUTION_SETTINGS; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ChangeHistoryResourceType findValueByNumber(int number) { + return ChangeHistoryResourceType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.analytics.admin.v1beta.ResourcesProto.getDescriptor().getEnumTypes().get(4); + } + + private static final ChangeHistoryResourceType[] VALUES = values(); + + public static ChangeHistoryResourceType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ChangeHistoryResourceType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.analytics.admin.v1beta.ChangeHistoryResourceType) +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ConversionEvent.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ConversionEvent.java new file mode 100644 index 000000000000..65aa2e83d503 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ConversionEvent.java @@ -0,0 +1,1324 @@ +/* + * Copyright 2020 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/admin/v1beta/resources.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * A conversion event in a Google Analytics property.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.ConversionEvent} + */ +public final class ConversionEvent extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.ConversionEvent) + ConversionEventOrBuilder { + private static final long serialVersionUID = 0L; + // Use ConversionEvent.newBuilder() to construct. + private ConversionEvent(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ConversionEvent() { + name_ = ""; + eventName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ConversionEvent(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ConversionEvent( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + eventName_ = s; + break; + } + case 26: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 32: + { + deletable_ = input.readBool(); + break; + } + case 40: + { + custom_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_ConversionEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_ConversionEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.ConversionEvent.class, + com.google.analytics.admin.v1beta.ConversionEvent.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Output only. Resource name of this conversion event.
+   * Format: properties/{property}/conversionEvents/{conversion_event}
+   * 
+ * + * string name = 1 [(.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. Resource name of this conversion event.
+   * Format: properties/{property}/conversionEvents/{conversion_event}
+   * 
+ * + * string name = 1 [(.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 EVENT_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object eventName_; + /** + * + * + *
+   * Immutable. The event name for this conversion event.
+   * Examples: 'click', 'purchase'
+   * 
+ * + * string event_name = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The eventName. + */ + @java.lang.Override + public java.lang.String getEventName() { + java.lang.Object ref = eventName_; + 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(); + eventName_ = s; + return s; + } + } + /** + * + * + *
+   * Immutable. The event name for this conversion event.
+   * Examples: 'click', 'purchase'
+   * 
+ * + * string event_name = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for eventName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEventNameBytes() { + java.lang.Object ref = eventName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + eventName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Time when this conversion event was created in the property.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. Time when this conversion event was created in the property.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Time when this conversion event was created in the property.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int DELETABLE_FIELD_NUMBER = 4; + private boolean deletable_; + /** + * + * + *
+   * Output only. If set, this event can currently be deleted via DeleteConversionEvent.
+   * 
+ * + * bool deletable = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The deletable. + */ + @java.lang.Override + public boolean getDeletable() { + return deletable_; + } + + public static final int CUSTOM_FIELD_NUMBER = 5; + private boolean custom_; + /** + * + * + *
+   * Output only. If set to true, this conversion event refers to a custom event.  If set to
+   * false, this conversion event refers to a default event in GA. Default
+   * events typically have special meaning in GA. Default events are usually
+   * created for you by the GA system, but in some cases can be created by
+   * property admins. Custom events count towards the maximum number of
+   * custom conversion events that may be created per property.
+   * 
+ * + * bool custom = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The custom. + */ + @java.lang.Override + public boolean getCustom() { + return custom_; + } + + 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(eventName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, eventName_); + } + if (createTime_ != null) { + output.writeMessage(3, getCreateTime()); + } + if (deletable_ != false) { + output.writeBool(4, deletable_); + } + if (custom_ != false) { + output.writeBool(5, custom_); + } + unknownFields.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(eventName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, eventName_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCreateTime()); + } + if (deletable_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, deletable_); + } + if (custom_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, custom_); + } + size += unknownFields.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.admin.v1beta.ConversionEvent)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.ConversionEvent other = + (com.google.analytics.admin.v1beta.ConversionEvent) obj; + + if (!getName().equals(other.getName())) return false; + if (!getEventName().equals(other.getEventName())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (getDeletable() != other.getDeletable()) return false; + if (getCustom() != other.getCustom()) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + EVENT_NAME_FIELD_NUMBER; + hash = (53 * hash) + getEventName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + hash = (37 * hash) + DELETABLE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDeletable()); + hash = (37 * hash) + CUSTOM_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getCustom()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.ConversionEvent parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ConversionEvent 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.admin.v1beta.ConversionEvent parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ConversionEvent 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.admin.v1beta.ConversionEvent parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ConversionEvent parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.ConversionEvent parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ConversionEvent 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.admin.v1beta.ConversionEvent parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ConversionEvent 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.admin.v1beta.ConversionEvent parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ConversionEvent 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.admin.v1beta.ConversionEvent 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 conversion event in a Google Analytics property.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.ConversionEvent} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.ConversionEvent) + com.google.analytics.admin.v1beta.ConversionEventOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_ConversionEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_ConversionEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.ConversionEvent.class, + com.google.analytics.admin.v1beta.ConversionEvent.Builder.class); + } + + // Construct using com.google.analytics.admin.v1beta.ConversionEvent.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + eventName_ = ""; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + deletable_ = false; + + custom_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_ConversionEvent_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ConversionEvent getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.ConversionEvent.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ConversionEvent build() { + com.google.analytics.admin.v1beta.ConversionEvent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ConversionEvent buildPartial() { + com.google.analytics.admin.v1beta.ConversionEvent result = + new com.google.analytics.admin.v1beta.ConversionEvent(this); + result.name_ = name_; + result.eventName_ = eventName_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + result.deletable_ = deletable_; + result.custom_ = custom_; + onBuilt(); + return result; + } + + @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.admin.v1beta.ConversionEvent) { + return mergeFrom((com.google.analytics.admin.v1beta.ConversionEvent) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1beta.ConversionEvent other) { + if (other == com.google.analytics.admin.v1beta.ConversionEvent.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getEventName().isEmpty()) { + eventName_ = other.eventName_; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.getDeletable() != false) { + setDeletable(other.getDeletable()); + } + if (other.getCustom() != false) { + setCustom(other.getCustom()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.ConversionEvent parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.ConversionEvent) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. Resource name of this conversion event.
+     * Format: properties/{property}/conversionEvents/{conversion_event}
+     * 
+ * + * string name = 1 [(.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. Resource name of this conversion event.
+     * Format: properties/{property}/conversionEvents/{conversion_event}
+     * 
+ * + * string name = 1 [(.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. Resource name of this conversion event.
+     * Format: properties/{property}/conversionEvents/{conversion_event}
+     * 
+ * + * string name = 1 [(.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; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Resource name of this conversion event.
+     * Format: properties/{property}/conversionEvents/{conversion_event}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Resource name of this conversion event.
+     * Format: properties/{property}/conversionEvents/{conversion_event}
+     * 
+ * + * string name = 1 [(.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; + onChanged(); + return this; + } + + private java.lang.Object eventName_ = ""; + /** + * + * + *
+     * Immutable. The event name for this conversion event.
+     * Examples: 'click', 'purchase'
+     * 
+ * + * string event_name = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The eventName. + */ + public java.lang.String getEventName() { + java.lang.Object ref = eventName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + eventName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Immutable. The event name for this conversion event.
+     * Examples: 'click', 'purchase'
+     * 
+ * + * string event_name = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for eventName. + */ + public com.google.protobuf.ByteString getEventNameBytes() { + java.lang.Object ref = eventName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + eventName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Immutable. The event name for this conversion event.
+     * Examples: 'click', 'purchase'
+     * 
+ * + * string event_name = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The eventName to set. + * @return This builder for chaining. + */ + public Builder setEventName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + eventName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The event name for this conversion event.
+     * Examples: 'click', 'purchase'
+     * 
+ * + * string event_name = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearEventName() { + + eventName_ = getDefaultInstance().getEventName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The event name for this conversion event.
+     * Examples: 'click', 'purchase'
+     * 
+ * + * string event_name = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The bytes for eventName to set. + * @return This builder for chaining. + */ + public Builder setEventNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + eventName_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. Time when this conversion event was created in the property.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. Time when this conversion event was created in the property.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when this conversion event was created in the property.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when this conversion event was created in the property.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when this conversion event was created in the property.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when this conversion event was created in the property.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Time when this conversion event was created in the property.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when this conversion event was created in the property.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Time when this conversion event was created in the property.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private boolean deletable_; + /** + * + * + *
+     * Output only. If set, this event can currently be deleted via DeleteConversionEvent.
+     * 
+ * + * bool deletable = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The deletable. + */ + @java.lang.Override + public boolean getDeletable() { + return deletable_; + } + /** + * + * + *
+     * Output only. If set, this event can currently be deleted via DeleteConversionEvent.
+     * 
+ * + * bool deletable = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The deletable to set. + * @return This builder for chaining. + */ + public Builder setDeletable(boolean value) { + + deletable_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. If set, this event can currently be deleted via DeleteConversionEvent.
+     * 
+ * + * bool deletable = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearDeletable() { + + deletable_ = false; + onChanged(); + return this; + } + + private boolean custom_; + /** + * + * + *
+     * Output only. If set to true, this conversion event refers to a custom event.  If set to
+     * false, this conversion event refers to a default event in GA. Default
+     * events typically have special meaning in GA. Default events are usually
+     * created for you by the GA system, but in some cases can be created by
+     * property admins. Custom events count towards the maximum number of
+     * custom conversion events that may be created per property.
+     * 
+ * + * bool custom = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The custom. + */ + @java.lang.Override + public boolean getCustom() { + return custom_; + } + /** + * + * + *
+     * Output only. If set to true, this conversion event refers to a custom event.  If set to
+     * false, this conversion event refers to a default event in GA. Default
+     * events typically have special meaning in GA. Default events are usually
+     * created for you by the GA system, but in some cases can be created by
+     * property admins. Custom events count towards the maximum number of
+     * custom conversion events that may be created per property.
+     * 
+ * + * bool custom = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The custom to set. + * @return This builder for chaining. + */ + public Builder setCustom(boolean value) { + + custom_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. If set to true, this conversion event refers to a custom event.  If set to
+     * false, this conversion event refers to a default event in GA. Default
+     * events typically have special meaning in GA. Default events are usually
+     * created for you by the GA system, but in some cases can be created by
+     * property admins. Custom events count towards the maximum number of
+     * custom conversion events that may be created per property.
+     * 
+ * + * bool custom = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearCustom() { + + custom_ = false; + 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.admin.v1beta.ConversionEvent) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.ConversionEvent) + private static final com.google.analytics.admin.v1beta.ConversionEvent DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.ConversionEvent(); + } + + public static com.google.analytics.admin.v1beta.ConversionEvent getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ConversionEvent parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ConversionEvent(input, extensionRegistry); + } + }; + + 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.admin.v1beta.ConversionEvent getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ConversionEventName.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ConversionEventName.java new file mode 100644 index 000000000000..9704b3e6c63c --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ConversionEventName.java @@ -0,0 +1,198 @@ +/* + * Copyright 2022 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.admin.v1beta; + +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 ConversionEventName implements ResourceName { + private static final PathTemplate PROPERTY_CONVERSION_EVENT = + PathTemplate.createWithoutUrlEncoding( + "properties/{property}/conversionEvents/{conversion_event}"); + private volatile Map fieldValuesMap; + private final String property; + private final String conversionEvent; + + @Deprecated + protected ConversionEventName() { + property = null; + conversionEvent = null; + } + + private ConversionEventName(Builder builder) { + property = Preconditions.checkNotNull(builder.getProperty()); + conversionEvent = Preconditions.checkNotNull(builder.getConversionEvent()); + } + + public String getProperty() { + return property; + } + + public String getConversionEvent() { + return conversionEvent; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ConversionEventName of(String property, String conversionEvent) { + return newBuilder().setProperty(property).setConversionEvent(conversionEvent).build(); + } + + public static String format(String property, String conversionEvent) { + return newBuilder() + .setProperty(property) + .setConversionEvent(conversionEvent) + .build() + .toString(); + } + + public static ConversionEventName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROPERTY_CONVERSION_EVENT.validatedMatch( + formattedString, "ConversionEventName.parse: formattedString not in valid format"); + return of(matchMap.get("property"), matchMap.get("conversion_event")); + } + + 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 (ConversionEventName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROPERTY_CONVERSION_EVENT.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 (conversionEvent != null) { + fieldMapBuilder.put("conversion_event", conversionEvent); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROPERTY_CONVERSION_EVENT.instantiate( + "property", property, "conversion_event", conversionEvent); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + ConversionEventName that = ((ConversionEventName) o); + return Objects.equals(this.property, that.property) + && Objects.equals(this.conversionEvent, that.conversionEvent); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(property); + h *= 1000003; + h ^= Objects.hashCode(conversionEvent); + return h; + } + + /** Builder for properties/{property}/conversionEvents/{conversion_event}. */ + public static class Builder { + private String property; + private String conversionEvent; + + protected Builder() {} + + public String getProperty() { + return property; + } + + public String getConversionEvent() { + return conversionEvent; + } + + public Builder setProperty(String property) { + this.property = property; + return this; + } + + public Builder setConversionEvent(String conversionEvent) { + this.conversionEvent = conversionEvent; + return this; + } + + private Builder(ConversionEventName conversionEventName) { + this.property = conversionEventName.property; + this.conversionEvent = conversionEventName.conversionEvent; + } + + public ConversionEventName build() { + return new ConversionEventName(this); + } + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ConversionEventOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ConversionEventOrBuilder.java new file mode 100644 index 000000000000..8da7597900f1 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ConversionEventOrBuilder.java @@ -0,0 +1,148 @@ +/* + * Copyright 2020 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/admin/v1beta/resources.proto + +package com.google.analytics.admin.v1beta; + +public interface ConversionEventOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.ConversionEvent) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Resource name of this conversion event.
+   * Format: properties/{property}/conversionEvents/{conversion_event}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. Resource name of this conversion event.
+   * Format: properties/{property}/conversionEvents/{conversion_event}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Immutable. The event name for this conversion event.
+   * Examples: 'click', 'purchase'
+   * 
+ * + * string event_name = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The eventName. + */ + java.lang.String getEventName(); + /** + * + * + *
+   * Immutable. The event name for this conversion event.
+   * Examples: 'click', 'purchase'
+   * 
+ * + * string event_name = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for eventName. + */ + com.google.protobuf.ByteString getEventNameBytes(); + + /** + * + * + *
+   * Output only. Time when this conversion event was created in the property.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Time when this conversion event was created in the property.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Time when this conversion event was created in the property.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. If set, this event can currently be deleted via DeleteConversionEvent.
+   * 
+ * + * bool deletable = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The deletable. + */ + boolean getDeletable(); + + /** + * + * + *
+   * Output only. If set to true, this conversion event refers to a custom event.  If set to
+   * false, this conversion event refers to a default event in GA. Default
+   * events typically have special meaning in GA. Default events are usually
+   * created for you by the GA system, but in some cases can be created by
+   * property admins. Custom events count towards the maximum number of
+   * custom conversion events that may be created per property.
+   * 
+ * + * bool custom = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The custom. + */ + boolean getCustom(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CreateConversionEventRequest.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CreateConversionEventRequest.java new file mode 100644 index 000000000000..c27527ce39d3 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CreateConversionEventRequest.java @@ -0,0 +1,970 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * Request message for CreateConversionEvent RPC
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.CreateConversionEventRequest} + */ +public final class CreateConversionEventRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.CreateConversionEventRequest) + CreateConversionEventRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateConversionEventRequest.newBuilder() to construct. + private CreateConversionEventRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateConversionEventRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateConversionEventRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateConversionEventRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.analytics.admin.v1beta.ConversionEvent.Builder subBuilder = null; + if (conversionEvent_ != null) { + subBuilder = conversionEvent_.toBuilder(); + } + conversionEvent_ = + input.readMessage( + com.google.analytics.admin.v1beta.ConversionEvent.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(conversionEvent_); + conversionEvent_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_CreateConversionEventRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_CreateConversionEventRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.CreateConversionEventRequest.class, + com.google.analytics.admin.v1beta.CreateConversionEventRequest.Builder.class); + } + + public static final int CONVERSION_EVENT_FIELD_NUMBER = 1; + private com.google.analytics.admin.v1beta.ConversionEvent conversionEvent_; + /** + * + * + *
+   * Required. The conversion event to create.
+   * 
+ * + * + * .google.analytics.admin.v1beta.ConversionEvent conversion_event = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the conversionEvent field is set. + */ + @java.lang.Override + public boolean hasConversionEvent() { + return conversionEvent_ != null; + } + /** + * + * + *
+   * Required. The conversion event to create.
+   * 
+ * + * + * .google.analytics.admin.v1beta.ConversionEvent conversion_event = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The conversionEvent. + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.ConversionEvent getConversionEvent() { + return conversionEvent_ == null + ? com.google.analytics.admin.v1beta.ConversionEvent.getDefaultInstance() + : conversionEvent_; + } + /** + * + * + *
+   * Required. The conversion event to create.
+   * 
+ * + * + * .google.analytics.admin.v1beta.ConversionEvent conversion_event = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.ConversionEventOrBuilder getConversionEventOrBuilder() { + return getConversionEvent(); + } + + public static final int PARENT_FIELD_NUMBER = 2; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The resource name of the parent property where this conversion event will
+   * be created. Format: properties/123
+   * 
+ * + * + * string parent = 2 [(.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 resource name of the parent property where this conversion event will
+   * be created. Format: properties/123
+   * 
+ * + * + * string parent = 2 [(.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; + } + } + + 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 (conversionEvent_ != null) { + output.writeMessage(1, getConversionEvent()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, parent_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (conversionEvent_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getConversionEvent()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, parent_); + } + size += unknownFields.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.admin.v1beta.CreateConversionEventRequest)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.CreateConversionEventRequest other = + (com.google.analytics.admin.v1beta.CreateConversionEventRequest) obj; + + if (hasConversionEvent() != other.hasConversionEvent()) return false; + if (hasConversionEvent()) { + if (!getConversionEvent().equals(other.getConversionEvent())) return false; + } + if (!getParent().equals(other.getParent())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasConversionEvent()) { + hash = (37 * hash) + CONVERSION_EVENT_FIELD_NUMBER; + hash = (53 * hash) + getConversionEvent().hashCode(); + } + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.CreateConversionEventRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.CreateConversionEventRequest 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.admin.v1beta.CreateConversionEventRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.CreateConversionEventRequest 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.admin.v1beta.CreateConversionEventRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.CreateConversionEventRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.CreateConversionEventRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.CreateConversionEventRequest 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.admin.v1beta.CreateConversionEventRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.CreateConversionEventRequest 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.admin.v1beta.CreateConversionEventRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.CreateConversionEventRequest 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.admin.v1beta.CreateConversionEventRequest 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; + } + /** + * + * + *
+   * Request message for CreateConversionEvent RPC
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.CreateConversionEventRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.CreateConversionEventRequest) + com.google.analytics.admin.v1beta.CreateConversionEventRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_CreateConversionEventRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_CreateConversionEventRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.CreateConversionEventRequest.class, + com.google.analytics.admin.v1beta.CreateConversionEventRequest.Builder.class); + } + + // Construct using com.google.analytics.admin.v1beta.CreateConversionEventRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (conversionEventBuilder_ == null) { + conversionEvent_ = null; + } else { + conversionEvent_ = null; + conversionEventBuilder_ = null; + } + parent_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_CreateConversionEventRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.CreateConversionEventRequest + getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.CreateConversionEventRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.CreateConversionEventRequest build() { + com.google.analytics.admin.v1beta.CreateConversionEventRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.CreateConversionEventRequest buildPartial() { + com.google.analytics.admin.v1beta.CreateConversionEventRequest result = + new com.google.analytics.admin.v1beta.CreateConversionEventRequest(this); + if (conversionEventBuilder_ == null) { + result.conversionEvent_ = conversionEvent_; + } else { + result.conversionEvent_ = conversionEventBuilder_.build(); + } + result.parent_ = parent_; + onBuilt(); + return result; + } + + @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.admin.v1beta.CreateConversionEventRequest) { + return mergeFrom((com.google.analytics.admin.v1beta.CreateConversionEventRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1beta.CreateConversionEventRequest other) { + if (other + == com.google.analytics.admin.v1beta.CreateConversionEventRequest.getDefaultInstance()) + return this; + if (other.hasConversionEvent()) { + mergeConversionEvent(other.getConversionEvent()); + } + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.CreateConversionEventRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.CreateConversionEventRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.analytics.admin.v1beta.ConversionEvent conversionEvent_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.ConversionEvent, + com.google.analytics.admin.v1beta.ConversionEvent.Builder, + com.google.analytics.admin.v1beta.ConversionEventOrBuilder> + conversionEventBuilder_; + /** + * + * + *
+     * Required. The conversion event to create.
+     * 
+ * + * + * .google.analytics.admin.v1beta.ConversionEvent conversion_event = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the conversionEvent field is set. + */ + public boolean hasConversionEvent() { + return conversionEventBuilder_ != null || conversionEvent_ != null; + } + /** + * + * + *
+     * Required. The conversion event to create.
+     * 
+ * + * + * .google.analytics.admin.v1beta.ConversionEvent conversion_event = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The conversionEvent. + */ + public com.google.analytics.admin.v1beta.ConversionEvent getConversionEvent() { + if (conversionEventBuilder_ == null) { + return conversionEvent_ == null + ? com.google.analytics.admin.v1beta.ConversionEvent.getDefaultInstance() + : conversionEvent_; + } else { + return conversionEventBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The conversion event to create.
+     * 
+ * + * + * .google.analytics.admin.v1beta.ConversionEvent conversion_event = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setConversionEvent(com.google.analytics.admin.v1beta.ConversionEvent value) { + if (conversionEventBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + conversionEvent_ = value; + onChanged(); + } else { + conversionEventBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The conversion event to create.
+     * 
+ * + * + * .google.analytics.admin.v1beta.ConversionEvent conversion_event = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setConversionEvent( + com.google.analytics.admin.v1beta.ConversionEvent.Builder builderForValue) { + if (conversionEventBuilder_ == null) { + conversionEvent_ = builderForValue.build(); + onChanged(); + } else { + conversionEventBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The conversion event to create.
+     * 
+ * + * + * .google.analytics.admin.v1beta.ConversionEvent conversion_event = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeConversionEvent(com.google.analytics.admin.v1beta.ConversionEvent value) { + if (conversionEventBuilder_ == null) { + if (conversionEvent_ != null) { + conversionEvent_ = + com.google.analytics.admin.v1beta.ConversionEvent.newBuilder(conversionEvent_) + .mergeFrom(value) + .buildPartial(); + } else { + conversionEvent_ = value; + } + onChanged(); + } else { + conversionEventBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The conversion event to create.
+     * 
+ * + * + * .google.analytics.admin.v1beta.ConversionEvent conversion_event = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearConversionEvent() { + if (conversionEventBuilder_ == null) { + conversionEvent_ = null; + onChanged(); + } else { + conversionEvent_ = null; + conversionEventBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The conversion event to create.
+     * 
+ * + * + * .google.analytics.admin.v1beta.ConversionEvent conversion_event = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.analytics.admin.v1beta.ConversionEvent.Builder getConversionEventBuilder() { + + onChanged(); + return getConversionEventFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The conversion event to create.
+     * 
+ * + * + * .google.analytics.admin.v1beta.ConversionEvent conversion_event = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.analytics.admin.v1beta.ConversionEventOrBuilder + getConversionEventOrBuilder() { + if (conversionEventBuilder_ != null) { + return conversionEventBuilder_.getMessageOrBuilder(); + } else { + return conversionEvent_ == null + ? com.google.analytics.admin.v1beta.ConversionEvent.getDefaultInstance() + : conversionEvent_; + } + } + /** + * + * + *
+     * Required. The conversion event to create.
+     * 
+ * + * + * .google.analytics.admin.v1beta.ConversionEvent conversion_event = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.ConversionEvent, + com.google.analytics.admin.v1beta.ConversionEvent.Builder, + com.google.analytics.admin.v1beta.ConversionEventOrBuilder> + getConversionEventFieldBuilder() { + if (conversionEventBuilder_ == null) { + conversionEventBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.ConversionEvent, + com.google.analytics.admin.v1beta.ConversionEvent.Builder, + com.google.analytics.admin.v1beta.ConversionEventOrBuilder>( + getConversionEvent(), getParentForChildren(), isClean()); + conversionEvent_ = null; + } + return conversionEventBuilder_; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the parent property where this conversion event will
+     * be created. Format: properties/123
+     * 
+ * + * + * string parent = 2 [(.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 resource name of the parent property where this conversion event will
+     * be created. Format: properties/123
+     * 
+ * + * + * string parent = 2 [(.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 resource name of the parent property where this conversion event will
+     * be created. Format: properties/123
+     * 
+ * + * + * string parent = 2 [(.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; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the parent property where this conversion event will
+     * be created. Format: properties/123
+     * 
+ * + * + * string parent = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the parent property where this conversion event will
+     * be created. Format: properties/123
+     * 
+ * + * + * string parent = 2 [(.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; + 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.admin.v1beta.CreateConversionEventRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.CreateConversionEventRequest) + private static final com.google.analytics.admin.v1beta.CreateConversionEventRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.CreateConversionEventRequest(); + } + + public static com.google.analytics.admin.v1beta.CreateConversionEventRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateConversionEventRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateConversionEventRequest(input, extensionRegistry); + } + }; + + 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.admin.v1beta.CreateConversionEventRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CreateConversionEventRequestOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CreateConversionEventRequestOrBuilder.java new file mode 100644 index 000000000000..229978c52006 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CreateConversionEventRequestOrBuilder.java @@ -0,0 +1,97 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +public interface CreateConversionEventRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.CreateConversionEventRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The conversion event to create.
+   * 
+ * + * + * .google.analytics.admin.v1beta.ConversionEvent conversion_event = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the conversionEvent field is set. + */ + boolean hasConversionEvent(); + /** + * + * + *
+   * Required. The conversion event to create.
+   * 
+ * + * + * .google.analytics.admin.v1beta.ConversionEvent conversion_event = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The conversionEvent. + */ + com.google.analytics.admin.v1beta.ConversionEvent getConversionEvent(); + /** + * + * + *
+   * Required. The conversion event to create.
+   * 
+ * + * + * .google.analytics.admin.v1beta.ConversionEvent conversion_event = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.analytics.admin.v1beta.ConversionEventOrBuilder getConversionEventOrBuilder(); + + /** + * + * + *
+   * Required. The resource name of the parent property where this conversion event will
+   * be created. Format: properties/123
+   * 
+ * + * + * string parent = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the parent property where this conversion event will
+   * be created. Format: properties/123
+   * 
+ * + * + * string parent = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CreateCustomDimensionRequest.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CreateCustomDimensionRequest.java new file mode 100644 index 000000000000..70875a202bbe --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CreateCustomDimensionRequest.java @@ -0,0 +1,963 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * Request message for CreateCustomDimension RPC.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.CreateCustomDimensionRequest} + */ +public final class CreateCustomDimensionRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.CreateCustomDimensionRequest) + CreateCustomDimensionRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateCustomDimensionRequest.newBuilder() to construct. + private CreateCustomDimensionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateCustomDimensionRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateCustomDimensionRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateCustomDimensionRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + com.google.analytics.admin.v1beta.CustomDimension.Builder subBuilder = null; + if (customDimension_ != null) { + subBuilder = customDimension_.toBuilder(); + } + customDimension_ = + input.readMessage( + com.google.analytics.admin.v1beta.CustomDimension.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(customDimension_); + customDimension_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_CreateCustomDimensionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_CreateCustomDimensionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.CreateCustomDimensionRequest.class, + com.google.analytics.admin.v1beta.CreateCustomDimensionRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. Example format: properties/1234
+   * 
+ * + * + * 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. Example format: properties/1234
+   * 
+ * + * + * 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 CUSTOM_DIMENSION_FIELD_NUMBER = 2; + private com.google.analytics.admin.v1beta.CustomDimension customDimension_; + /** + * + * + *
+   * Required. The CustomDimension to create.
+   * 
+ * + * + * .google.analytics.admin.v1beta.CustomDimension custom_dimension = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the customDimension field is set. + */ + @java.lang.Override + public boolean hasCustomDimension() { + return customDimension_ != null; + } + /** + * + * + *
+   * Required. The CustomDimension to create.
+   * 
+ * + * + * .google.analytics.admin.v1beta.CustomDimension custom_dimension = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The customDimension. + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.CustomDimension getCustomDimension() { + return customDimension_ == null + ? com.google.analytics.admin.v1beta.CustomDimension.getDefaultInstance() + : customDimension_; + } + /** + * + * + *
+   * Required. The CustomDimension to create.
+   * 
+ * + * + * .google.analytics.admin.v1beta.CustomDimension custom_dimension = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.CustomDimensionOrBuilder getCustomDimensionOrBuilder() { + return getCustomDimension(); + } + + 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 (customDimension_ != null) { + output.writeMessage(2, getCustomDimension()); + } + unknownFields.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 (customDimension_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCustomDimension()); + } + size += unknownFields.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.admin.v1beta.CreateCustomDimensionRequest)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.CreateCustomDimensionRequest other = + (com.google.analytics.admin.v1beta.CreateCustomDimensionRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasCustomDimension() != other.hasCustomDimension()) return false; + if (hasCustomDimension()) { + if (!getCustomDimension().equals(other.getCustomDimension())) return false; + } + if (!unknownFields.equals(other.unknownFields)) 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 (hasCustomDimension()) { + hash = (37 * hash) + CUSTOM_DIMENSION_FIELD_NUMBER; + hash = (53 * hash) + getCustomDimension().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.CreateCustomDimensionRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.CreateCustomDimensionRequest 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.admin.v1beta.CreateCustomDimensionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.CreateCustomDimensionRequest 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.admin.v1beta.CreateCustomDimensionRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.CreateCustomDimensionRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.CreateCustomDimensionRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.CreateCustomDimensionRequest 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.admin.v1beta.CreateCustomDimensionRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.CreateCustomDimensionRequest 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.admin.v1beta.CreateCustomDimensionRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.CreateCustomDimensionRequest 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.admin.v1beta.CreateCustomDimensionRequest 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; + } + /** + * + * + *
+   * Request message for CreateCustomDimension RPC.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.CreateCustomDimensionRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.CreateCustomDimensionRequest) + com.google.analytics.admin.v1beta.CreateCustomDimensionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_CreateCustomDimensionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_CreateCustomDimensionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.CreateCustomDimensionRequest.class, + com.google.analytics.admin.v1beta.CreateCustomDimensionRequest.Builder.class); + } + + // Construct using com.google.analytics.admin.v1beta.CreateCustomDimensionRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (customDimensionBuilder_ == null) { + customDimension_ = null; + } else { + customDimension_ = null; + customDimensionBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_CreateCustomDimensionRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.CreateCustomDimensionRequest + getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.CreateCustomDimensionRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.CreateCustomDimensionRequest build() { + com.google.analytics.admin.v1beta.CreateCustomDimensionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.CreateCustomDimensionRequest buildPartial() { + com.google.analytics.admin.v1beta.CreateCustomDimensionRequest result = + new com.google.analytics.admin.v1beta.CreateCustomDimensionRequest(this); + result.parent_ = parent_; + if (customDimensionBuilder_ == null) { + result.customDimension_ = customDimension_; + } else { + result.customDimension_ = customDimensionBuilder_.build(); + } + onBuilt(); + return result; + } + + @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.admin.v1beta.CreateCustomDimensionRequest) { + return mergeFrom((com.google.analytics.admin.v1beta.CreateCustomDimensionRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1beta.CreateCustomDimensionRequest other) { + if (other + == com.google.analytics.admin.v1beta.CreateCustomDimensionRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasCustomDimension()) { + mergeCustomDimension(other.getCustomDimension()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.CreateCustomDimensionRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.CreateCustomDimensionRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Example format: properties/1234
+     * 
+ * + * + * 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. Example format: properties/1234
+     * 
+ * + * + * 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. Example format: properties/1234
+     * 
+ * + * + * 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; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Example format: properties/1234
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Example format: properties/1234
+     * 
+ * + * + * 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; + onChanged(); + return this; + } + + private com.google.analytics.admin.v1beta.CustomDimension customDimension_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.CustomDimension, + com.google.analytics.admin.v1beta.CustomDimension.Builder, + com.google.analytics.admin.v1beta.CustomDimensionOrBuilder> + customDimensionBuilder_; + /** + * + * + *
+     * Required. The CustomDimension to create.
+     * 
+ * + * + * .google.analytics.admin.v1beta.CustomDimension custom_dimension = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the customDimension field is set. + */ + public boolean hasCustomDimension() { + return customDimensionBuilder_ != null || customDimension_ != null; + } + /** + * + * + *
+     * Required. The CustomDimension to create.
+     * 
+ * + * + * .google.analytics.admin.v1beta.CustomDimension custom_dimension = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The customDimension. + */ + public com.google.analytics.admin.v1beta.CustomDimension getCustomDimension() { + if (customDimensionBuilder_ == null) { + return customDimension_ == null + ? com.google.analytics.admin.v1beta.CustomDimension.getDefaultInstance() + : customDimension_; + } else { + return customDimensionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The CustomDimension to create.
+     * 
+ * + * + * .google.analytics.admin.v1beta.CustomDimension custom_dimension = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCustomDimension(com.google.analytics.admin.v1beta.CustomDimension value) { + if (customDimensionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + customDimension_ = value; + onChanged(); + } else { + customDimensionBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The CustomDimension to create.
+     * 
+ * + * + * .google.analytics.admin.v1beta.CustomDimension custom_dimension = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCustomDimension( + com.google.analytics.admin.v1beta.CustomDimension.Builder builderForValue) { + if (customDimensionBuilder_ == null) { + customDimension_ = builderForValue.build(); + onChanged(); + } else { + customDimensionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The CustomDimension to create.
+     * 
+ * + * + * .google.analytics.admin.v1beta.CustomDimension custom_dimension = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeCustomDimension(com.google.analytics.admin.v1beta.CustomDimension value) { + if (customDimensionBuilder_ == null) { + if (customDimension_ != null) { + customDimension_ = + com.google.analytics.admin.v1beta.CustomDimension.newBuilder(customDimension_) + .mergeFrom(value) + .buildPartial(); + } else { + customDimension_ = value; + } + onChanged(); + } else { + customDimensionBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The CustomDimension to create.
+     * 
+ * + * + * .google.analytics.admin.v1beta.CustomDimension custom_dimension = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearCustomDimension() { + if (customDimensionBuilder_ == null) { + customDimension_ = null; + onChanged(); + } else { + customDimension_ = null; + customDimensionBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The CustomDimension to create.
+     * 
+ * + * + * .google.analytics.admin.v1beta.CustomDimension custom_dimension = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.analytics.admin.v1beta.CustomDimension.Builder getCustomDimensionBuilder() { + + onChanged(); + return getCustomDimensionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The CustomDimension to create.
+     * 
+ * + * + * .google.analytics.admin.v1beta.CustomDimension custom_dimension = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.analytics.admin.v1beta.CustomDimensionOrBuilder + getCustomDimensionOrBuilder() { + if (customDimensionBuilder_ != null) { + return customDimensionBuilder_.getMessageOrBuilder(); + } else { + return customDimension_ == null + ? com.google.analytics.admin.v1beta.CustomDimension.getDefaultInstance() + : customDimension_; + } + } + /** + * + * + *
+     * Required. The CustomDimension to create.
+     * 
+ * + * + * .google.analytics.admin.v1beta.CustomDimension custom_dimension = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.CustomDimension, + com.google.analytics.admin.v1beta.CustomDimension.Builder, + com.google.analytics.admin.v1beta.CustomDimensionOrBuilder> + getCustomDimensionFieldBuilder() { + if (customDimensionBuilder_ == null) { + customDimensionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.CustomDimension, + com.google.analytics.admin.v1beta.CustomDimension.Builder, + com.google.analytics.admin.v1beta.CustomDimensionOrBuilder>( + getCustomDimension(), getParentForChildren(), isClean()); + customDimension_ = null; + } + return customDimensionBuilder_; + } + + @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.admin.v1beta.CreateCustomDimensionRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.CreateCustomDimensionRequest) + private static final com.google.analytics.admin.v1beta.CreateCustomDimensionRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.CreateCustomDimensionRequest(); + } + + public static com.google.analytics.admin.v1beta.CreateCustomDimensionRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateCustomDimensionRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateCustomDimensionRequest(input, extensionRegistry); + } + }; + + 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.admin.v1beta.CreateCustomDimensionRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CreateCustomDimensionRequestOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CreateCustomDimensionRequestOrBuilder.java new file mode 100644 index 000000000000..429ebb190520 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CreateCustomDimensionRequestOrBuilder.java @@ -0,0 +1,95 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +public interface CreateCustomDimensionRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.CreateCustomDimensionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Example format: properties/1234
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Example format: properties/1234
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The CustomDimension to create.
+   * 
+ * + * + * .google.analytics.admin.v1beta.CustomDimension custom_dimension = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the customDimension field is set. + */ + boolean hasCustomDimension(); + /** + * + * + *
+   * Required. The CustomDimension to create.
+   * 
+ * + * + * .google.analytics.admin.v1beta.CustomDimension custom_dimension = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The customDimension. + */ + com.google.analytics.admin.v1beta.CustomDimension getCustomDimension(); + /** + * + * + *
+   * Required. The CustomDimension to create.
+   * 
+ * + * + * .google.analytics.admin.v1beta.CustomDimension custom_dimension = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.analytics.admin.v1beta.CustomDimensionOrBuilder getCustomDimensionOrBuilder(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CreateCustomMetricRequest.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CreateCustomMetricRequest.java new file mode 100644 index 000000000000..d6352220fb87 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CreateCustomMetricRequest.java @@ -0,0 +1,955 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * Request message for CreateCustomMetric RPC.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.CreateCustomMetricRequest} + */ +public final class CreateCustomMetricRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.CreateCustomMetricRequest) + CreateCustomMetricRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateCustomMetricRequest.newBuilder() to construct. + private CreateCustomMetricRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateCustomMetricRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateCustomMetricRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateCustomMetricRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + com.google.analytics.admin.v1beta.CustomMetric.Builder subBuilder = null; + if (customMetric_ != null) { + subBuilder = customMetric_.toBuilder(); + } + customMetric_ = + input.readMessage( + com.google.analytics.admin.v1beta.CustomMetric.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(customMetric_); + customMetric_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_CreateCustomMetricRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_CreateCustomMetricRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.CreateCustomMetricRequest.class, + com.google.analytics.admin.v1beta.CreateCustomMetricRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. Example format: properties/1234
+   * 
+ * + * + * 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. Example format: properties/1234
+   * 
+ * + * + * 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 CUSTOM_METRIC_FIELD_NUMBER = 2; + private com.google.analytics.admin.v1beta.CustomMetric customMetric_; + /** + * + * + *
+   * Required. The CustomMetric to create.
+   * 
+ * + * + * .google.analytics.admin.v1beta.CustomMetric custom_metric = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the customMetric field is set. + */ + @java.lang.Override + public boolean hasCustomMetric() { + return customMetric_ != null; + } + /** + * + * + *
+   * Required. The CustomMetric to create.
+   * 
+ * + * + * .google.analytics.admin.v1beta.CustomMetric custom_metric = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The customMetric. + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.CustomMetric getCustomMetric() { + return customMetric_ == null + ? com.google.analytics.admin.v1beta.CustomMetric.getDefaultInstance() + : customMetric_; + } + /** + * + * + *
+   * Required. The CustomMetric to create.
+   * 
+ * + * + * .google.analytics.admin.v1beta.CustomMetric custom_metric = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.CustomMetricOrBuilder getCustomMetricOrBuilder() { + return getCustomMetric(); + } + + 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 (customMetric_ != null) { + output.writeMessage(2, getCustomMetric()); + } + unknownFields.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 (customMetric_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCustomMetric()); + } + size += unknownFields.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.admin.v1beta.CreateCustomMetricRequest)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.CreateCustomMetricRequest other = + (com.google.analytics.admin.v1beta.CreateCustomMetricRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasCustomMetric() != other.hasCustomMetric()) return false; + if (hasCustomMetric()) { + if (!getCustomMetric().equals(other.getCustomMetric())) return false; + } + if (!unknownFields.equals(other.unknownFields)) 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 (hasCustomMetric()) { + hash = (37 * hash) + CUSTOM_METRIC_FIELD_NUMBER; + hash = (53 * hash) + getCustomMetric().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.CreateCustomMetricRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.CreateCustomMetricRequest 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.admin.v1beta.CreateCustomMetricRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.CreateCustomMetricRequest 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.admin.v1beta.CreateCustomMetricRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.CreateCustomMetricRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.CreateCustomMetricRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.CreateCustomMetricRequest 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.admin.v1beta.CreateCustomMetricRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.CreateCustomMetricRequest 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.admin.v1beta.CreateCustomMetricRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.CreateCustomMetricRequest 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.admin.v1beta.CreateCustomMetricRequest 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; + } + /** + * + * + *
+   * Request message for CreateCustomMetric RPC.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.CreateCustomMetricRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.CreateCustomMetricRequest) + com.google.analytics.admin.v1beta.CreateCustomMetricRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_CreateCustomMetricRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_CreateCustomMetricRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.CreateCustomMetricRequest.class, + com.google.analytics.admin.v1beta.CreateCustomMetricRequest.Builder.class); + } + + // Construct using com.google.analytics.admin.v1beta.CreateCustomMetricRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (customMetricBuilder_ == null) { + customMetric_ = null; + } else { + customMetric_ = null; + customMetricBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_CreateCustomMetricRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.CreateCustomMetricRequest getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.CreateCustomMetricRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.CreateCustomMetricRequest build() { + com.google.analytics.admin.v1beta.CreateCustomMetricRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.CreateCustomMetricRequest buildPartial() { + com.google.analytics.admin.v1beta.CreateCustomMetricRequest result = + new com.google.analytics.admin.v1beta.CreateCustomMetricRequest(this); + result.parent_ = parent_; + if (customMetricBuilder_ == null) { + result.customMetric_ = customMetric_; + } else { + result.customMetric_ = customMetricBuilder_.build(); + } + onBuilt(); + return result; + } + + @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.admin.v1beta.CreateCustomMetricRequest) { + return mergeFrom((com.google.analytics.admin.v1beta.CreateCustomMetricRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1beta.CreateCustomMetricRequest other) { + if (other == com.google.analytics.admin.v1beta.CreateCustomMetricRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasCustomMetric()) { + mergeCustomMetric(other.getCustomMetric()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.CreateCustomMetricRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.CreateCustomMetricRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Example format: properties/1234
+     * 
+ * + * + * 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. Example format: properties/1234
+     * 
+ * + * + * 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. Example format: properties/1234
+     * 
+ * + * + * 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; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Example format: properties/1234
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Example format: properties/1234
+     * 
+ * + * + * 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; + onChanged(); + return this; + } + + private com.google.analytics.admin.v1beta.CustomMetric customMetric_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.CustomMetric, + com.google.analytics.admin.v1beta.CustomMetric.Builder, + com.google.analytics.admin.v1beta.CustomMetricOrBuilder> + customMetricBuilder_; + /** + * + * + *
+     * Required. The CustomMetric to create.
+     * 
+ * + * + * .google.analytics.admin.v1beta.CustomMetric custom_metric = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the customMetric field is set. + */ + public boolean hasCustomMetric() { + return customMetricBuilder_ != null || customMetric_ != null; + } + /** + * + * + *
+     * Required. The CustomMetric to create.
+     * 
+ * + * + * .google.analytics.admin.v1beta.CustomMetric custom_metric = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The customMetric. + */ + public com.google.analytics.admin.v1beta.CustomMetric getCustomMetric() { + if (customMetricBuilder_ == null) { + return customMetric_ == null + ? com.google.analytics.admin.v1beta.CustomMetric.getDefaultInstance() + : customMetric_; + } else { + return customMetricBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The CustomMetric to create.
+     * 
+ * + * + * .google.analytics.admin.v1beta.CustomMetric custom_metric = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCustomMetric(com.google.analytics.admin.v1beta.CustomMetric value) { + if (customMetricBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + customMetric_ = value; + onChanged(); + } else { + customMetricBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The CustomMetric to create.
+     * 
+ * + * + * .google.analytics.admin.v1beta.CustomMetric custom_metric = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCustomMetric( + com.google.analytics.admin.v1beta.CustomMetric.Builder builderForValue) { + if (customMetricBuilder_ == null) { + customMetric_ = builderForValue.build(); + onChanged(); + } else { + customMetricBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The CustomMetric to create.
+     * 
+ * + * + * .google.analytics.admin.v1beta.CustomMetric custom_metric = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeCustomMetric(com.google.analytics.admin.v1beta.CustomMetric value) { + if (customMetricBuilder_ == null) { + if (customMetric_ != null) { + customMetric_ = + com.google.analytics.admin.v1beta.CustomMetric.newBuilder(customMetric_) + .mergeFrom(value) + .buildPartial(); + } else { + customMetric_ = value; + } + onChanged(); + } else { + customMetricBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The CustomMetric to create.
+     * 
+ * + * + * .google.analytics.admin.v1beta.CustomMetric custom_metric = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearCustomMetric() { + if (customMetricBuilder_ == null) { + customMetric_ = null; + onChanged(); + } else { + customMetric_ = null; + customMetricBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The CustomMetric to create.
+     * 
+ * + * + * .google.analytics.admin.v1beta.CustomMetric custom_metric = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.analytics.admin.v1beta.CustomMetric.Builder getCustomMetricBuilder() { + + onChanged(); + return getCustomMetricFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The CustomMetric to create.
+     * 
+ * + * + * .google.analytics.admin.v1beta.CustomMetric custom_metric = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.analytics.admin.v1beta.CustomMetricOrBuilder getCustomMetricOrBuilder() { + if (customMetricBuilder_ != null) { + return customMetricBuilder_.getMessageOrBuilder(); + } else { + return customMetric_ == null + ? com.google.analytics.admin.v1beta.CustomMetric.getDefaultInstance() + : customMetric_; + } + } + /** + * + * + *
+     * Required. The CustomMetric to create.
+     * 
+ * + * + * .google.analytics.admin.v1beta.CustomMetric custom_metric = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.CustomMetric, + com.google.analytics.admin.v1beta.CustomMetric.Builder, + com.google.analytics.admin.v1beta.CustomMetricOrBuilder> + getCustomMetricFieldBuilder() { + if (customMetricBuilder_ == null) { + customMetricBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.CustomMetric, + com.google.analytics.admin.v1beta.CustomMetric.Builder, + com.google.analytics.admin.v1beta.CustomMetricOrBuilder>( + getCustomMetric(), getParentForChildren(), isClean()); + customMetric_ = null; + } + return customMetricBuilder_; + } + + @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.admin.v1beta.CreateCustomMetricRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.CreateCustomMetricRequest) + private static final com.google.analytics.admin.v1beta.CreateCustomMetricRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.CreateCustomMetricRequest(); + } + + public static com.google.analytics.admin.v1beta.CreateCustomMetricRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateCustomMetricRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateCustomMetricRequest(input, extensionRegistry); + } + }; + + 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.admin.v1beta.CreateCustomMetricRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CreateCustomMetricRequestOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CreateCustomMetricRequestOrBuilder.java new file mode 100644 index 000000000000..0dc1e8b8aef9 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CreateCustomMetricRequestOrBuilder.java @@ -0,0 +1,95 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +public interface CreateCustomMetricRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.CreateCustomMetricRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Example format: properties/1234
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Example format: properties/1234
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The CustomMetric to create.
+   * 
+ * + * + * .google.analytics.admin.v1beta.CustomMetric custom_metric = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the customMetric field is set. + */ + boolean hasCustomMetric(); + /** + * + * + *
+   * Required. The CustomMetric to create.
+   * 
+ * + * + * .google.analytics.admin.v1beta.CustomMetric custom_metric = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The customMetric. + */ + com.google.analytics.admin.v1beta.CustomMetric getCustomMetric(); + /** + * + * + *
+   * Required. The CustomMetric to create.
+   * 
+ * + * + * .google.analytics.admin.v1beta.CustomMetric custom_metric = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.analytics.admin.v1beta.CustomMetricOrBuilder getCustomMetricOrBuilder(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CreateDataStreamRequest.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CreateDataStreamRequest.java new file mode 100644 index 000000000000..01aa0d54375f --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CreateDataStreamRequest.java @@ -0,0 +1,955 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * Request message for CreateDataStream RPC.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.CreateDataStreamRequest} + */ +public final class CreateDataStreamRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.CreateDataStreamRequest) + CreateDataStreamRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateDataStreamRequest.newBuilder() to construct. + private CreateDataStreamRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateDataStreamRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateDataStreamRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateDataStreamRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + com.google.analytics.admin.v1beta.DataStream.Builder subBuilder = null; + if (dataStream_ != null) { + subBuilder = dataStream_.toBuilder(); + } + dataStream_ = + input.readMessage( + com.google.analytics.admin.v1beta.DataStream.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(dataStream_); + dataStream_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_CreateDataStreamRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_CreateDataStreamRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.CreateDataStreamRequest.class, + com.google.analytics.admin.v1beta.CreateDataStreamRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. Example format: properties/1234
+   * 
+ * + * + * 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. Example format: properties/1234
+   * 
+ * + * + * 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 DATA_STREAM_FIELD_NUMBER = 2; + private com.google.analytics.admin.v1beta.DataStream dataStream_; + /** + * + * + *
+   * Required. The DataStream to create.
+   * 
+ * + * + * .google.analytics.admin.v1beta.DataStream data_stream = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dataStream field is set. + */ + @java.lang.Override + public boolean hasDataStream() { + return dataStream_ != null; + } + /** + * + * + *
+   * Required. The DataStream to create.
+   * 
+ * + * + * .google.analytics.admin.v1beta.DataStream data_stream = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dataStream. + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.DataStream getDataStream() { + return dataStream_ == null + ? com.google.analytics.admin.v1beta.DataStream.getDefaultInstance() + : dataStream_; + } + /** + * + * + *
+   * Required. The DataStream to create.
+   * 
+ * + * + * .google.analytics.admin.v1beta.DataStream data_stream = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.DataStreamOrBuilder getDataStreamOrBuilder() { + return getDataStream(); + } + + 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 (dataStream_ != null) { + output.writeMessage(2, getDataStream()); + } + unknownFields.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 (dataStream_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDataStream()); + } + size += unknownFields.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.admin.v1beta.CreateDataStreamRequest)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.CreateDataStreamRequest other = + (com.google.analytics.admin.v1beta.CreateDataStreamRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasDataStream() != other.hasDataStream()) return false; + if (hasDataStream()) { + if (!getDataStream().equals(other.getDataStream())) return false; + } + if (!unknownFields.equals(other.unknownFields)) 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 (hasDataStream()) { + hash = (37 * hash) + DATA_STREAM_FIELD_NUMBER; + hash = (53 * hash) + getDataStream().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.CreateDataStreamRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.CreateDataStreamRequest 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.admin.v1beta.CreateDataStreamRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.CreateDataStreamRequest 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.admin.v1beta.CreateDataStreamRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.CreateDataStreamRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.CreateDataStreamRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.CreateDataStreamRequest 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.admin.v1beta.CreateDataStreamRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.CreateDataStreamRequest 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.admin.v1beta.CreateDataStreamRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.CreateDataStreamRequest 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.admin.v1beta.CreateDataStreamRequest 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; + } + /** + * + * + *
+   * Request message for CreateDataStream RPC.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.CreateDataStreamRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.CreateDataStreamRequest) + com.google.analytics.admin.v1beta.CreateDataStreamRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_CreateDataStreamRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_CreateDataStreamRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.CreateDataStreamRequest.class, + com.google.analytics.admin.v1beta.CreateDataStreamRequest.Builder.class); + } + + // Construct using com.google.analytics.admin.v1beta.CreateDataStreamRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (dataStreamBuilder_ == null) { + dataStream_ = null; + } else { + dataStream_ = null; + dataStreamBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_CreateDataStreamRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.CreateDataStreamRequest getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.CreateDataStreamRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.CreateDataStreamRequest build() { + com.google.analytics.admin.v1beta.CreateDataStreamRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.CreateDataStreamRequest buildPartial() { + com.google.analytics.admin.v1beta.CreateDataStreamRequest result = + new com.google.analytics.admin.v1beta.CreateDataStreamRequest(this); + result.parent_ = parent_; + if (dataStreamBuilder_ == null) { + result.dataStream_ = dataStream_; + } else { + result.dataStream_ = dataStreamBuilder_.build(); + } + onBuilt(); + return result; + } + + @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.admin.v1beta.CreateDataStreamRequest) { + return mergeFrom((com.google.analytics.admin.v1beta.CreateDataStreamRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1beta.CreateDataStreamRequest other) { + if (other == com.google.analytics.admin.v1beta.CreateDataStreamRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasDataStream()) { + mergeDataStream(other.getDataStream()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.CreateDataStreamRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.CreateDataStreamRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Example format: properties/1234
+     * 
+ * + * + * 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. Example format: properties/1234
+     * 
+ * + * + * 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. Example format: properties/1234
+     * 
+ * + * + * 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; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Example format: properties/1234
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Example format: properties/1234
+     * 
+ * + * + * 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; + onChanged(); + return this; + } + + private com.google.analytics.admin.v1beta.DataStream dataStream_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.DataStream, + com.google.analytics.admin.v1beta.DataStream.Builder, + com.google.analytics.admin.v1beta.DataStreamOrBuilder> + dataStreamBuilder_; + /** + * + * + *
+     * Required. The DataStream to create.
+     * 
+ * + * + * .google.analytics.admin.v1beta.DataStream data_stream = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dataStream field is set. + */ + public boolean hasDataStream() { + return dataStreamBuilder_ != null || dataStream_ != null; + } + /** + * + * + *
+     * Required. The DataStream to create.
+     * 
+ * + * + * .google.analytics.admin.v1beta.DataStream data_stream = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dataStream. + */ + public com.google.analytics.admin.v1beta.DataStream getDataStream() { + if (dataStreamBuilder_ == null) { + return dataStream_ == null + ? com.google.analytics.admin.v1beta.DataStream.getDefaultInstance() + : dataStream_; + } else { + return dataStreamBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The DataStream to create.
+     * 
+ * + * + * .google.analytics.admin.v1beta.DataStream data_stream = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDataStream(com.google.analytics.admin.v1beta.DataStream value) { + if (dataStreamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dataStream_ = value; + onChanged(); + } else { + dataStreamBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The DataStream to create.
+     * 
+ * + * + * .google.analytics.admin.v1beta.DataStream data_stream = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDataStream( + com.google.analytics.admin.v1beta.DataStream.Builder builderForValue) { + if (dataStreamBuilder_ == null) { + dataStream_ = builderForValue.build(); + onChanged(); + } else { + dataStreamBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The DataStream to create.
+     * 
+ * + * + * .google.analytics.admin.v1beta.DataStream data_stream = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeDataStream(com.google.analytics.admin.v1beta.DataStream value) { + if (dataStreamBuilder_ == null) { + if (dataStream_ != null) { + dataStream_ = + com.google.analytics.admin.v1beta.DataStream.newBuilder(dataStream_) + .mergeFrom(value) + .buildPartial(); + } else { + dataStream_ = value; + } + onChanged(); + } else { + dataStreamBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The DataStream to create.
+     * 
+ * + * + * .google.analytics.admin.v1beta.DataStream data_stream = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearDataStream() { + if (dataStreamBuilder_ == null) { + dataStream_ = null; + onChanged(); + } else { + dataStream_ = null; + dataStreamBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The DataStream to create.
+     * 
+ * + * + * .google.analytics.admin.v1beta.DataStream data_stream = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.analytics.admin.v1beta.DataStream.Builder getDataStreamBuilder() { + + onChanged(); + return getDataStreamFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The DataStream to create.
+     * 
+ * + * + * .google.analytics.admin.v1beta.DataStream data_stream = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.analytics.admin.v1beta.DataStreamOrBuilder getDataStreamOrBuilder() { + if (dataStreamBuilder_ != null) { + return dataStreamBuilder_.getMessageOrBuilder(); + } else { + return dataStream_ == null + ? com.google.analytics.admin.v1beta.DataStream.getDefaultInstance() + : dataStream_; + } + } + /** + * + * + *
+     * Required. The DataStream to create.
+     * 
+ * + * + * .google.analytics.admin.v1beta.DataStream data_stream = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.DataStream, + com.google.analytics.admin.v1beta.DataStream.Builder, + com.google.analytics.admin.v1beta.DataStreamOrBuilder> + getDataStreamFieldBuilder() { + if (dataStreamBuilder_ == null) { + dataStreamBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.DataStream, + com.google.analytics.admin.v1beta.DataStream.Builder, + com.google.analytics.admin.v1beta.DataStreamOrBuilder>( + getDataStream(), getParentForChildren(), isClean()); + dataStream_ = null; + } + return dataStreamBuilder_; + } + + @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.admin.v1beta.CreateDataStreamRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.CreateDataStreamRequest) + private static final com.google.analytics.admin.v1beta.CreateDataStreamRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.CreateDataStreamRequest(); + } + + public static com.google.analytics.admin.v1beta.CreateDataStreamRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateDataStreamRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateDataStreamRequest(input, extensionRegistry); + } + }; + + 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.admin.v1beta.CreateDataStreamRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CreateDataStreamRequestOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CreateDataStreamRequestOrBuilder.java new file mode 100644 index 000000000000..3647940c0858 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CreateDataStreamRequestOrBuilder.java @@ -0,0 +1,95 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +public interface CreateDataStreamRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.CreateDataStreamRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Example format: properties/1234
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Example format: properties/1234
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The DataStream to create.
+   * 
+ * + * + * .google.analytics.admin.v1beta.DataStream data_stream = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dataStream field is set. + */ + boolean hasDataStream(); + /** + * + * + *
+   * Required. The DataStream to create.
+   * 
+ * + * + * .google.analytics.admin.v1beta.DataStream data_stream = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dataStream. + */ + com.google.analytics.admin.v1beta.DataStream getDataStream(); + /** + * + * + *
+   * Required. The DataStream to create.
+   * 
+ * + * + * .google.analytics.admin.v1beta.DataStream data_stream = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.analytics.admin.v1beta.DataStreamOrBuilder getDataStreamOrBuilder(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CreateFirebaseLinkRequest.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CreateFirebaseLinkRequest.java new file mode 100644 index 000000000000..301613fbef26 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CreateFirebaseLinkRequest.java @@ -0,0 +1,962 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * Request message for CreateFirebaseLink RPC
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.CreateFirebaseLinkRequest} + */ +public final class CreateFirebaseLinkRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.CreateFirebaseLinkRequest) + CreateFirebaseLinkRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateFirebaseLinkRequest.newBuilder() to construct. + private CreateFirebaseLinkRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateFirebaseLinkRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateFirebaseLinkRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateFirebaseLinkRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + com.google.analytics.admin.v1beta.FirebaseLink.Builder subBuilder = null; + if (firebaseLink_ != null) { + subBuilder = firebaseLink_.toBuilder(); + } + firebaseLink_ = + input.readMessage( + com.google.analytics.admin.v1beta.FirebaseLink.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(firebaseLink_); + firebaseLink_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_CreateFirebaseLinkRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_CreateFirebaseLinkRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.CreateFirebaseLinkRequest.class, + com.google.analytics.admin.v1beta.CreateFirebaseLinkRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. Format: properties/{property_id}
+   * Example: properties/1234
+   * 
+ * + * + * 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. Format: properties/{property_id}
+   * Example: properties/1234
+   * 
+ * + * + * 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 FIREBASE_LINK_FIELD_NUMBER = 2; + private com.google.analytics.admin.v1beta.FirebaseLink firebaseLink_; + /** + * + * + *
+   * Required. The Firebase link to create.
+   * 
+ * + * + * .google.analytics.admin.v1beta.FirebaseLink firebase_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the firebaseLink field is set. + */ + @java.lang.Override + public boolean hasFirebaseLink() { + return firebaseLink_ != null; + } + /** + * + * + *
+   * Required. The Firebase link to create.
+   * 
+ * + * + * .google.analytics.admin.v1beta.FirebaseLink firebase_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The firebaseLink. + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.FirebaseLink getFirebaseLink() { + return firebaseLink_ == null + ? com.google.analytics.admin.v1beta.FirebaseLink.getDefaultInstance() + : firebaseLink_; + } + /** + * + * + *
+   * Required. The Firebase link to create.
+   * 
+ * + * + * .google.analytics.admin.v1beta.FirebaseLink firebase_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.FirebaseLinkOrBuilder getFirebaseLinkOrBuilder() { + return getFirebaseLink(); + } + + 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 (firebaseLink_ != null) { + output.writeMessage(2, getFirebaseLink()); + } + unknownFields.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 (firebaseLink_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getFirebaseLink()); + } + size += unknownFields.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.admin.v1beta.CreateFirebaseLinkRequest)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.CreateFirebaseLinkRequest other = + (com.google.analytics.admin.v1beta.CreateFirebaseLinkRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasFirebaseLink() != other.hasFirebaseLink()) return false; + if (hasFirebaseLink()) { + if (!getFirebaseLink().equals(other.getFirebaseLink())) return false; + } + if (!unknownFields.equals(other.unknownFields)) 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 (hasFirebaseLink()) { + hash = (37 * hash) + FIREBASE_LINK_FIELD_NUMBER; + hash = (53 * hash) + getFirebaseLink().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.CreateFirebaseLinkRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.CreateFirebaseLinkRequest 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.admin.v1beta.CreateFirebaseLinkRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.CreateFirebaseLinkRequest 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.admin.v1beta.CreateFirebaseLinkRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.CreateFirebaseLinkRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.CreateFirebaseLinkRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.CreateFirebaseLinkRequest 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.admin.v1beta.CreateFirebaseLinkRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.CreateFirebaseLinkRequest 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.admin.v1beta.CreateFirebaseLinkRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.CreateFirebaseLinkRequest 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.admin.v1beta.CreateFirebaseLinkRequest 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; + } + /** + * + * + *
+   * Request message for CreateFirebaseLink RPC
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.CreateFirebaseLinkRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.CreateFirebaseLinkRequest) + com.google.analytics.admin.v1beta.CreateFirebaseLinkRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_CreateFirebaseLinkRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_CreateFirebaseLinkRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.CreateFirebaseLinkRequest.class, + com.google.analytics.admin.v1beta.CreateFirebaseLinkRequest.Builder.class); + } + + // Construct using com.google.analytics.admin.v1beta.CreateFirebaseLinkRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (firebaseLinkBuilder_ == null) { + firebaseLink_ = null; + } else { + firebaseLink_ = null; + firebaseLinkBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_CreateFirebaseLinkRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.CreateFirebaseLinkRequest getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.CreateFirebaseLinkRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.CreateFirebaseLinkRequest build() { + com.google.analytics.admin.v1beta.CreateFirebaseLinkRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.CreateFirebaseLinkRequest buildPartial() { + com.google.analytics.admin.v1beta.CreateFirebaseLinkRequest result = + new com.google.analytics.admin.v1beta.CreateFirebaseLinkRequest(this); + result.parent_ = parent_; + if (firebaseLinkBuilder_ == null) { + result.firebaseLink_ = firebaseLink_; + } else { + result.firebaseLink_ = firebaseLinkBuilder_.build(); + } + onBuilt(); + return result; + } + + @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.admin.v1beta.CreateFirebaseLinkRequest) { + return mergeFrom((com.google.analytics.admin.v1beta.CreateFirebaseLinkRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1beta.CreateFirebaseLinkRequest other) { + if (other == com.google.analytics.admin.v1beta.CreateFirebaseLinkRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasFirebaseLink()) { + mergeFirebaseLink(other.getFirebaseLink()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.CreateFirebaseLinkRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.CreateFirebaseLinkRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Format: properties/{property_id}
+     * Example: properties/1234
+     * 
+ * + * + * 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. Format: properties/{property_id}
+     * Example: properties/1234
+     * 
+ * + * + * 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. Format: properties/{property_id}
+     * Example: properties/1234
+     * 
+ * + * + * 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; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format: properties/{property_id}
+     * Example: properties/1234
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format: properties/{property_id}
+     * Example: properties/1234
+     * 
+ * + * + * 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; + onChanged(); + return this; + } + + private com.google.analytics.admin.v1beta.FirebaseLink firebaseLink_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.FirebaseLink, + com.google.analytics.admin.v1beta.FirebaseLink.Builder, + com.google.analytics.admin.v1beta.FirebaseLinkOrBuilder> + firebaseLinkBuilder_; + /** + * + * + *
+     * Required. The Firebase link to create.
+     * 
+ * + * + * .google.analytics.admin.v1beta.FirebaseLink firebase_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the firebaseLink field is set. + */ + public boolean hasFirebaseLink() { + return firebaseLinkBuilder_ != null || firebaseLink_ != null; + } + /** + * + * + *
+     * Required. The Firebase link to create.
+     * 
+ * + * + * .google.analytics.admin.v1beta.FirebaseLink firebase_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The firebaseLink. + */ + public com.google.analytics.admin.v1beta.FirebaseLink getFirebaseLink() { + if (firebaseLinkBuilder_ == null) { + return firebaseLink_ == null + ? com.google.analytics.admin.v1beta.FirebaseLink.getDefaultInstance() + : firebaseLink_; + } else { + return firebaseLinkBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The Firebase link to create.
+     * 
+ * + * + * .google.analytics.admin.v1beta.FirebaseLink firebase_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setFirebaseLink(com.google.analytics.admin.v1beta.FirebaseLink value) { + if (firebaseLinkBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + firebaseLink_ = value; + onChanged(); + } else { + firebaseLinkBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The Firebase link to create.
+     * 
+ * + * + * .google.analytics.admin.v1beta.FirebaseLink firebase_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setFirebaseLink( + com.google.analytics.admin.v1beta.FirebaseLink.Builder builderForValue) { + if (firebaseLinkBuilder_ == null) { + firebaseLink_ = builderForValue.build(); + onChanged(); + } else { + firebaseLinkBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The Firebase link to create.
+     * 
+ * + * + * .google.analytics.admin.v1beta.FirebaseLink firebase_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeFirebaseLink(com.google.analytics.admin.v1beta.FirebaseLink value) { + if (firebaseLinkBuilder_ == null) { + if (firebaseLink_ != null) { + firebaseLink_ = + com.google.analytics.admin.v1beta.FirebaseLink.newBuilder(firebaseLink_) + .mergeFrom(value) + .buildPartial(); + } else { + firebaseLink_ = value; + } + onChanged(); + } else { + firebaseLinkBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The Firebase link to create.
+     * 
+ * + * + * .google.analytics.admin.v1beta.FirebaseLink firebase_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearFirebaseLink() { + if (firebaseLinkBuilder_ == null) { + firebaseLink_ = null; + onChanged(); + } else { + firebaseLink_ = null; + firebaseLinkBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The Firebase link to create.
+     * 
+ * + * + * .google.analytics.admin.v1beta.FirebaseLink firebase_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.analytics.admin.v1beta.FirebaseLink.Builder getFirebaseLinkBuilder() { + + onChanged(); + return getFirebaseLinkFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The Firebase link to create.
+     * 
+ * + * + * .google.analytics.admin.v1beta.FirebaseLink firebase_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.analytics.admin.v1beta.FirebaseLinkOrBuilder getFirebaseLinkOrBuilder() { + if (firebaseLinkBuilder_ != null) { + return firebaseLinkBuilder_.getMessageOrBuilder(); + } else { + return firebaseLink_ == null + ? com.google.analytics.admin.v1beta.FirebaseLink.getDefaultInstance() + : firebaseLink_; + } + } + /** + * + * + *
+     * Required. The Firebase link to create.
+     * 
+ * + * + * .google.analytics.admin.v1beta.FirebaseLink firebase_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.FirebaseLink, + com.google.analytics.admin.v1beta.FirebaseLink.Builder, + com.google.analytics.admin.v1beta.FirebaseLinkOrBuilder> + getFirebaseLinkFieldBuilder() { + if (firebaseLinkBuilder_ == null) { + firebaseLinkBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.FirebaseLink, + com.google.analytics.admin.v1beta.FirebaseLink.Builder, + com.google.analytics.admin.v1beta.FirebaseLinkOrBuilder>( + getFirebaseLink(), getParentForChildren(), isClean()); + firebaseLink_ = null; + } + return firebaseLinkBuilder_; + } + + @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.admin.v1beta.CreateFirebaseLinkRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.CreateFirebaseLinkRequest) + private static final com.google.analytics.admin.v1beta.CreateFirebaseLinkRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.CreateFirebaseLinkRequest(); + } + + public static com.google.analytics.admin.v1beta.CreateFirebaseLinkRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateFirebaseLinkRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateFirebaseLinkRequest(input, extensionRegistry); + } + }; + + 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.admin.v1beta.CreateFirebaseLinkRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CreateFirebaseLinkRequestOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CreateFirebaseLinkRequestOrBuilder.java new file mode 100644 index 000000000000..48c15e4a6448 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CreateFirebaseLinkRequestOrBuilder.java @@ -0,0 +1,97 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +public interface CreateFirebaseLinkRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.CreateFirebaseLinkRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Format: properties/{property_id}
+   * Example: properties/1234
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Format: properties/{property_id}
+   * Example: properties/1234
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The Firebase link to create.
+   * 
+ * + * + * .google.analytics.admin.v1beta.FirebaseLink firebase_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the firebaseLink field is set. + */ + boolean hasFirebaseLink(); + /** + * + * + *
+   * Required. The Firebase link to create.
+   * 
+ * + * + * .google.analytics.admin.v1beta.FirebaseLink firebase_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The firebaseLink. + */ + com.google.analytics.admin.v1beta.FirebaseLink getFirebaseLink(); + /** + * + * + *
+   * Required. The Firebase link to create.
+   * 
+ * + * + * .google.analytics.admin.v1beta.FirebaseLink firebase_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.analytics.admin.v1beta.FirebaseLinkOrBuilder getFirebaseLinkOrBuilder(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CreateGoogleAdsLinkRequest.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CreateGoogleAdsLinkRequest.java new file mode 100644 index 000000000000..2b3026502c7a --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CreateGoogleAdsLinkRequest.java @@ -0,0 +1,958 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * Request message for CreateGoogleAdsLink RPC
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest} + */ +public final class CreateGoogleAdsLinkRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest) + CreateGoogleAdsLinkRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateGoogleAdsLinkRequest.newBuilder() to construct. + private CreateGoogleAdsLinkRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateGoogleAdsLinkRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateGoogleAdsLinkRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateGoogleAdsLinkRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + com.google.analytics.admin.v1beta.GoogleAdsLink.Builder subBuilder = null; + if (googleAdsLink_ != null) { + subBuilder = googleAdsLink_.toBuilder(); + } + googleAdsLink_ = + input.readMessage( + com.google.analytics.admin.v1beta.GoogleAdsLink.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(googleAdsLink_); + googleAdsLink_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_CreateGoogleAdsLinkRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_CreateGoogleAdsLinkRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest.class, + com.google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. Example format: properties/1234
+   * 
+ * + * + * 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. Example format: properties/1234
+   * 
+ * + * + * 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 GOOGLE_ADS_LINK_FIELD_NUMBER = 2; + private com.google.analytics.admin.v1beta.GoogleAdsLink googleAdsLink_; + /** + * + * + *
+   * Required. The GoogleAdsLink to create.
+   * 
+ * + * + * .google.analytics.admin.v1beta.GoogleAdsLink google_ads_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the googleAdsLink field is set. + */ + @java.lang.Override + public boolean hasGoogleAdsLink() { + return googleAdsLink_ != null; + } + /** + * + * + *
+   * Required. The GoogleAdsLink to create.
+   * 
+ * + * + * .google.analytics.admin.v1beta.GoogleAdsLink google_ads_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The googleAdsLink. + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.GoogleAdsLink getGoogleAdsLink() { + return googleAdsLink_ == null + ? com.google.analytics.admin.v1beta.GoogleAdsLink.getDefaultInstance() + : googleAdsLink_; + } + /** + * + * + *
+   * Required. The GoogleAdsLink to create.
+   * 
+ * + * + * .google.analytics.admin.v1beta.GoogleAdsLink google_ads_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.GoogleAdsLinkOrBuilder getGoogleAdsLinkOrBuilder() { + return getGoogleAdsLink(); + } + + 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 (googleAdsLink_ != null) { + output.writeMessage(2, getGoogleAdsLink()); + } + unknownFields.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 (googleAdsLink_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getGoogleAdsLink()); + } + size += unknownFields.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.admin.v1beta.CreateGoogleAdsLinkRequest)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest other = + (com.google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasGoogleAdsLink() != other.hasGoogleAdsLink()) return false; + if (hasGoogleAdsLink()) { + if (!getGoogleAdsLink().equals(other.getGoogleAdsLink())) return false; + } + if (!unknownFields.equals(other.unknownFields)) 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 (hasGoogleAdsLink()) { + hash = (37 * hash) + GOOGLE_ADS_LINK_FIELD_NUMBER; + hash = (53 * hash) + getGoogleAdsLink().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest 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.admin.v1beta.CreateGoogleAdsLinkRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest 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.admin.v1beta.CreateGoogleAdsLinkRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest 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.admin.v1beta.CreateGoogleAdsLinkRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest 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.admin.v1beta.CreateGoogleAdsLinkRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest 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.admin.v1beta.CreateGoogleAdsLinkRequest 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; + } + /** + * + * + *
+   * Request message for CreateGoogleAdsLink RPC
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest) + com.google.analytics.admin.v1beta.CreateGoogleAdsLinkRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_CreateGoogleAdsLinkRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_CreateGoogleAdsLinkRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest.class, + com.google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest.Builder.class); + } + + // Construct using com.google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (googleAdsLinkBuilder_ == null) { + googleAdsLink_ = null; + } else { + googleAdsLink_ = null; + googleAdsLinkBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_CreateGoogleAdsLinkRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest + getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest build() { + com.google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest buildPartial() { + com.google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest result = + new com.google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest(this); + result.parent_ = parent_; + if (googleAdsLinkBuilder_ == null) { + result.googleAdsLink_ = googleAdsLink_; + } else { + result.googleAdsLink_ = googleAdsLinkBuilder_.build(); + } + onBuilt(); + return result; + } + + @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.admin.v1beta.CreateGoogleAdsLinkRequest) { + return mergeFrom((com.google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest other) { + if (other + == com.google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasGoogleAdsLink()) { + mergeGoogleAdsLink(other.getGoogleAdsLink()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Example format: properties/1234
+     * 
+ * + * + * 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. Example format: properties/1234
+     * 
+ * + * + * 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. Example format: properties/1234
+     * 
+ * + * + * 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; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Example format: properties/1234
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Example format: properties/1234
+     * 
+ * + * + * 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; + onChanged(); + return this; + } + + private com.google.analytics.admin.v1beta.GoogleAdsLink googleAdsLink_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.GoogleAdsLink, + com.google.analytics.admin.v1beta.GoogleAdsLink.Builder, + com.google.analytics.admin.v1beta.GoogleAdsLinkOrBuilder> + googleAdsLinkBuilder_; + /** + * + * + *
+     * Required. The GoogleAdsLink to create.
+     * 
+ * + * + * .google.analytics.admin.v1beta.GoogleAdsLink google_ads_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the googleAdsLink field is set. + */ + public boolean hasGoogleAdsLink() { + return googleAdsLinkBuilder_ != null || googleAdsLink_ != null; + } + /** + * + * + *
+     * Required. The GoogleAdsLink to create.
+     * 
+ * + * + * .google.analytics.admin.v1beta.GoogleAdsLink google_ads_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The googleAdsLink. + */ + public com.google.analytics.admin.v1beta.GoogleAdsLink getGoogleAdsLink() { + if (googleAdsLinkBuilder_ == null) { + return googleAdsLink_ == null + ? com.google.analytics.admin.v1beta.GoogleAdsLink.getDefaultInstance() + : googleAdsLink_; + } else { + return googleAdsLinkBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The GoogleAdsLink to create.
+     * 
+ * + * + * .google.analytics.admin.v1beta.GoogleAdsLink google_ads_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setGoogleAdsLink(com.google.analytics.admin.v1beta.GoogleAdsLink value) { + if (googleAdsLinkBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + googleAdsLink_ = value; + onChanged(); + } else { + googleAdsLinkBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The GoogleAdsLink to create.
+     * 
+ * + * + * .google.analytics.admin.v1beta.GoogleAdsLink google_ads_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setGoogleAdsLink( + com.google.analytics.admin.v1beta.GoogleAdsLink.Builder builderForValue) { + if (googleAdsLinkBuilder_ == null) { + googleAdsLink_ = builderForValue.build(); + onChanged(); + } else { + googleAdsLinkBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The GoogleAdsLink to create.
+     * 
+ * + * + * .google.analytics.admin.v1beta.GoogleAdsLink google_ads_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeGoogleAdsLink(com.google.analytics.admin.v1beta.GoogleAdsLink value) { + if (googleAdsLinkBuilder_ == null) { + if (googleAdsLink_ != null) { + googleAdsLink_ = + com.google.analytics.admin.v1beta.GoogleAdsLink.newBuilder(googleAdsLink_) + .mergeFrom(value) + .buildPartial(); + } else { + googleAdsLink_ = value; + } + onChanged(); + } else { + googleAdsLinkBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The GoogleAdsLink to create.
+     * 
+ * + * + * .google.analytics.admin.v1beta.GoogleAdsLink google_ads_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearGoogleAdsLink() { + if (googleAdsLinkBuilder_ == null) { + googleAdsLink_ = null; + onChanged(); + } else { + googleAdsLink_ = null; + googleAdsLinkBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The GoogleAdsLink to create.
+     * 
+ * + * + * .google.analytics.admin.v1beta.GoogleAdsLink google_ads_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.analytics.admin.v1beta.GoogleAdsLink.Builder getGoogleAdsLinkBuilder() { + + onChanged(); + return getGoogleAdsLinkFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The GoogleAdsLink to create.
+     * 
+ * + * + * .google.analytics.admin.v1beta.GoogleAdsLink google_ads_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.analytics.admin.v1beta.GoogleAdsLinkOrBuilder getGoogleAdsLinkOrBuilder() { + if (googleAdsLinkBuilder_ != null) { + return googleAdsLinkBuilder_.getMessageOrBuilder(); + } else { + return googleAdsLink_ == null + ? com.google.analytics.admin.v1beta.GoogleAdsLink.getDefaultInstance() + : googleAdsLink_; + } + } + /** + * + * + *
+     * Required. The GoogleAdsLink to create.
+     * 
+ * + * + * .google.analytics.admin.v1beta.GoogleAdsLink google_ads_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.GoogleAdsLink, + com.google.analytics.admin.v1beta.GoogleAdsLink.Builder, + com.google.analytics.admin.v1beta.GoogleAdsLinkOrBuilder> + getGoogleAdsLinkFieldBuilder() { + if (googleAdsLinkBuilder_ == null) { + googleAdsLinkBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.GoogleAdsLink, + com.google.analytics.admin.v1beta.GoogleAdsLink.Builder, + com.google.analytics.admin.v1beta.GoogleAdsLinkOrBuilder>( + getGoogleAdsLink(), getParentForChildren(), isClean()); + googleAdsLink_ = null; + } + return googleAdsLinkBuilder_; + } + + @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.admin.v1beta.CreateGoogleAdsLinkRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest) + private static final com.google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest(); + } + + public static com.google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateGoogleAdsLinkRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateGoogleAdsLinkRequest(input, extensionRegistry); + } + }; + + 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.admin.v1beta.CreateGoogleAdsLinkRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CreateGoogleAdsLinkRequestOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CreateGoogleAdsLinkRequestOrBuilder.java new file mode 100644 index 000000000000..fb3805dc138b --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CreateGoogleAdsLinkRequestOrBuilder.java @@ -0,0 +1,95 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +public interface CreateGoogleAdsLinkRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Example format: properties/1234
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Example format: properties/1234
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The GoogleAdsLink to create.
+   * 
+ * + * + * .google.analytics.admin.v1beta.GoogleAdsLink google_ads_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the googleAdsLink field is set. + */ + boolean hasGoogleAdsLink(); + /** + * + * + *
+   * Required. The GoogleAdsLink to create.
+   * 
+ * + * + * .google.analytics.admin.v1beta.GoogleAdsLink google_ads_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The googleAdsLink. + */ + com.google.analytics.admin.v1beta.GoogleAdsLink getGoogleAdsLink(); + /** + * + * + *
+   * Required. The GoogleAdsLink to create.
+   * 
+ * + * + * .google.analytics.admin.v1beta.GoogleAdsLink google_ads_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.analytics.admin.v1beta.GoogleAdsLinkOrBuilder getGoogleAdsLinkOrBuilder(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CreateMeasurementProtocolSecretRequest.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CreateMeasurementProtocolSecretRequest.java new file mode 100644 index 000000000000..7fa630e547c2 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CreateMeasurementProtocolSecretRequest.java @@ -0,0 +1,992 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * Request message for CreateMeasurementProtocolSecret RPC
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest} + */ +public final class CreateMeasurementProtocolSecretRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest) + CreateMeasurementProtocolSecretRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateMeasurementProtocolSecretRequest.newBuilder() to construct. + private CreateMeasurementProtocolSecretRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateMeasurementProtocolSecretRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateMeasurementProtocolSecretRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateMeasurementProtocolSecretRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + com.google.analytics.admin.v1beta.MeasurementProtocolSecret.Builder subBuilder = null; + if (measurementProtocolSecret_ != null) { + subBuilder = measurementProtocolSecret_.toBuilder(); + } + measurementProtocolSecret_ = + input.readMessage( + com.google.analytics.admin.v1beta.MeasurementProtocolSecret.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(measurementProtocolSecret_); + measurementProtocolSecret_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_CreateMeasurementProtocolSecretRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_CreateMeasurementProtocolSecretRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest.class, + com.google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The parent resource where this secret will be created.
+   * Format: properties/{property}/dataStreams/{dataStream}
+   * 
+ * + * + * 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 secret will be created.
+   * Format: properties/{property}/dataStreams/{dataStream}
+   * 
+ * + * + * 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 MEASUREMENT_PROTOCOL_SECRET_FIELD_NUMBER = 2; + private com.google.analytics.admin.v1beta.MeasurementProtocolSecret measurementProtocolSecret_; + /** + * + * + *
+   * Required. The measurement protocol secret to create.
+   * 
+ * + * + * .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secret = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the measurementProtocolSecret field is set. + */ + @java.lang.Override + public boolean hasMeasurementProtocolSecret() { + return measurementProtocolSecret_ != null; + } + /** + * + * + *
+   * Required. The measurement protocol secret to create.
+   * 
+ * + * + * .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secret = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The measurementProtocolSecret. + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.MeasurementProtocolSecret + getMeasurementProtocolSecret() { + return measurementProtocolSecret_ == null + ? com.google.analytics.admin.v1beta.MeasurementProtocolSecret.getDefaultInstance() + : measurementProtocolSecret_; + } + /** + * + * + *
+   * Required. The measurement protocol secret to create.
+   * 
+ * + * + * .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secret = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.MeasurementProtocolSecretOrBuilder + getMeasurementProtocolSecretOrBuilder() { + return getMeasurementProtocolSecret(); + } + + 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 (measurementProtocolSecret_ != null) { + output.writeMessage(2, getMeasurementProtocolSecret()); + } + unknownFields.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 (measurementProtocolSecret_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, getMeasurementProtocolSecret()); + } + size += unknownFields.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.admin.v1beta.CreateMeasurementProtocolSecretRequest)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest other = + (com.google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasMeasurementProtocolSecret() != other.hasMeasurementProtocolSecret()) return false; + if (hasMeasurementProtocolSecret()) { + if (!getMeasurementProtocolSecret().equals(other.getMeasurementProtocolSecret())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) 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 (hasMeasurementProtocolSecret()) { + hash = (37 * hash) + MEASUREMENT_PROTOCOL_SECRET_FIELD_NUMBER; + hash = (53 * hash) + getMeasurementProtocolSecret().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest 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.admin.v1beta.CreateMeasurementProtocolSecretRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest 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.admin.v1beta.CreateMeasurementProtocolSecretRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest 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.admin.v1beta.CreateMeasurementProtocolSecretRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest + 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.admin.v1beta.CreateMeasurementProtocolSecretRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest 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.admin.v1beta.CreateMeasurementProtocolSecretRequest 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; + } + /** + * + * + *
+   * Request message for CreateMeasurementProtocolSecret RPC
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest) + com.google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_CreateMeasurementProtocolSecretRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_CreateMeasurementProtocolSecretRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest.class, + com.google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest.Builder + .class); + } + + // Construct using + // com.google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (measurementProtocolSecretBuilder_ == null) { + measurementProtocolSecret_ = null; + } else { + measurementProtocolSecret_ = null; + measurementProtocolSecretBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_CreateMeasurementProtocolSecretRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest + getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest build() { + com.google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest buildPartial() { + com.google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest result = + new com.google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest(this); + result.parent_ = parent_; + if (measurementProtocolSecretBuilder_ == null) { + result.measurementProtocolSecret_ = measurementProtocolSecret_; + } else { + result.measurementProtocolSecret_ = measurementProtocolSecretBuilder_.build(); + } + onBuilt(); + return result; + } + + @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.admin.v1beta.CreateMeasurementProtocolSecretRequest) { + return mergeFrom( + (com.google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest other) { + if (other + == com.google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasMeasurementProtocolSecret()) { + mergeMeasurementProtocolSecret(other.getMeasurementProtocolSecret()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent resource where this secret will be created.
+     * Format: properties/{property}/dataStreams/{dataStream}
+     * 
+ * + * + * 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 secret will be created.
+     * Format: properties/{property}/dataStreams/{dataStream}
+     * 
+ * + * + * 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 secret will be created.
+     * Format: properties/{property}/dataStreams/{dataStream}
+     * 
+ * + * + * 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; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent resource where this secret will be created.
+     * Format: properties/{property}/dataStreams/{dataStream}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent resource where this secret will be created.
+     * Format: properties/{property}/dataStreams/{dataStream}
+     * 
+ * + * + * 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; + onChanged(); + return this; + } + + private com.google.analytics.admin.v1beta.MeasurementProtocolSecret measurementProtocolSecret_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.MeasurementProtocolSecret, + com.google.analytics.admin.v1beta.MeasurementProtocolSecret.Builder, + com.google.analytics.admin.v1beta.MeasurementProtocolSecretOrBuilder> + measurementProtocolSecretBuilder_; + /** + * + * + *
+     * Required. The measurement protocol secret to create.
+     * 
+ * + * + * .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secret = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the measurementProtocolSecret field is set. + */ + public boolean hasMeasurementProtocolSecret() { + return measurementProtocolSecretBuilder_ != null || measurementProtocolSecret_ != null; + } + /** + * + * + *
+     * Required. The measurement protocol secret to create.
+     * 
+ * + * + * .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secret = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The measurementProtocolSecret. + */ + public com.google.analytics.admin.v1beta.MeasurementProtocolSecret + getMeasurementProtocolSecret() { + if (measurementProtocolSecretBuilder_ == null) { + return measurementProtocolSecret_ == null + ? com.google.analytics.admin.v1beta.MeasurementProtocolSecret.getDefaultInstance() + : measurementProtocolSecret_; + } else { + return measurementProtocolSecretBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The measurement protocol secret to create.
+     * 
+ * + * + * .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secret = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setMeasurementProtocolSecret( + com.google.analytics.admin.v1beta.MeasurementProtocolSecret value) { + if (measurementProtocolSecretBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + measurementProtocolSecret_ = value; + onChanged(); + } else { + measurementProtocolSecretBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The measurement protocol secret to create.
+     * 
+ * + * + * .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secret = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setMeasurementProtocolSecret( + com.google.analytics.admin.v1beta.MeasurementProtocolSecret.Builder builderForValue) { + if (measurementProtocolSecretBuilder_ == null) { + measurementProtocolSecret_ = builderForValue.build(); + onChanged(); + } else { + measurementProtocolSecretBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The measurement protocol secret to create.
+     * 
+ * + * + * .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secret = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeMeasurementProtocolSecret( + com.google.analytics.admin.v1beta.MeasurementProtocolSecret value) { + if (measurementProtocolSecretBuilder_ == null) { + if (measurementProtocolSecret_ != null) { + measurementProtocolSecret_ = + com.google.analytics.admin.v1beta.MeasurementProtocolSecret.newBuilder( + measurementProtocolSecret_) + .mergeFrom(value) + .buildPartial(); + } else { + measurementProtocolSecret_ = value; + } + onChanged(); + } else { + measurementProtocolSecretBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The measurement protocol secret to create.
+     * 
+ * + * + * .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secret = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearMeasurementProtocolSecret() { + if (measurementProtocolSecretBuilder_ == null) { + measurementProtocolSecret_ = null; + onChanged(); + } else { + measurementProtocolSecret_ = null; + measurementProtocolSecretBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The measurement protocol secret to create.
+     * 
+ * + * + * .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secret = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.analytics.admin.v1beta.MeasurementProtocolSecret.Builder + getMeasurementProtocolSecretBuilder() { + + onChanged(); + return getMeasurementProtocolSecretFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The measurement protocol secret to create.
+     * 
+ * + * + * .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secret = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.analytics.admin.v1beta.MeasurementProtocolSecretOrBuilder + getMeasurementProtocolSecretOrBuilder() { + if (measurementProtocolSecretBuilder_ != null) { + return measurementProtocolSecretBuilder_.getMessageOrBuilder(); + } else { + return measurementProtocolSecret_ == null + ? com.google.analytics.admin.v1beta.MeasurementProtocolSecret.getDefaultInstance() + : measurementProtocolSecret_; + } + } + /** + * + * + *
+     * Required. The measurement protocol secret to create.
+     * 
+ * + * + * .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secret = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.MeasurementProtocolSecret, + com.google.analytics.admin.v1beta.MeasurementProtocolSecret.Builder, + com.google.analytics.admin.v1beta.MeasurementProtocolSecretOrBuilder> + getMeasurementProtocolSecretFieldBuilder() { + if (measurementProtocolSecretBuilder_ == null) { + measurementProtocolSecretBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.MeasurementProtocolSecret, + com.google.analytics.admin.v1beta.MeasurementProtocolSecret.Builder, + com.google.analytics.admin.v1beta.MeasurementProtocolSecretOrBuilder>( + getMeasurementProtocolSecret(), getParentForChildren(), isClean()); + measurementProtocolSecret_ = null; + } + return measurementProtocolSecretBuilder_; + } + + @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.admin.v1beta.CreateMeasurementProtocolSecretRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest) + private static final com.google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest(); + } + + public static com.google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateMeasurementProtocolSecretRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateMeasurementProtocolSecretRequest(input, extensionRegistry); + } + }; + + 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.admin.v1beta.CreateMeasurementProtocolSecretRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CreateMeasurementProtocolSecretRequestOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CreateMeasurementProtocolSecretRequestOrBuilder.java new file mode 100644 index 000000000000..cde0ea2a076e --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CreateMeasurementProtocolSecretRequestOrBuilder.java @@ -0,0 +1,98 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +public interface CreateMeasurementProtocolSecretRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource where this secret will be created.
+   * Format: properties/{property}/dataStreams/{dataStream}
+   * 
+ * + * + * 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 secret will be created.
+   * Format: properties/{property}/dataStreams/{dataStream}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The measurement protocol secret to create.
+   * 
+ * + * + * .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secret = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the measurementProtocolSecret field is set. + */ + boolean hasMeasurementProtocolSecret(); + /** + * + * + *
+   * Required. The measurement protocol secret to create.
+   * 
+ * + * + * .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secret = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The measurementProtocolSecret. + */ + com.google.analytics.admin.v1beta.MeasurementProtocolSecret getMeasurementProtocolSecret(); + /** + * + * + *
+   * Required. The measurement protocol secret to create.
+   * 
+ * + * + * .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secret = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.analytics.admin.v1beta.MeasurementProtocolSecretOrBuilder + getMeasurementProtocolSecretOrBuilder(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CreatePropertyRequest.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CreatePropertyRequest.java new file mode 100644 index 000000000000..cfcb947207e4 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CreatePropertyRequest.java @@ -0,0 +1,772 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * Request message for CreateProperty RPC.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.CreatePropertyRequest} + */ +public final class CreatePropertyRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.CreatePropertyRequest) + CreatePropertyRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreatePropertyRequest.newBuilder() to construct. + private CreatePropertyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreatePropertyRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreatePropertyRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreatePropertyRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.analytics.admin.v1beta.Property.Builder subBuilder = null; + if (property_ != null) { + subBuilder = property_.toBuilder(); + } + property_ = + input.readMessage( + com.google.analytics.admin.v1beta.Property.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(property_); + property_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_CreatePropertyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_CreatePropertyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.CreatePropertyRequest.class, + com.google.analytics.admin.v1beta.CreatePropertyRequest.Builder.class); + } + + public static final int PROPERTY_FIELD_NUMBER = 1; + private com.google.analytics.admin.v1beta.Property property_; + /** + * + * + *
+   * Required. The property to create.
+   * Note: the supplied property must specify its parent.
+   * 
+ * + * + * .google.analytics.admin.v1beta.Property property = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the property field is set. + */ + @java.lang.Override + public boolean hasProperty() { + return property_ != null; + } + /** + * + * + *
+   * Required. The property to create.
+   * Note: the supplied property must specify its parent.
+   * 
+ * + * + * .google.analytics.admin.v1beta.Property property = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The property. + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.Property getProperty() { + return property_ == null + ? com.google.analytics.admin.v1beta.Property.getDefaultInstance() + : property_; + } + /** + * + * + *
+   * Required. The property to create.
+   * Note: the supplied property must specify its parent.
+   * 
+ * + * + * .google.analytics.admin.v1beta.Property property = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.PropertyOrBuilder getPropertyOrBuilder() { + return getProperty(); + } + + 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 (property_ != null) { + output.writeMessage(1, getProperty()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (property_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getProperty()); + } + size += unknownFields.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.admin.v1beta.CreatePropertyRequest)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.CreatePropertyRequest other = + (com.google.analytics.admin.v1beta.CreatePropertyRequest) obj; + + if (hasProperty() != other.hasProperty()) return false; + if (hasProperty()) { + if (!getProperty().equals(other.getProperty())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasProperty()) { + hash = (37 * hash) + PROPERTY_FIELD_NUMBER; + hash = (53 * hash) + getProperty().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.CreatePropertyRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.CreatePropertyRequest 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.admin.v1beta.CreatePropertyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.CreatePropertyRequest 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.admin.v1beta.CreatePropertyRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.CreatePropertyRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.CreatePropertyRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.CreatePropertyRequest 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.admin.v1beta.CreatePropertyRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.CreatePropertyRequest 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.admin.v1beta.CreatePropertyRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.CreatePropertyRequest 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.admin.v1beta.CreatePropertyRequest 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; + } + /** + * + * + *
+   * Request message for CreateProperty RPC.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.CreatePropertyRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.CreatePropertyRequest) + com.google.analytics.admin.v1beta.CreatePropertyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_CreatePropertyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_CreatePropertyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.CreatePropertyRequest.class, + com.google.analytics.admin.v1beta.CreatePropertyRequest.Builder.class); + } + + // Construct using com.google.analytics.admin.v1beta.CreatePropertyRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (propertyBuilder_ == null) { + property_ = null; + } else { + property_ = null; + propertyBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_CreatePropertyRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.CreatePropertyRequest getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.CreatePropertyRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.CreatePropertyRequest build() { + com.google.analytics.admin.v1beta.CreatePropertyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.CreatePropertyRequest buildPartial() { + com.google.analytics.admin.v1beta.CreatePropertyRequest result = + new com.google.analytics.admin.v1beta.CreatePropertyRequest(this); + if (propertyBuilder_ == null) { + result.property_ = property_; + } else { + result.property_ = propertyBuilder_.build(); + } + onBuilt(); + return result; + } + + @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.admin.v1beta.CreatePropertyRequest) { + return mergeFrom((com.google.analytics.admin.v1beta.CreatePropertyRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1beta.CreatePropertyRequest other) { + if (other == com.google.analytics.admin.v1beta.CreatePropertyRequest.getDefaultInstance()) + return this; + if (other.hasProperty()) { + mergeProperty(other.getProperty()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.CreatePropertyRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.CreatePropertyRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.analytics.admin.v1beta.Property property_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.Property, + com.google.analytics.admin.v1beta.Property.Builder, + com.google.analytics.admin.v1beta.PropertyOrBuilder> + propertyBuilder_; + /** + * + * + *
+     * Required. The property to create.
+     * Note: the supplied property must specify its parent.
+     * 
+ * + * + * .google.analytics.admin.v1beta.Property property = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the property field is set. + */ + public boolean hasProperty() { + return propertyBuilder_ != null || property_ != null; + } + /** + * + * + *
+     * Required. The property to create.
+     * Note: the supplied property must specify its parent.
+     * 
+ * + * + * .google.analytics.admin.v1beta.Property property = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The property. + */ + public com.google.analytics.admin.v1beta.Property getProperty() { + if (propertyBuilder_ == null) { + return property_ == null + ? com.google.analytics.admin.v1beta.Property.getDefaultInstance() + : property_; + } else { + return propertyBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The property to create.
+     * Note: the supplied property must specify its parent.
+     * 
+ * + * + * .google.analytics.admin.v1beta.Property property = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setProperty(com.google.analytics.admin.v1beta.Property value) { + if (propertyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + property_ = value; + onChanged(); + } else { + propertyBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The property to create.
+     * Note: the supplied property must specify its parent.
+     * 
+ * + * + * .google.analytics.admin.v1beta.Property property = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setProperty(com.google.analytics.admin.v1beta.Property.Builder builderForValue) { + if (propertyBuilder_ == null) { + property_ = builderForValue.build(); + onChanged(); + } else { + propertyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The property to create.
+     * Note: the supplied property must specify its parent.
+     * 
+ * + * + * .google.analytics.admin.v1beta.Property property = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeProperty(com.google.analytics.admin.v1beta.Property value) { + if (propertyBuilder_ == null) { + if (property_ != null) { + property_ = + com.google.analytics.admin.v1beta.Property.newBuilder(property_) + .mergeFrom(value) + .buildPartial(); + } else { + property_ = value; + } + onChanged(); + } else { + propertyBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The property to create.
+     * Note: the supplied property must specify its parent.
+     * 
+ * + * + * .google.analytics.admin.v1beta.Property property = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearProperty() { + if (propertyBuilder_ == null) { + property_ = null; + onChanged(); + } else { + property_ = null; + propertyBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The property to create.
+     * Note: the supplied property must specify its parent.
+     * 
+ * + * + * .google.analytics.admin.v1beta.Property property = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.analytics.admin.v1beta.Property.Builder getPropertyBuilder() { + + onChanged(); + return getPropertyFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The property to create.
+     * Note: the supplied property must specify its parent.
+     * 
+ * + * + * .google.analytics.admin.v1beta.Property property = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.analytics.admin.v1beta.PropertyOrBuilder getPropertyOrBuilder() { + if (propertyBuilder_ != null) { + return propertyBuilder_.getMessageOrBuilder(); + } else { + return property_ == null + ? com.google.analytics.admin.v1beta.Property.getDefaultInstance() + : property_; + } + } + /** + * + * + *
+     * Required. The property to create.
+     * Note: the supplied property must specify its parent.
+     * 
+ * + * + * .google.analytics.admin.v1beta.Property property = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.Property, + com.google.analytics.admin.v1beta.Property.Builder, + com.google.analytics.admin.v1beta.PropertyOrBuilder> + getPropertyFieldBuilder() { + if (propertyBuilder_ == null) { + propertyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.Property, + com.google.analytics.admin.v1beta.Property.Builder, + com.google.analytics.admin.v1beta.PropertyOrBuilder>( + getProperty(), getParentForChildren(), isClean()); + property_ = null; + } + return propertyBuilder_; + } + + @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.admin.v1beta.CreatePropertyRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.CreatePropertyRequest) + private static final com.google.analytics.admin.v1beta.CreatePropertyRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.CreatePropertyRequest(); + } + + public static com.google.analytics.admin.v1beta.CreatePropertyRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreatePropertyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreatePropertyRequest(input, extensionRegistry); + } + }; + + 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.admin.v1beta.CreatePropertyRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CreatePropertyRequestOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CreatePropertyRequestOrBuilder.java new file mode 100644 index 000000000000..569aaa21509e --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CreatePropertyRequestOrBuilder.java @@ -0,0 +1,69 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +public interface CreatePropertyRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.CreatePropertyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The property to create.
+   * Note: the supplied property must specify its parent.
+   * 
+ * + * + * .google.analytics.admin.v1beta.Property property = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the property field is set. + */ + boolean hasProperty(); + /** + * + * + *
+   * Required. The property to create.
+   * Note: the supplied property must specify its parent.
+   * 
+ * + * + * .google.analytics.admin.v1beta.Property property = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The property. + */ + com.google.analytics.admin.v1beta.Property getProperty(); + /** + * + * + *
+   * Required. The property to create.
+   * Note: the supplied property must specify its parent.
+   * 
+ * + * + * .google.analytics.admin.v1beta.Property property = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.analytics.admin.v1beta.PropertyOrBuilder getPropertyOrBuilder(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CustomDimension.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CustomDimension.java new file mode 100644 index 000000000000..0cbbf46c6b43 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CustomDimension.java @@ -0,0 +1,1698 @@ +/* + * Copyright 2020 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/admin/v1beta/resources.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * A definition for a CustomDimension.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.CustomDimension} + */ +public final class CustomDimension extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.CustomDimension) + CustomDimensionOrBuilder { + private static final long serialVersionUID = 0L; + // Use CustomDimension.newBuilder() to construct. + private CustomDimension(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CustomDimension() { + name_ = ""; + parameterName_ = ""; + displayName_ = ""; + description_ = ""; + scope_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CustomDimension(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CustomDimension( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + parameterName_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 40: + { + int rawValue = input.readEnum(); + + scope_ = rawValue; + break; + } + case 48: + { + disallowAdsPersonalization_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_CustomDimension_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_CustomDimension_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.CustomDimension.class, + com.google.analytics.admin.v1beta.CustomDimension.Builder.class); + } + + /** + * + * + *
+   * Valid values for the scope of this dimension.
+   * 
+ * + * Protobuf enum {@code google.analytics.admin.v1beta.CustomDimension.DimensionScope} + */ + public enum DimensionScope implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Scope unknown or not specified.
+     * 
+ * + * DIMENSION_SCOPE_UNSPECIFIED = 0; + */ + DIMENSION_SCOPE_UNSPECIFIED(0), + /** + * + * + *
+     * Dimension scoped to an event.
+     * 
+ * + * EVENT = 1; + */ + EVENT(1), + /** + * + * + *
+     * Dimension scoped to a user.
+     * 
+ * + * USER = 2; + */ + USER(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Scope unknown or not specified.
+     * 
+ * + * DIMENSION_SCOPE_UNSPECIFIED = 0; + */ + public static final int DIMENSION_SCOPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Dimension scoped to an event.
+     * 
+ * + * EVENT = 1; + */ + public static final int EVENT_VALUE = 1; + /** + * + * + *
+     * Dimension scoped to a user.
+     * 
+ * + * USER = 2; + */ + public static final int USER_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DimensionScope valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static DimensionScope forNumber(int value) { + switch (value) { + case 0: + return DIMENSION_SCOPE_UNSPECIFIED; + case 1: + return EVENT; + case 2: + return USER; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public DimensionScope findValueByNumber(int number) { + return DimensionScope.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.analytics.admin.v1beta.CustomDimension.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final DimensionScope[] VALUES = values(); + + public static DimensionScope valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private DimensionScope(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.analytics.admin.v1beta.CustomDimension.DimensionScope) + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Output only. Resource name for this CustomDimension resource.
+   * Format: properties/{property}/customDimensions/{customDimension}
+   * 
+ * + * string name = 1 [(.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. Resource name for this CustomDimension resource.
+   * Format: properties/{property}/customDimensions/{customDimension}
+   * 
+ * + * string name = 1 [(.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 PARAMETER_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object parameterName_; + /** + * + * + *
+   * Required. Immutable. Tagging parameter name for this custom dimension.
+   * If this is a user-scoped dimension, then this is the user property name.
+   * If this is an event-scoped dimension, then this is the event parameter
+   * name.
+   * May only contain alphanumeric and underscore characters, starting with a
+   * letter. Max length of 24 characters for user-scoped dimensions, 40
+   * characters for event-scoped dimensions.
+   * 
+ * + * + * string parameter_name = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The parameterName. + */ + @java.lang.Override + public java.lang.String getParameterName() { + java.lang.Object ref = parameterName_; + 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(); + parameterName_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Immutable. Tagging parameter name for this custom dimension.
+   * If this is a user-scoped dimension, then this is the user property name.
+   * If this is an event-scoped dimension, then this is the event parameter
+   * name.
+   * May only contain alphanumeric and underscore characters, starting with a
+   * letter. Max length of 24 characters for user-scoped dimensions, 40
+   * characters for event-scoped dimensions.
+   * 
+ * + * + * string parameter_name = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The bytes for parameterName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParameterNameBytes() { + java.lang.Object ref = parameterName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parameterName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 3; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * Required. Display name for this custom dimension as shown in the Analytics UI.
+   * Max length of 82 characters, alphanumeric plus space and underscore
+   * starting with a letter. Legacy system-generated display names may contain
+   * square brackets, but updates to this field will never permit square
+   * brackets.
+   * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Display name for this custom dimension as shown in the Analytics UI.
+   * Max length of 82 characters, alphanumeric plus space and underscore
+   * starting with a letter. Legacy system-generated display names may contain
+   * square brackets, but updates to this field will never permit square
+   * brackets.
+   * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 4; + private volatile java.lang.Object description_; + /** + * + * + *
+   * Optional. Description for this custom dimension. Max length of 150 characters.
+   * 
+ * + * string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Description for this custom dimension. Max length of 150 characters.
+   * 
+ * + * string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SCOPE_FIELD_NUMBER = 5; + private int scope_; + /** + * + * + *
+   * Required. Immutable. The scope of this dimension.
+   * 
+ * + * + * .google.analytics.admin.v1beta.CustomDimension.DimensionScope scope = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for scope. + */ + @java.lang.Override + public int getScopeValue() { + return scope_; + } + /** + * + * + *
+   * Required. Immutable. The scope of this dimension.
+   * 
+ * + * + * .google.analytics.admin.v1beta.CustomDimension.DimensionScope scope = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The scope. + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.CustomDimension.DimensionScope getScope() { + @SuppressWarnings("deprecation") + com.google.analytics.admin.v1beta.CustomDimension.DimensionScope result = + com.google.analytics.admin.v1beta.CustomDimension.DimensionScope.valueOf(scope_); + return result == null + ? com.google.analytics.admin.v1beta.CustomDimension.DimensionScope.UNRECOGNIZED + : result; + } + + public static final int DISALLOW_ADS_PERSONALIZATION_FIELD_NUMBER = 6; + private boolean disallowAdsPersonalization_; + /** + * + * + *
+   * Optional. If set to true, sets this dimension as NPA and excludes it from ads
+   * personalization.
+   * This is currently only supported by user-scoped custom dimensions.
+   * 
+ * + * bool disallow_ads_personalization = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The disallowAdsPersonalization. + */ + @java.lang.Override + public boolean getDisallowAdsPersonalization() { + return disallowAdsPersonalization_; + } + + 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(parameterName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, parameterName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, description_); + } + if (scope_ + != com.google.analytics.admin.v1beta.CustomDimension.DimensionScope + .DIMENSION_SCOPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(5, scope_); + } + if (disallowAdsPersonalization_ != false) { + output.writeBool(6, disallowAdsPersonalization_); + } + unknownFields.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(parameterName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, parameterName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, description_); + } + if (scope_ + != com.google.analytics.admin.v1beta.CustomDimension.DimensionScope + .DIMENSION_SCOPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, scope_); + } + if (disallowAdsPersonalization_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, disallowAdsPersonalization_); + } + size += unknownFields.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.admin.v1beta.CustomDimension)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.CustomDimension other = + (com.google.analytics.admin.v1beta.CustomDimension) obj; + + if (!getName().equals(other.getName())) return false; + if (!getParameterName().equals(other.getParameterName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (scope_ != other.scope_) return false; + if (getDisallowAdsPersonalization() != other.getDisallowAdsPersonalization()) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + PARAMETER_NAME_FIELD_NUMBER; + hash = (53 * hash) + getParameterName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + SCOPE_FIELD_NUMBER; + hash = (53 * hash) + scope_; + hash = (37 * hash) + DISALLOW_ADS_PERSONALIZATION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDisallowAdsPersonalization()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.CustomDimension parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.CustomDimension 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.admin.v1beta.CustomDimension parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.CustomDimension 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.admin.v1beta.CustomDimension parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.CustomDimension parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.CustomDimension parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.CustomDimension 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.admin.v1beta.CustomDimension parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.CustomDimension 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.admin.v1beta.CustomDimension parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.CustomDimension 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.admin.v1beta.CustomDimension 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 definition for a CustomDimension.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.CustomDimension} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.CustomDimension) + com.google.analytics.admin.v1beta.CustomDimensionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_CustomDimension_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_CustomDimension_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.CustomDimension.class, + com.google.analytics.admin.v1beta.CustomDimension.Builder.class); + } + + // Construct using com.google.analytics.admin.v1beta.CustomDimension.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + parameterName_ = ""; + + displayName_ = ""; + + description_ = ""; + + scope_ = 0; + + disallowAdsPersonalization_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_CustomDimension_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.CustomDimension getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.CustomDimension.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.CustomDimension build() { + com.google.analytics.admin.v1beta.CustomDimension result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.CustomDimension buildPartial() { + com.google.analytics.admin.v1beta.CustomDimension result = + new com.google.analytics.admin.v1beta.CustomDimension(this); + result.name_ = name_; + result.parameterName_ = parameterName_; + result.displayName_ = displayName_; + result.description_ = description_; + result.scope_ = scope_; + result.disallowAdsPersonalization_ = disallowAdsPersonalization_; + onBuilt(); + return result; + } + + @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.admin.v1beta.CustomDimension) { + return mergeFrom((com.google.analytics.admin.v1beta.CustomDimension) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1beta.CustomDimension other) { + if (other == com.google.analytics.admin.v1beta.CustomDimension.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getParameterName().isEmpty()) { + parameterName_ = other.parameterName_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (other.scope_ != 0) { + setScopeValue(other.getScopeValue()); + } + if (other.getDisallowAdsPersonalization() != false) { + setDisallowAdsPersonalization(other.getDisallowAdsPersonalization()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.CustomDimension parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.CustomDimension) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. Resource name for this CustomDimension resource.
+     * Format: properties/{property}/customDimensions/{customDimension}
+     * 
+ * + * string name = 1 [(.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. Resource name for this CustomDimension resource.
+     * Format: properties/{property}/customDimensions/{customDimension}
+     * 
+ * + * string name = 1 [(.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. Resource name for this CustomDimension resource.
+     * Format: properties/{property}/customDimensions/{customDimension}
+     * 
+ * + * string name = 1 [(.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; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Resource name for this CustomDimension resource.
+     * Format: properties/{property}/customDimensions/{customDimension}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Resource name for this CustomDimension resource.
+     * Format: properties/{property}/customDimensions/{customDimension}
+     * 
+ * + * string name = 1 [(.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; + onChanged(); + return this; + } + + private java.lang.Object parameterName_ = ""; + /** + * + * + *
+     * Required. Immutable. Tagging parameter name for this custom dimension.
+     * If this is a user-scoped dimension, then this is the user property name.
+     * If this is an event-scoped dimension, then this is the event parameter
+     * name.
+     * May only contain alphanumeric and underscore characters, starting with a
+     * letter. Max length of 24 characters for user-scoped dimensions, 40
+     * characters for event-scoped dimensions.
+     * 
+ * + * + * string parameter_name = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The parameterName. + */ + public java.lang.String getParameterName() { + java.lang.Object ref = parameterName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parameterName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Immutable. Tagging parameter name for this custom dimension.
+     * If this is a user-scoped dimension, then this is the user property name.
+     * If this is an event-scoped dimension, then this is the event parameter
+     * name.
+     * May only contain alphanumeric and underscore characters, starting with a
+     * letter. Max length of 24 characters for user-scoped dimensions, 40
+     * characters for event-scoped dimensions.
+     * 
+ * + * + * string parameter_name = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The bytes for parameterName. + */ + public com.google.protobuf.ByteString getParameterNameBytes() { + java.lang.Object ref = parameterName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parameterName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Immutable. Tagging parameter name for this custom dimension.
+     * If this is a user-scoped dimension, then this is the user property name.
+     * If this is an event-scoped dimension, then this is the event parameter
+     * name.
+     * May only contain alphanumeric and underscore characters, starting with a
+     * letter. Max length of 24 characters for user-scoped dimensions, 40
+     * characters for event-scoped dimensions.
+     * 
+ * + * + * string parameter_name = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The parameterName to set. + * @return This builder for chaining. + */ + public Builder setParameterName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parameterName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Immutable. Tagging parameter name for this custom dimension.
+     * If this is a user-scoped dimension, then this is the user property name.
+     * If this is an event-scoped dimension, then this is the event parameter
+     * name.
+     * May only contain alphanumeric and underscore characters, starting with a
+     * letter. Max length of 24 characters for user-scoped dimensions, 40
+     * characters for event-scoped dimensions.
+     * 
+ * + * + * string parameter_name = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return This builder for chaining. + */ + public Builder clearParameterName() { + + parameterName_ = getDefaultInstance().getParameterName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Immutable. Tagging parameter name for this custom dimension.
+     * If this is a user-scoped dimension, then this is the user property name.
+     * If this is an event-scoped dimension, then this is the event parameter
+     * name.
+     * May only contain alphanumeric and underscore characters, starting with a
+     * letter. Max length of 24 characters for user-scoped dimensions, 40
+     * characters for event-scoped dimensions.
+     * 
+ * + * + * string parameter_name = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The bytes for parameterName to set. + * @return This builder for chaining. + */ + public Builder setParameterNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parameterName_ = value; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Required. Display name for this custom dimension as shown in the Analytics UI.
+     * Max length of 82 characters, alphanumeric plus space and underscore
+     * starting with a letter. Legacy system-generated display names may contain
+     * square brackets, but updates to this field will never permit square
+     * brackets.
+     * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Display name for this custom dimension as shown in the Analytics UI.
+     * Max length of 82 characters, alphanumeric plus space and underscore
+     * starting with a letter. Legacy system-generated display names may contain
+     * square brackets, but updates to this field will never permit square
+     * brackets.
+     * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Display name for this custom dimension as shown in the Analytics UI.
+     * Max length of 82 characters, alphanumeric plus space and underscore
+     * starting with a letter. Legacy system-generated display names may contain
+     * square brackets, but updates to this field will never permit square
+     * brackets.
+     * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Display name for this custom dimension as shown in the Analytics UI.
+     * Max length of 82 characters, alphanumeric plus space and underscore
+     * starting with a letter. Legacy system-generated display names may contain
+     * square brackets, but updates to this field will never permit square
+     * brackets.
+     * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Display name for this custom dimension as shown in the Analytics UI.
+     * Max length of 82 characters, alphanumeric plus space and underscore
+     * starting with a letter. Legacy system-generated display names may contain
+     * square brackets, but updates to this field will never permit square
+     * brackets.
+     * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * Optional. Description for this custom dimension. Max length of 150 characters.
+     * 
+ * + * string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Description for this custom dimension. Max length of 150 characters.
+     * 
+ * + * string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Description for this custom dimension. Max length of 150 characters.
+     * 
+ * + * string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Description for this custom dimension. Max length of 150 characters.
+     * 
+ * + * string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Description for this custom dimension. Max length of 150 characters.
+     * 
+ * + * string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private int scope_ = 0; + /** + * + * + *
+     * Required. Immutable. The scope of this dimension.
+     * 
+ * + * + * .google.analytics.admin.v1beta.CustomDimension.DimensionScope scope = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for scope. + */ + @java.lang.Override + public int getScopeValue() { + return scope_; + } + /** + * + * + *
+     * Required. Immutable. The scope of this dimension.
+     * 
+ * + * + * .google.analytics.admin.v1beta.CustomDimension.DimensionScope scope = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The enum numeric value on the wire for scope to set. + * @return This builder for chaining. + */ + public Builder setScopeValue(int value) { + + scope_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Immutable. The scope of this dimension.
+     * 
+ * + * + * .google.analytics.admin.v1beta.CustomDimension.DimensionScope scope = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The scope. + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.CustomDimension.DimensionScope getScope() { + @SuppressWarnings("deprecation") + com.google.analytics.admin.v1beta.CustomDimension.DimensionScope result = + com.google.analytics.admin.v1beta.CustomDimension.DimensionScope.valueOf(scope_); + return result == null + ? com.google.analytics.admin.v1beta.CustomDimension.DimensionScope.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Required. Immutable. The scope of this dimension.
+     * 
+ * + * + * .google.analytics.admin.v1beta.CustomDimension.DimensionScope scope = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The scope to set. + * @return This builder for chaining. + */ + public Builder setScope( + com.google.analytics.admin.v1beta.CustomDimension.DimensionScope value) { + if (value == null) { + throw new NullPointerException(); + } + + scope_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Immutable. The scope of this dimension.
+     * 
+ * + * + * .google.analytics.admin.v1beta.CustomDimension.DimensionScope scope = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return This builder for chaining. + */ + public Builder clearScope() { + + scope_ = 0; + onChanged(); + return this; + } + + private boolean disallowAdsPersonalization_; + /** + * + * + *
+     * Optional. If set to true, sets this dimension as NPA and excludes it from ads
+     * personalization.
+     * This is currently only supported by user-scoped custom dimensions.
+     * 
+ * + * bool disallow_ads_personalization = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The disallowAdsPersonalization. + */ + @java.lang.Override + public boolean getDisallowAdsPersonalization() { + return disallowAdsPersonalization_; + } + /** + * + * + *
+     * Optional. If set to true, sets this dimension as NPA and excludes it from ads
+     * personalization.
+     * This is currently only supported by user-scoped custom dimensions.
+     * 
+ * + * bool disallow_ads_personalization = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The disallowAdsPersonalization to set. + * @return This builder for chaining. + */ + public Builder setDisallowAdsPersonalization(boolean value) { + + disallowAdsPersonalization_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If set to true, sets this dimension as NPA and excludes it from ads
+     * personalization.
+     * This is currently only supported by user-scoped custom dimensions.
+     * 
+ * + * bool disallow_ads_personalization = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDisallowAdsPersonalization() { + + disallowAdsPersonalization_ = false; + 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.admin.v1beta.CustomDimension) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.CustomDimension) + private static final com.google.analytics.admin.v1beta.CustomDimension DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.CustomDimension(); + } + + public static com.google.analytics.admin.v1beta.CustomDimension getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CustomDimension parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CustomDimension(input, extensionRegistry); + } + }; + + 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.admin.v1beta.CustomDimension getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CustomDimensionName.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CustomDimensionName.java new file mode 100644 index 000000000000..1c7f20ed0aa8 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CustomDimensionName.java @@ -0,0 +1,198 @@ +/* + * Copyright 2022 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.admin.v1beta; + +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 CustomDimensionName implements ResourceName { + private static final PathTemplate PROPERTY_CUSTOM_DIMENSION = + PathTemplate.createWithoutUrlEncoding( + "properties/{property}/customDimensions/{custom_dimension}"); + private volatile Map fieldValuesMap; + private final String property; + private final String customDimension; + + @Deprecated + protected CustomDimensionName() { + property = null; + customDimension = null; + } + + private CustomDimensionName(Builder builder) { + property = Preconditions.checkNotNull(builder.getProperty()); + customDimension = Preconditions.checkNotNull(builder.getCustomDimension()); + } + + public String getProperty() { + return property; + } + + public String getCustomDimension() { + return customDimension; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static CustomDimensionName of(String property, String customDimension) { + return newBuilder().setProperty(property).setCustomDimension(customDimension).build(); + } + + public static String format(String property, String customDimension) { + return newBuilder() + .setProperty(property) + .setCustomDimension(customDimension) + .build() + .toString(); + } + + public static CustomDimensionName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROPERTY_CUSTOM_DIMENSION.validatedMatch( + formattedString, "CustomDimensionName.parse: formattedString not in valid format"); + return of(matchMap.get("property"), matchMap.get("custom_dimension")); + } + + 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 (CustomDimensionName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROPERTY_CUSTOM_DIMENSION.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 (customDimension != null) { + fieldMapBuilder.put("custom_dimension", customDimension); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROPERTY_CUSTOM_DIMENSION.instantiate( + "property", property, "custom_dimension", customDimension); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + CustomDimensionName that = ((CustomDimensionName) o); + return Objects.equals(this.property, that.property) + && Objects.equals(this.customDimension, that.customDimension); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(property); + h *= 1000003; + h ^= Objects.hashCode(customDimension); + return h; + } + + /** Builder for properties/{property}/customDimensions/{custom_dimension}. */ + public static class Builder { + private String property; + private String customDimension; + + protected Builder() {} + + public String getProperty() { + return property; + } + + public String getCustomDimension() { + return customDimension; + } + + public Builder setProperty(String property) { + this.property = property; + return this; + } + + public Builder setCustomDimension(String customDimension) { + this.customDimension = customDimension; + return this; + } + + private Builder(CustomDimensionName customDimensionName) { + this.property = customDimensionName.property; + this.customDimension = customDimensionName.customDimension; + } + + public CustomDimensionName build() { + return new CustomDimensionName(this); + } + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CustomDimensionOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CustomDimensionOrBuilder.java new file mode 100644 index 000000000000..7c44a5b79540 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CustomDimensionOrBuilder.java @@ -0,0 +1,195 @@ +/* + * Copyright 2020 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/admin/v1beta/resources.proto + +package com.google.analytics.admin.v1beta; + +public interface CustomDimensionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.CustomDimension) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Resource name for this CustomDimension resource.
+   * Format: properties/{property}/customDimensions/{customDimension}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. Resource name for this CustomDimension resource.
+   * Format: properties/{property}/customDimensions/{customDimension}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. Immutable. Tagging parameter name for this custom dimension.
+   * If this is a user-scoped dimension, then this is the user property name.
+   * If this is an event-scoped dimension, then this is the event parameter
+   * name.
+   * May only contain alphanumeric and underscore characters, starting with a
+   * letter. Max length of 24 characters for user-scoped dimensions, 40
+   * characters for event-scoped dimensions.
+   * 
+ * + * + * string parameter_name = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The parameterName. + */ + java.lang.String getParameterName(); + /** + * + * + *
+   * Required. Immutable. Tagging parameter name for this custom dimension.
+   * If this is a user-scoped dimension, then this is the user property name.
+   * If this is an event-scoped dimension, then this is the event parameter
+   * name.
+   * May only contain alphanumeric and underscore characters, starting with a
+   * letter. Max length of 24 characters for user-scoped dimensions, 40
+   * characters for event-scoped dimensions.
+   * 
+ * + * + * string parameter_name = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The bytes for parameterName. + */ + com.google.protobuf.ByteString getParameterNameBytes(); + + /** + * + * + *
+   * Required. Display name for this custom dimension as shown in the Analytics UI.
+   * Max length of 82 characters, alphanumeric plus space and underscore
+   * starting with a letter. Legacy system-generated display names may contain
+   * square brackets, but updates to this field will never permit square
+   * brackets.
+   * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Required. Display name for this custom dimension as shown in the Analytics UI.
+   * Max length of 82 characters, alphanumeric plus space and underscore
+   * starting with a letter. Legacy system-generated display names may contain
+   * square brackets, but updates to this field will never permit square
+   * brackets.
+   * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Optional. Description for this custom dimension. Max length of 150 characters.
+   * 
+ * + * string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Optional. Description for this custom dimension. Max length of 150 characters.
+   * 
+ * + * string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Required. Immutable. The scope of this dimension.
+   * 
+ * + * + * .google.analytics.admin.v1beta.CustomDimension.DimensionScope scope = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for scope. + */ + int getScopeValue(); + /** + * + * + *
+   * Required. Immutable. The scope of this dimension.
+   * 
+ * + * + * .google.analytics.admin.v1beta.CustomDimension.DimensionScope scope = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The scope. + */ + com.google.analytics.admin.v1beta.CustomDimension.DimensionScope getScope(); + + /** + * + * + *
+   * Optional. If set to true, sets this dimension as NPA and excludes it from ads
+   * personalization.
+   * This is currently only supported by user-scoped custom dimensions.
+   * 
+ * + * bool disallow_ads_personalization = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The disallowAdsPersonalization. + */ + boolean getDisallowAdsPersonalization(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CustomMetric.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CustomMetric.java new file mode 100644 index 000000000000..e2ef340af3c5 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CustomMetric.java @@ -0,0 +1,2712 @@ +/* + * Copyright 2020 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/admin/v1beta/resources.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * A definition for a custom metric.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.CustomMetric} + */ +public final class CustomMetric extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.CustomMetric) + CustomMetricOrBuilder { + private static final long serialVersionUID = 0L; + // Use CustomMetric.newBuilder() to construct. + private CustomMetric(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CustomMetric() { + name_ = ""; + parameterName_ = ""; + displayName_ = ""; + description_ = ""; + measurementUnit_ = 0; + scope_ = 0; + restrictedMetricType_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CustomMetric(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CustomMetric( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + parameterName_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 40: + { + int rawValue = input.readEnum(); + + measurementUnit_ = rawValue; + break; + } + case 48: + { + int rawValue = input.readEnum(); + + scope_ = rawValue; + break; + } + case 64: + { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + restrictedMetricType_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + restrictedMetricType_.add(rawValue); + break; + } + case 66: + { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + restrictedMetricType_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + restrictedMetricType_.add(rawValue); + } + input.popLimit(oldLimit); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + restrictedMetricType_ = java.util.Collections.unmodifiableList(restrictedMetricType_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_CustomMetric_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_CustomMetric_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.CustomMetric.class, + com.google.analytics.admin.v1beta.CustomMetric.Builder.class); + } + + /** + * + * + *
+   * Possible types of representing the custom metric's value.
+   * Currency representation may change in the future, requiring a breaking API
+   * change.
+   * 
+ * + * Protobuf enum {@code google.analytics.admin.v1beta.CustomMetric.MeasurementUnit} + */ + public enum MeasurementUnit implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * MeasurementUnit unspecified or missing.
+     * 
+ * + * MEASUREMENT_UNIT_UNSPECIFIED = 0; + */ + MEASUREMENT_UNIT_UNSPECIFIED(0), + /** + * + * + *
+     * This metric uses default units.
+     * 
+ * + * STANDARD = 1; + */ + STANDARD(1), + /** + * + * + *
+     * This metric measures a currency.
+     * 
+ * + * CURRENCY = 2; + */ + CURRENCY(2), + /** + * + * + *
+     * This metric measures feet.
+     * 
+ * + * FEET = 3; + */ + FEET(3), + /** + * + * + *
+     * This metric measures meters.
+     * 
+ * + * METERS = 4; + */ + METERS(4), + /** + * + * + *
+     * This metric measures kilometers.
+     * 
+ * + * KILOMETERS = 5; + */ + KILOMETERS(5), + /** + * + * + *
+     * This metric measures miles.
+     * 
+ * + * MILES = 6; + */ + MILES(6), + /** + * + * + *
+     * This metric measures milliseconds.
+     * 
+ * + * MILLISECONDS = 7; + */ + MILLISECONDS(7), + /** + * + * + *
+     * This metric measures seconds.
+     * 
+ * + * SECONDS = 8; + */ + SECONDS(8), + /** + * + * + *
+     * This metric measures minutes.
+     * 
+ * + * MINUTES = 9; + */ + MINUTES(9), + /** + * + * + *
+     * This metric measures hours.
+     * 
+ * + * HOURS = 10; + */ + HOURS(10), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * MeasurementUnit unspecified or missing.
+     * 
+ * + * MEASUREMENT_UNIT_UNSPECIFIED = 0; + */ + public static final int MEASUREMENT_UNIT_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * This metric uses default units.
+     * 
+ * + * STANDARD = 1; + */ + public static final int STANDARD_VALUE = 1; + /** + * + * + *
+     * This metric measures a currency.
+     * 
+ * + * CURRENCY = 2; + */ + public static final int CURRENCY_VALUE = 2; + /** + * + * + *
+     * This metric measures feet.
+     * 
+ * + * FEET = 3; + */ + public static final int FEET_VALUE = 3; + /** + * + * + *
+     * This metric measures meters.
+     * 
+ * + * METERS = 4; + */ + public static final int METERS_VALUE = 4; + /** + * + * + *
+     * This metric measures kilometers.
+     * 
+ * + * KILOMETERS = 5; + */ + public static final int KILOMETERS_VALUE = 5; + /** + * + * + *
+     * This metric measures miles.
+     * 
+ * + * MILES = 6; + */ + public static final int MILES_VALUE = 6; + /** + * + * + *
+     * This metric measures milliseconds.
+     * 
+ * + * MILLISECONDS = 7; + */ + public static final int MILLISECONDS_VALUE = 7; + /** + * + * + *
+     * This metric measures seconds.
+     * 
+ * + * SECONDS = 8; + */ + public static final int SECONDS_VALUE = 8; + /** + * + * + *
+     * This metric measures minutes.
+     * 
+ * + * MINUTES = 9; + */ + public static final int MINUTES_VALUE = 9; + /** + * + * + *
+     * This metric measures hours.
+     * 
+ * + * HOURS = 10; + */ + public static final int HOURS_VALUE = 10; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static MeasurementUnit valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static MeasurementUnit forNumber(int value) { + switch (value) { + case 0: + return MEASUREMENT_UNIT_UNSPECIFIED; + case 1: + return STANDARD; + case 2: + return CURRENCY; + case 3: + return FEET; + case 4: + return METERS; + case 5: + return KILOMETERS; + case 6: + return MILES; + case 7: + return MILLISECONDS; + case 8: + return SECONDS; + case 9: + return MINUTES; + case 10: + return HOURS; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public MeasurementUnit findValueByNumber(int number) { + return MeasurementUnit.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.analytics.admin.v1beta.CustomMetric.getDescriptor().getEnumTypes().get(0); + } + + private static final MeasurementUnit[] VALUES = values(); + + public static MeasurementUnit valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private MeasurementUnit(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.analytics.admin.v1beta.CustomMetric.MeasurementUnit) + } + + /** + * + * + *
+   * The scope of this metric.
+   * 
+ * + * Protobuf enum {@code google.analytics.admin.v1beta.CustomMetric.MetricScope} + */ + public enum MetricScope implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Scope unknown or not specified.
+     * 
+ * + * METRIC_SCOPE_UNSPECIFIED = 0; + */ + METRIC_SCOPE_UNSPECIFIED(0), + /** + * + * + *
+     * Metric scoped to an event.
+     * 
+ * + * EVENT = 1; + */ + EVENT(1), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Scope unknown or not specified.
+     * 
+ * + * METRIC_SCOPE_UNSPECIFIED = 0; + */ + public static final int METRIC_SCOPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Metric scoped to an event.
+     * 
+ * + * EVENT = 1; + */ + public static final int EVENT_VALUE = 1; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static MetricScope valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static MetricScope forNumber(int value) { + switch (value) { + case 0: + return METRIC_SCOPE_UNSPECIFIED; + case 1: + return EVENT; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public MetricScope findValueByNumber(int number) { + return MetricScope.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.analytics.admin.v1beta.CustomMetric.getDescriptor().getEnumTypes().get(1); + } + + private static final MetricScope[] VALUES = values(); + + public static MetricScope valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private MetricScope(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.analytics.admin.v1beta.CustomMetric.MetricScope) + } + + /** + * + * + *
+   * Labels that mark the data in this custom metric as data that should be
+   * restricted to specific users.
+   * 
+ * + * Protobuf enum {@code google.analytics.admin.v1beta.CustomMetric.RestrictedMetricType} + */ + public enum RestrictedMetricType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Type unknown or unspecified.
+     * 
+ * + * RESTRICTED_METRIC_TYPE_UNSPECIFIED = 0; + */ + RESTRICTED_METRIC_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Metric reports cost data.
+     * 
+ * + * COST_DATA = 1; + */ + COST_DATA(1), + /** + * + * + *
+     * Metric reports revenue data.
+     * 
+ * + * REVENUE_DATA = 2; + */ + REVENUE_DATA(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Type unknown or unspecified.
+     * 
+ * + * RESTRICTED_METRIC_TYPE_UNSPECIFIED = 0; + */ + public static final int RESTRICTED_METRIC_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Metric reports cost data.
+     * 
+ * + * COST_DATA = 1; + */ + public static final int COST_DATA_VALUE = 1; + /** + * + * + *
+     * Metric reports revenue data.
+     * 
+ * + * REVENUE_DATA = 2; + */ + public static final int REVENUE_DATA_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static RestrictedMetricType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static RestrictedMetricType forNumber(int value) { + switch (value) { + case 0: + return RESTRICTED_METRIC_TYPE_UNSPECIFIED; + case 1: + return COST_DATA; + case 2: + return REVENUE_DATA; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public RestrictedMetricType findValueByNumber(int number) { + return RestrictedMetricType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.analytics.admin.v1beta.CustomMetric.getDescriptor().getEnumTypes().get(2); + } + + private static final RestrictedMetricType[] VALUES = values(); + + public static RestrictedMetricType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private RestrictedMetricType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.analytics.admin.v1beta.CustomMetric.RestrictedMetricType) + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Output only. Resource name for this CustomMetric resource.
+   * Format: properties/{property}/customMetrics/{customMetric}
+   * 
+ * + * string name = 1 [(.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. Resource name for this CustomMetric resource.
+   * Format: properties/{property}/customMetrics/{customMetric}
+   * 
+ * + * string name = 1 [(.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 PARAMETER_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object parameterName_; + /** + * + * + *
+   * Required. Immutable. Tagging name for this custom metric.
+   * If this is an event-scoped metric, then this is the event parameter
+   * name.
+   * May only contain alphanumeric and underscore charactes, starting with a
+   * letter. Max length of 40 characters for event-scoped metrics.
+   * 
+ * + * + * string parameter_name = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The parameterName. + */ + @java.lang.Override + public java.lang.String getParameterName() { + java.lang.Object ref = parameterName_; + 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(); + parameterName_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Immutable. Tagging name for this custom metric.
+   * If this is an event-scoped metric, then this is the event parameter
+   * name.
+   * May only contain alphanumeric and underscore charactes, starting with a
+   * letter. Max length of 40 characters for event-scoped metrics.
+   * 
+ * + * + * string parameter_name = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The bytes for parameterName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParameterNameBytes() { + java.lang.Object ref = parameterName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parameterName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 3; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * Required. Display name for this custom metric as shown in the Analytics UI.
+   * Max length of 82 characters, alphanumeric plus space and underscore
+   * starting with a letter. Legacy system-generated display names may contain
+   * square brackets, but updates to this field will never permit square
+   * brackets.
+   * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Display name for this custom metric as shown in the Analytics UI.
+   * Max length of 82 characters, alphanumeric plus space and underscore
+   * starting with a letter. Legacy system-generated display names may contain
+   * square brackets, but updates to this field will never permit square
+   * brackets.
+   * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 4; + private volatile java.lang.Object description_; + /** + * + * + *
+   * Optional. Description for this custom dimension.
+   * Max length of 150 characters.
+   * 
+ * + * string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Description for this custom dimension.
+   * Max length of 150 characters.
+   * 
+ * + * string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MEASUREMENT_UNIT_FIELD_NUMBER = 5; + private int measurementUnit_; + /** + * + * + *
+   * Required. The type for the custom metric's value.
+   * 
+ * + * + * .google.analytics.admin.v1beta.CustomMetric.MeasurementUnit measurement_unit = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for measurementUnit. + */ + @java.lang.Override + public int getMeasurementUnitValue() { + return measurementUnit_; + } + /** + * + * + *
+   * Required. The type for the custom metric's value.
+   * 
+ * + * + * .google.analytics.admin.v1beta.CustomMetric.MeasurementUnit measurement_unit = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The measurementUnit. + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.CustomMetric.MeasurementUnit getMeasurementUnit() { + @SuppressWarnings("deprecation") + com.google.analytics.admin.v1beta.CustomMetric.MeasurementUnit result = + com.google.analytics.admin.v1beta.CustomMetric.MeasurementUnit.valueOf(measurementUnit_); + return result == null + ? com.google.analytics.admin.v1beta.CustomMetric.MeasurementUnit.UNRECOGNIZED + : result; + } + + public static final int SCOPE_FIELD_NUMBER = 6; + private int scope_; + /** + * + * + *
+   * Required. Immutable. The scope of this custom metric.
+   * 
+ * + * + * .google.analytics.admin.v1beta.CustomMetric.MetricScope scope = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for scope. + */ + @java.lang.Override + public int getScopeValue() { + return scope_; + } + /** + * + * + *
+   * Required. Immutable. The scope of this custom metric.
+   * 
+ * + * + * .google.analytics.admin.v1beta.CustomMetric.MetricScope scope = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The scope. + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.CustomMetric.MetricScope getScope() { + @SuppressWarnings("deprecation") + com.google.analytics.admin.v1beta.CustomMetric.MetricScope result = + com.google.analytics.admin.v1beta.CustomMetric.MetricScope.valueOf(scope_); + return result == null + ? com.google.analytics.admin.v1beta.CustomMetric.MetricScope.UNRECOGNIZED + : result; + } + + public static final int RESTRICTED_METRIC_TYPE_FIELD_NUMBER = 8; + private java.util.List restrictedMetricType_; + private static final com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.analytics.admin.v1beta.CustomMetric.RestrictedMetricType> + restrictedMetricType_converter_ = + new com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, + com.google.analytics.admin.v1beta.CustomMetric.RestrictedMetricType>() { + public com.google.analytics.admin.v1beta.CustomMetric.RestrictedMetricType convert( + java.lang.Integer from) { + @SuppressWarnings("deprecation") + com.google.analytics.admin.v1beta.CustomMetric.RestrictedMetricType result = + com.google.analytics.admin.v1beta.CustomMetric.RestrictedMetricType.valueOf(from); + return result == null + ? com.google.analytics.admin.v1beta.CustomMetric.RestrictedMetricType.UNRECOGNIZED + : result; + } + }; + /** + * + * + *
+   * Optional. Types of restricted data that this metric may contain. Required for metrics
+   * with CURRENCY measurement unit. Must be empty for metrics with a
+   * non-CURRENCY measurement unit.
+   * 
+ * + * + * repeated .google.analytics.admin.v1beta.CustomMetric.RestrictedMetricType restricted_metric_type = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the restrictedMetricType. + */ + @java.lang.Override + public java.util.List + getRestrictedMetricTypeList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.analytics.admin.v1beta.CustomMetric.RestrictedMetricType>( + restrictedMetricType_, restrictedMetricType_converter_); + } + /** + * + * + *
+   * Optional. Types of restricted data that this metric may contain. Required for metrics
+   * with CURRENCY measurement unit. Must be empty for metrics with a
+   * non-CURRENCY measurement unit.
+   * 
+ * + * + * repeated .google.analytics.admin.v1beta.CustomMetric.RestrictedMetricType restricted_metric_type = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of restrictedMetricType. + */ + @java.lang.Override + public int getRestrictedMetricTypeCount() { + return restrictedMetricType_.size(); + } + /** + * + * + *
+   * Optional. Types of restricted data that this metric may contain. Required for metrics
+   * with CURRENCY measurement unit. Must be empty for metrics with a
+   * non-CURRENCY measurement unit.
+   * 
+ * + * + * repeated .google.analytics.admin.v1beta.CustomMetric.RestrictedMetricType restricted_metric_type = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The restrictedMetricType at the given index. + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.CustomMetric.RestrictedMetricType + getRestrictedMetricType(int index) { + return restrictedMetricType_converter_.convert(restrictedMetricType_.get(index)); + } + /** + * + * + *
+   * Optional. Types of restricted data that this metric may contain. Required for metrics
+   * with CURRENCY measurement unit. Must be empty for metrics with a
+   * non-CURRENCY measurement unit.
+   * 
+ * + * + * repeated .google.analytics.admin.v1beta.CustomMetric.RestrictedMetricType restricted_metric_type = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the enum numeric values on the wire for restrictedMetricType. + */ + @java.lang.Override + public java.util.List getRestrictedMetricTypeValueList() { + return restrictedMetricType_; + } + /** + * + * + *
+   * Optional. Types of restricted data that this metric may contain. Required for metrics
+   * with CURRENCY measurement unit. Must be empty for metrics with a
+   * non-CURRENCY measurement unit.
+   * 
+ * + * + * repeated .google.analytics.admin.v1beta.CustomMetric.RestrictedMetricType restricted_metric_type = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of restrictedMetricType at the given index. + */ + @java.lang.Override + public int getRestrictedMetricTypeValue(int index) { + return restrictedMetricType_.get(index); + } + + private int restrictedMetricTypeMemoizedSerializedSize; + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getSerializedSize(); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parameterName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, parameterName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, description_); + } + if (measurementUnit_ + != com.google.analytics.admin.v1beta.CustomMetric.MeasurementUnit + .MEASUREMENT_UNIT_UNSPECIFIED + .getNumber()) { + output.writeEnum(5, measurementUnit_); + } + if (scope_ + != com.google.analytics.admin.v1beta.CustomMetric.MetricScope.METRIC_SCOPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(6, scope_); + } + if (getRestrictedMetricTypeList().size() > 0) { + output.writeUInt32NoTag(66); + output.writeUInt32NoTag(restrictedMetricTypeMemoizedSerializedSize); + } + for (int i = 0; i < restrictedMetricType_.size(); i++) { + output.writeEnumNoTag(restrictedMetricType_.get(i)); + } + unknownFields.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(parameterName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, parameterName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, description_); + } + if (measurementUnit_ + != com.google.analytics.admin.v1beta.CustomMetric.MeasurementUnit + .MEASUREMENT_UNIT_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, measurementUnit_); + } + if (scope_ + != com.google.analytics.admin.v1beta.CustomMetric.MetricScope.METRIC_SCOPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, scope_); + } + { + int dataSize = 0; + for (int i = 0; i < restrictedMetricType_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag( + restrictedMetricType_.get(i)); + } + size += dataSize; + if (!getRestrictedMetricTypeList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + restrictedMetricTypeMemoizedSerializedSize = dataSize; + } + size += unknownFields.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.admin.v1beta.CustomMetric)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.CustomMetric other = + (com.google.analytics.admin.v1beta.CustomMetric) obj; + + if (!getName().equals(other.getName())) return false; + if (!getParameterName().equals(other.getParameterName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (measurementUnit_ != other.measurementUnit_) return false; + if (scope_ != other.scope_) return false; + if (!restrictedMetricType_.equals(other.restrictedMetricType_)) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + PARAMETER_NAME_FIELD_NUMBER; + hash = (53 * hash) + getParameterName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + MEASUREMENT_UNIT_FIELD_NUMBER; + hash = (53 * hash) + measurementUnit_; + hash = (37 * hash) + SCOPE_FIELD_NUMBER; + hash = (53 * hash) + scope_; + if (getRestrictedMetricTypeCount() > 0) { + hash = (37 * hash) + RESTRICTED_METRIC_TYPE_FIELD_NUMBER; + hash = (53 * hash) + restrictedMetricType_.hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.CustomMetric parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.CustomMetric 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.admin.v1beta.CustomMetric parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.CustomMetric 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.admin.v1beta.CustomMetric parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.CustomMetric parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.CustomMetric parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.CustomMetric 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.admin.v1beta.CustomMetric parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.CustomMetric 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.admin.v1beta.CustomMetric parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.CustomMetric 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.admin.v1beta.CustomMetric 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 definition for a custom metric.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.CustomMetric} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.CustomMetric) + com.google.analytics.admin.v1beta.CustomMetricOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_CustomMetric_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_CustomMetric_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.CustomMetric.class, + com.google.analytics.admin.v1beta.CustomMetric.Builder.class); + } + + // Construct using com.google.analytics.admin.v1beta.CustomMetric.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + parameterName_ = ""; + + displayName_ = ""; + + description_ = ""; + + measurementUnit_ = 0; + + scope_ = 0; + + restrictedMetricType_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_CustomMetric_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.CustomMetric getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.CustomMetric.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.CustomMetric build() { + com.google.analytics.admin.v1beta.CustomMetric result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.CustomMetric buildPartial() { + com.google.analytics.admin.v1beta.CustomMetric result = + new com.google.analytics.admin.v1beta.CustomMetric(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.parameterName_ = parameterName_; + result.displayName_ = displayName_; + result.description_ = description_; + result.measurementUnit_ = measurementUnit_; + result.scope_ = scope_; + if (((bitField0_ & 0x00000001) != 0)) { + restrictedMetricType_ = java.util.Collections.unmodifiableList(restrictedMetricType_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.restrictedMetricType_ = restrictedMetricType_; + onBuilt(); + return result; + } + + @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.admin.v1beta.CustomMetric) { + return mergeFrom((com.google.analytics.admin.v1beta.CustomMetric) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1beta.CustomMetric other) { + if (other == com.google.analytics.admin.v1beta.CustomMetric.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getParameterName().isEmpty()) { + parameterName_ = other.parameterName_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (other.measurementUnit_ != 0) { + setMeasurementUnitValue(other.getMeasurementUnitValue()); + } + if (other.scope_ != 0) { + setScopeValue(other.getScopeValue()); + } + if (!other.restrictedMetricType_.isEmpty()) { + if (restrictedMetricType_.isEmpty()) { + restrictedMetricType_ = other.restrictedMetricType_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRestrictedMetricTypeIsMutable(); + restrictedMetricType_.addAll(other.restrictedMetricType_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.CustomMetric parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.analytics.admin.v1beta.CustomMetric) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. Resource name for this CustomMetric resource.
+     * Format: properties/{property}/customMetrics/{customMetric}
+     * 
+ * + * string name = 1 [(.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. Resource name for this CustomMetric resource.
+     * Format: properties/{property}/customMetrics/{customMetric}
+     * 
+ * + * string name = 1 [(.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. Resource name for this CustomMetric resource.
+     * Format: properties/{property}/customMetrics/{customMetric}
+     * 
+ * + * string name = 1 [(.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; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Resource name for this CustomMetric resource.
+     * Format: properties/{property}/customMetrics/{customMetric}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Resource name for this CustomMetric resource.
+     * Format: properties/{property}/customMetrics/{customMetric}
+     * 
+ * + * string name = 1 [(.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; + onChanged(); + return this; + } + + private java.lang.Object parameterName_ = ""; + /** + * + * + *
+     * Required. Immutable. Tagging name for this custom metric.
+     * If this is an event-scoped metric, then this is the event parameter
+     * name.
+     * May only contain alphanumeric and underscore charactes, starting with a
+     * letter. Max length of 40 characters for event-scoped metrics.
+     * 
+ * + * + * string parameter_name = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The parameterName. + */ + public java.lang.String getParameterName() { + java.lang.Object ref = parameterName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parameterName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Immutable. Tagging name for this custom metric.
+     * If this is an event-scoped metric, then this is the event parameter
+     * name.
+     * May only contain alphanumeric and underscore charactes, starting with a
+     * letter. Max length of 40 characters for event-scoped metrics.
+     * 
+ * + * + * string parameter_name = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The bytes for parameterName. + */ + public com.google.protobuf.ByteString getParameterNameBytes() { + java.lang.Object ref = parameterName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parameterName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Immutable. Tagging name for this custom metric.
+     * If this is an event-scoped metric, then this is the event parameter
+     * name.
+     * May only contain alphanumeric and underscore charactes, starting with a
+     * letter. Max length of 40 characters for event-scoped metrics.
+     * 
+ * + * + * string parameter_name = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The parameterName to set. + * @return This builder for chaining. + */ + public Builder setParameterName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parameterName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Immutable. Tagging name for this custom metric.
+     * If this is an event-scoped metric, then this is the event parameter
+     * name.
+     * May only contain alphanumeric and underscore charactes, starting with a
+     * letter. Max length of 40 characters for event-scoped metrics.
+     * 
+ * + * + * string parameter_name = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return This builder for chaining. + */ + public Builder clearParameterName() { + + parameterName_ = getDefaultInstance().getParameterName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Immutable. Tagging name for this custom metric.
+     * If this is an event-scoped metric, then this is the event parameter
+     * name.
+     * May only contain alphanumeric and underscore charactes, starting with a
+     * letter. Max length of 40 characters for event-scoped metrics.
+     * 
+ * + * + * string parameter_name = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The bytes for parameterName to set. + * @return This builder for chaining. + */ + public Builder setParameterNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parameterName_ = value; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Required. Display name for this custom metric as shown in the Analytics UI.
+     * Max length of 82 characters, alphanumeric plus space and underscore
+     * starting with a letter. Legacy system-generated display names may contain
+     * square brackets, but updates to this field will never permit square
+     * brackets.
+     * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Display name for this custom metric as shown in the Analytics UI.
+     * Max length of 82 characters, alphanumeric plus space and underscore
+     * starting with a letter. Legacy system-generated display names may contain
+     * square brackets, but updates to this field will never permit square
+     * brackets.
+     * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Display name for this custom metric as shown in the Analytics UI.
+     * Max length of 82 characters, alphanumeric plus space and underscore
+     * starting with a letter. Legacy system-generated display names may contain
+     * square brackets, but updates to this field will never permit square
+     * brackets.
+     * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Display name for this custom metric as shown in the Analytics UI.
+     * Max length of 82 characters, alphanumeric plus space and underscore
+     * starting with a letter. Legacy system-generated display names may contain
+     * square brackets, but updates to this field will never permit square
+     * brackets.
+     * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Display name for this custom metric as shown in the Analytics UI.
+     * Max length of 82 characters, alphanumeric plus space and underscore
+     * starting with a letter. Legacy system-generated display names may contain
+     * square brackets, but updates to this field will never permit square
+     * brackets.
+     * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * Optional. Description for this custom dimension.
+     * Max length of 150 characters.
+     * 
+ * + * string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Description for this custom dimension.
+     * Max length of 150 characters.
+     * 
+ * + * string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Description for this custom dimension.
+     * Max length of 150 characters.
+     * 
+ * + * string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Description for this custom dimension.
+     * Max length of 150 characters.
+     * 
+ * + * string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Description for this custom dimension.
+     * Max length of 150 characters.
+     * 
+ * + * string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private int measurementUnit_ = 0; + /** + * + * + *
+     * Required. The type for the custom metric's value.
+     * 
+ * + * + * .google.analytics.admin.v1beta.CustomMetric.MeasurementUnit measurement_unit = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for measurementUnit. + */ + @java.lang.Override + public int getMeasurementUnitValue() { + return measurementUnit_; + } + /** + * + * + *
+     * Required. The type for the custom metric's value.
+     * 
+ * + * + * .google.analytics.admin.v1beta.CustomMetric.MeasurementUnit measurement_unit = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for measurementUnit to set. + * @return This builder for chaining. + */ + public Builder setMeasurementUnitValue(int value) { + + measurementUnit_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The type for the custom metric's value.
+     * 
+ * + * + * .google.analytics.admin.v1beta.CustomMetric.MeasurementUnit measurement_unit = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The measurementUnit. + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.CustomMetric.MeasurementUnit getMeasurementUnit() { + @SuppressWarnings("deprecation") + com.google.analytics.admin.v1beta.CustomMetric.MeasurementUnit result = + com.google.analytics.admin.v1beta.CustomMetric.MeasurementUnit.valueOf(measurementUnit_); + return result == null + ? com.google.analytics.admin.v1beta.CustomMetric.MeasurementUnit.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Required. The type for the custom metric's value.
+     * 
+ * + * + * .google.analytics.admin.v1beta.CustomMetric.MeasurementUnit measurement_unit = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The measurementUnit to set. + * @return This builder for chaining. + */ + public Builder setMeasurementUnit( + com.google.analytics.admin.v1beta.CustomMetric.MeasurementUnit value) { + if (value == null) { + throw new NullPointerException(); + } + + measurementUnit_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The type for the custom metric's value.
+     * 
+ * + * + * .google.analytics.admin.v1beta.CustomMetric.MeasurementUnit measurement_unit = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearMeasurementUnit() { + + measurementUnit_ = 0; + onChanged(); + return this; + } + + private int scope_ = 0; + /** + * + * + *
+     * Required. Immutable. The scope of this custom metric.
+     * 
+ * + * + * .google.analytics.admin.v1beta.CustomMetric.MetricScope scope = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for scope. + */ + @java.lang.Override + public int getScopeValue() { + return scope_; + } + /** + * + * + *
+     * Required. Immutable. The scope of this custom metric.
+     * 
+ * + * + * .google.analytics.admin.v1beta.CustomMetric.MetricScope scope = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The enum numeric value on the wire for scope to set. + * @return This builder for chaining. + */ + public Builder setScopeValue(int value) { + + scope_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Immutable. The scope of this custom metric.
+     * 
+ * + * + * .google.analytics.admin.v1beta.CustomMetric.MetricScope scope = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The scope. + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.CustomMetric.MetricScope getScope() { + @SuppressWarnings("deprecation") + com.google.analytics.admin.v1beta.CustomMetric.MetricScope result = + com.google.analytics.admin.v1beta.CustomMetric.MetricScope.valueOf(scope_); + return result == null + ? com.google.analytics.admin.v1beta.CustomMetric.MetricScope.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Required. Immutable. The scope of this custom metric.
+     * 
+ * + * + * .google.analytics.admin.v1beta.CustomMetric.MetricScope scope = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The scope to set. + * @return This builder for chaining. + */ + public Builder setScope(com.google.analytics.admin.v1beta.CustomMetric.MetricScope value) { + if (value == null) { + throw new NullPointerException(); + } + + scope_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Immutable. The scope of this custom metric.
+     * 
+ * + * + * .google.analytics.admin.v1beta.CustomMetric.MetricScope scope = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return This builder for chaining. + */ + public Builder clearScope() { + + scope_ = 0; + onChanged(); + return this; + } + + private java.util.List restrictedMetricType_ = + java.util.Collections.emptyList(); + + private void ensureRestrictedMetricTypeIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + restrictedMetricType_ = new java.util.ArrayList(restrictedMetricType_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Optional. Types of restricted data that this metric may contain. Required for metrics
+     * with CURRENCY measurement unit. Must be empty for metrics with a
+     * non-CURRENCY measurement unit.
+     * 
+ * + * + * repeated .google.analytics.admin.v1beta.CustomMetric.RestrictedMetricType restricted_metric_type = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the restrictedMetricType. + */ + public java.util.List + getRestrictedMetricTypeList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.analytics.admin.v1beta.CustomMetric.RestrictedMetricType>( + restrictedMetricType_, restrictedMetricType_converter_); + } + /** + * + * + *
+     * Optional. Types of restricted data that this metric may contain. Required for metrics
+     * with CURRENCY measurement unit. Must be empty for metrics with a
+     * non-CURRENCY measurement unit.
+     * 
+ * + * + * repeated .google.analytics.admin.v1beta.CustomMetric.RestrictedMetricType restricted_metric_type = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of restrictedMetricType. + */ + public int getRestrictedMetricTypeCount() { + return restrictedMetricType_.size(); + } + /** + * + * + *
+     * Optional. Types of restricted data that this metric may contain. Required for metrics
+     * with CURRENCY measurement unit. Must be empty for metrics with a
+     * non-CURRENCY measurement unit.
+     * 
+ * + * + * repeated .google.analytics.admin.v1beta.CustomMetric.RestrictedMetricType restricted_metric_type = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The restrictedMetricType at the given index. + */ + public com.google.analytics.admin.v1beta.CustomMetric.RestrictedMetricType + getRestrictedMetricType(int index) { + return restrictedMetricType_converter_.convert(restrictedMetricType_.get(index)); + } + /** + * + * + *
+     * Optional. Types of restricted data that this metric may contain. Required for metrics
+     * with CURRENCY measurement unit. Must be empty for metrics with a
+     * non-CURRENCY measurement unit.
+     * 
+ * + * + * repeated .google.analytics.admin.v1beta.CustomMetric.RestrictedMetricType restricted_metric_type = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The restrictedMetricType to set. + * @return This builder for chaining. + */ + public Builder setRestrictedMetricType( + int index, com.google.analytics.admin.v1beta.CustomMetric.RestrictedMetricType value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRestrictedMetricTypeIsMutable(); + restrictedMetricType_.set(index, value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Types of restricted data that this metric may contain. Required for metrics
+     * with CURRENCY measurement unit. Must be empty for metrics with a
+     * non-CURRENCY measurement unit.
+     * 
+ * + * + * repeated .google.analytics.admin.v1beta.CustomMetric.RestrictedMetricType restricted_metric_type = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The restrictedMetricType to add. + * @return This builder for chaining. + */ + public Builder addRestrictedMetricType( + com.google.analytics.admin.v1beta.CustomMetric.RestrictedMetricType value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRestrictedMetricTypeIsMutable(); + restrictedMetricType_.add(value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Types of restricted data that this metric may contain. Required for metrics
+     * with CURRENCY measurement unit. Must be empty for metrics with a
+     * non-CURRENCY measurement unit.
+     * 
+ * + * + * repeated .google.analytics.admin.v1beta.CustomMetric.RestrictedMetricType restricted_metric_type = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The restrictedMetricType to add. + * @return This builder for chaining. + */ + public Builder addAllRestrictedMetricType( + java.lang.Iterable< + ? extends com.google.analytics.admin.v1beta.CustomMetric.RestrictedMetricType> + values) { + ensureRestrictedMetricTypeIsMutable(); + for (com.google.analytics.admin.v1beta.CustomMetric.RestrictedMetricType value : values) { + restrictedMetricType_.add(value.getNumber()); + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Types of restricted data that this metric may contain. Required for metrics
+     * with CURRENCY measurement unit. Must be empty for metrics with a
+     * non-CURRENCY measurement unit.
+     * 
+ * + * + * repeated .google.analytics.admin.v1beta.CustomMetric.RestrictedMetricType restricted_metric_type = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearRestrictedMetricType() { + restrictedMetricType_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Types of restricted data that this metric may contain. Required for metrics
+     * with CURRENCY measurement unit. Must be empty for metrics with a
+     * non-CURRENCY measurement unit.
+     * 
+ * + * + * repeated .google.analytics.admin.v1beta.CustomMetric.RestrictedMetricType restricted_metric_type = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the enum numeric values on the wire for restrictedMetricType. + */ + public java.util.List getRestrictedMetricTypeValueList() { + return java.util.Collections.unmodifiableList(restrictedMetricType_); + } + /** + * + * + *
+     * Optional. Types of restricted data that this metric may contain. Required for metrics
+     * with CURRENCY measurement unit. Must be empty for metrics with a
+     * non-CURRENCY measurement unit.
+     * 
+ * + * + * repeated .google.analytics.admin.v1beta.CustomMetric.RestrictedMetricType restricted_metric_type = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of restrictedMetricType at the given index. + */ + public int getRestrictedMetricTypeValue(int index) { + return restrictedMetricType_.get(index); + } + /** + * + * + *
+     * Optional. Types of restricted data that this metric may contain. Required for metrics
+     * with CURRENCY measurement unit. Must be empty for metrics with a
+     * non-CURRENCY measurement unit.
+     * 
+ * + * + * repeated .google.analytics.admin.v1beta.CustomMetric.RestrictedMetricType restricted_metric_type = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of restrictedMetricType at the given index. + * @return This builder for chaining. + */ + public Builder setRestrictedMetricTypeValue(int index, int value) { + ensureRestrictedMetricTypeIsMutable(); + restrictedMetricType_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Types of restricted data that this metric may contain. Required for metrics
+     * with CURRENCY measurement unit. Must be empty for metrics with a
+     * non-CURRENCY measurement unit.
+     * 
+ * + * + * repeated .google.analytics.admin.v1beta.CustomMetric.RestrictedMetricType restricted_metric_type = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for restrictedMetricType to add. + * @return This builder for chaining. + */ + public Builder addRestrictedMetricTypeValue(int value) { + ensureRestrictedMetricTypeIsMutable(); + restrictedMetricType_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Types of restricted data that this metric may contain. Required for metrics
+     * with CURRENCY measurement unit. Must be empty for metrics with a
+     * non-CURRENCY measurement unit.
+     * 
+ * + * + * repeated .google.analytics.admin.v1beta.CustomMetric.RestrictedMetricType restricted_metric_type = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The enum numeric values on the wire for restrictedMetricType to add. + * @return This builder for chaining. + */ + public Builder addAllRestrictedMetricTypeValue(java.lang.Iterable values) { + ensureRestrictedMetricTypeIsMutable(); + for (int value : values) { + restrictedMetricType_.add(value); + } + 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.admin.v1beta.CustomMetric) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.CustomMetric) + private static final com.google.analytics.admin.v1beta.CustomMetric DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.CustomMetric(); + } + + public static com.google.analytics.admin.v1beta.CustomMetric getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CustomMetric parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CustomMetric(input, extensionRegistry); + } + }; + + 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.admin.v1beta.CustomMetric getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CustomMetricName.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CustomMetricName.java new file mode 100644 index 000000000000..4a6c1bf8aa06 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CustomMetricName.java @@ -0,0 +1,192 @@ +/* + * Copyright 2022 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.admin.v1beta; + +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 CustomMetricName implements ResourceName { + private static final PathTemplate PROPERTY_CUSTOM_METRIC = + PathTemplate.createWithoutUrlEncoding("properties/{property}/customMetrics/{custom_metric}"); + private volatile Map fieldValuesMap; + private final String property; + private final String customMetric; + + @Deprecated + protected CustomMetricName() { + property = null; + customMetric = null; + } + + private CustomMetricName(Builder builder) { + property = Preconditions.checkNotNull(builder.getProperty()); + customMetric = Preconditions.checkNotNull(builder.getCustomMetric()); + } + + public String getProperty() { + return property; + } + + public String getCustomMetric() { + return customMetric; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static CustomMetricName of(String property, String customMetric) { + return newBuilder().setProperty(property).setCustomMetric(customMetric).build(); + } + + public static String format(String property, String customMetric) { + return newBuilder().setProperty(property).setCustomMetric(customMetric).build().toString(); + } + + public static CustomMetricName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROPERTY_CUSTOM_METRIC.validatedMatch( + formattedString, "CustomMetricName.parse: formattedString not in valid format"); + return of(matchMap.get("property"), matchMap.get("custom_metric")); + } + + 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 (CustomMetricName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROPERTY_CUSTOM_METRIC.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 (customMetric != null) { + fieldMapBuilder.put("custom_metric", customMetric); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROPERTY_CUSTOM_METRIC.instantiate("property", property, "custom_metric", customMetric); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + CustomMetricName that = ((CustomMetricName) o); + return Objects.equals(this.property, that.property) + && Objects.equals(this.customMetric, that.customMetric); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(property); + h *= 1000003; + h ^= Objects.hashCode(customMetric); + return h; + } + + /** Builder for properties/{property}/customMetrics/{custom_metric}. */ + public static class Builder { + private String property; + private String customMetric; + + protected Builder() {} + + public String getProperty() { + return property; + } + + public String getCustomMetric() { + return customMetric; + } + + public Builder setProperty(String property) { + this.property = property; + return this; + } + + public Builder setCustomMetric(String customMetric) { + this.customMetric = customMetric; + return this; + } + + private Builder(CustomMetricName customMetricName) { + this.property = customMetricName.property; + this.customMetric = customMetricName.customMetric; + } + + public CustomMetricName build() { + return new CustomMetricName(this); + } + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CustomMetricOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CustomMetricOrBuilder.java new file mode 100644 index 000000000000..085976da90a3 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/CustomMetricOrBuilder.java @@ -0,0 +1,292 @@ +/* + * Copyright 2020 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/admin/v1beta/resources.proto + +package com.google.analytics.admin.v1beta; + +public interface CustomMetricOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.CustomMetric) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Resource name for this CustomMetric resource.
+   * Format: properties/{property}/customMetrics/{customMetric}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. Resource name for this CustomMetric resource.
+   * Format: properties/{property}/customMetrics/{customMetric}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. Immutable. Tagging name for this custom metric.
+   * If this is an event-scoped metric, then this is the event parameter
+   * name.
+   * May only contain alphanumeric and underscore charactes, starting with a
+   * letter. Max length of 40 characters for event-scoped metrics.
+   * 
+ * + * + * string parameter_name = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The parameterName. + */ + java.lang.String getParameterName(); + /** + * + * + *
+   * Required. Immutable. Tagging name for this custom metric.
+   * If this is an event-scoped metric, then this is the event parameter
+   * name.
+   * May only contain alphanumeric and underscore charactes, starting with a
+   * letter. Max length of 40 characters for event-scoped metrics.
+   * 
+ * + * + * string parameter_name = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The bytes for parameterName. + */ + com.google.protobuf.ByteString getParameterNameBytes(); + + /** + * + * + *
+   * Required. Display name for this custom metric as shown in the Analytics UI.
+   * Max length of 82 characters, alphanumeric plus space and underscore
+   * starting with a letter. Legacy system-generated display names may contain
+   * square brackets, but updates to this field will never permit square
+   * brackets.
+   * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Required. Display name for this custom metric as shown in the Analytics UI.
+   * Max length of 82 characters, alphanumeric plus space and underscore
+   * starting with a letter. Legacy system-generated display names may contain
+   * square brackets, but updates to this field will never permit square
+   * brackets.
+   * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Optional. Description for this custom dimension.
+   * Max length of 150 characters.
+   * 
+ * + * string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Optional. Description for this custom dimension.
+   * Max length of 150 characters.
+   * 
+ * + * string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Required. The type for the custom metric's value.
+   * 
+ * + * + * .google.analytics.admin.v1beta.CustomMetric.MeasurementUnit measurement_unit = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for measurementUnit. + */ + int getMeasurementUnitValue(); + /** + * + * + *
+   * Required. The type for the custom metric's value.
+   * 
+ * + * + * .google.analytics.admin.v1beta.CustomMetric.MeasurementUnit measurement_unit = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The measurementUnit. + */ + com.google.analytics.admin.v1beta.CustomMetric.MeasurementUnit getMeasurementUnit(); + + /** + * + * + *
+   * Required. Immutable. The scope of this custom metric.
+   * 
+ * + * + * .google.analytics.admin.v1beta.CustomMetric.MetricScope scope = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for scope. + */ + int getScopeValue(); + /** + * + * + *
+   * Required. Immutable. The scope of this custom metric.
+   * 
+ * + * + * .google.analytics.admin.v1beta.CustomMetric.MetricScope scope = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The scope. + */ + com.google.analytics.admin.v1beta.CustomMetric.MetricScope getScope(); + + /** + * + * + *
+   * Optional. Types of restricted data that this metric may contain. Required for metrics
+   * with CURRENCY measurement unit. Must be empty for metrics with a
+   * non-CURRENCY measurement unit.
+   * 
+ * + * + * repeated .google.analytics.admin.v1beta.CustomMetric.RestrictedMetricType restricted_metric_type = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the restrictedMetricType. + */ + java.util.List + getRestrictedMetricTypeList(); + /** + * + * + *
+   * Optional. Types of restricted data that this metric may contain. Required for metrics
+   * with CURRENCY measurement unit. Must be empty for metrics with a
+   * non-CURRENCY measurement unit.
+   * 
+ * + * + * repeated .google.analytics.admin.v1beta.CustomMetric.RestrictedMetricType restricted_metric_type = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of restrictedMetricType. + */ + int getRestrictedMetricTypeCount(); + /** + * + * + *
+   * Optional. Types of restricted data that this metric may contain. Required for metrics
+   * with CURRENCY measurement unit. Must be empty for metrics with a
+   * non-CURRENCY measurement unit.
+   * 
+ * + * + * repeated .google.analytics.admin.v1beta.CustomMetric.RestrictedMetricType restricted_metric_type = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The restrictedMetricType at the given index. + */ + com.google.analytics.admin.v1beta.CustomMetric.RestrictedMetricType getRestrictedMetricType( + int index); + /** + * + * + *
+   * Optional. Types of restricted data that this metric may contain. Required for metrics
+   * with CURRENCY measurement unit. Must be empty for metrics with a
+   * non-CURRENCY measurement unit.
+   * 
+ * + * + * repeated .google.analytics.admin.v1beta.CustomMetric.RestrictedMetricType restricted_metric_type = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the enum numeric values on the wire for restrictedMetricType. + */ + java.util.List getRestrictedMetricTypeValueList(); + /** + * + * + *
+   * Optional. Types of restricted data that this metric may contain. Required for metrics
+   * with CURRENCY measurement unit. Must be empty for metrics with a
+   * non-CURRENCY measurement unit.
+   * 
+ * + * + * repeated .google.analytics.admin.v1beta.CustomMetric.RestrictedMetricType restricted_metric_type = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of restrictedMetricType at the given index. + */ + int getRestrictedMetricTypeValue(int index); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DataRetentionSettings.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DataRetentionSettings.java new file mode 100644 index 000000000000..bd0626fe508c --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DataRetentionSettings.java @@ -0,0 +1,1153 @@ +/* + * Copyright 2020 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/admin/v1beta/resources.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * Settings values for data retention. This is a singleton resource.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.DataRetentionSettings} + */ +public final class DataRetentionSettings extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.DataRetentionSettings) + DataRetentionSettingsOrBuilder { + private static final long serialVersionUID = 0L; + // Use DataRetentionSettings.newBuilder() to construct. + private DataRetentionSettings(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DataRetentionSettings() { + name_ = ""; + eventDataRetention_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DataRetentionSettings(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DataRetentionSettings( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 16: + { + int rawValue = input.readEnum(); + + eventDataRetention_ = rawValue; + break; + } + case 24: + { + resetUserDataOnNewActivity_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_DataRetentionSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_DataRetentionSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.DataRetentionSettings.class, + com.google.analytics.admin.v1beta.DataRetentionSettings.Builder.class); + } + + /** + * + * + *
+   * Valid values for the data retention duration.
+   * 
+ * + * Protobuf enum {@code google.analytics.admin.v1beta.DataRetentionSettings.RetentionDuration} + */ + public enum RetentionDuration implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Data retention time duration is not specified.
+     * 
+ * + * RETENTION_DURATION_UNSPECIFIED = 0; + */ + RETENTION_DURATION_UNSPECIFIED(0), + /** + * + * + *
+     * The data retention time duration is 2 months.
+     * 
+ * + * TWO_MONTHS = 1; + */ + TWO_MONTHS(1), + /** + * + * + *
+     * The data retention time duration is 14 months.
+     * 
+ * + * FOURTEEN_MONTHS = 3; + */ + FOURTEEN_MONTHS(3), + /** + * + * + *
+     * The data retention time duration is 26 months.
+     * Available to 360 properties only.
+     * 
+ * + * TWENTY_SIX_MONTHS = 4; + */ + TWENTY_SIX_MONTHS(4), + /** + * + * + *
+     * The data retention time duration is 38 months.
+     * Available to 360 properties only.
+     * 
+ * + * THIRTY_EIGHT_MONTHS = 5; + */ + THIRTY_EIGHT_MONTHS(5), + /** + * + * + *
+     * The data retention time duration is 50 months.
+     * Available to 360 properties only.
+     * 
+ * + * FIFTY_MONTHS = 6; + */ + FIFTY_MONTHS(6), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Data retention time duration is not specified.
+     * 
+ * + * RETENTION_DURATION_UNSPECIFIED = 0; + */ + public static final int RETENTION_DURATION_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The data retention time duration is 2 months.
+     * 
+ * + * TWO_MONTHS = 1; + */ + public static final int TWO_MONTHS_VALUE = 1; + /** + * + * + *
+     * The data retention time duration is 14 months.
+     * 
+ * + * FOURTEEN_MONTHS = 3; + */ + public static final int FOURTEEN_MONTHS_VALUE = 3; + /** + * + * + *
+     * The data retention time duration is 26 months.
+     * Available to 360 properties only.
+     * 
+ * + * TWENTY_SIX_MONTHS = 4; + */ + public static final int TWENTY_SIX_MONTHS_VALUE = 4; + /** + * + * + *
+     * The data retention time duration is 38 months.
+     * Available to 360 properties only.
+     * 
+ * + * THIRTY_EIGHT_MONTHS = 5; + */ + public static final int THIRTY_EIGHT_MONTHS_VALUE = 5; + /** + * + * + *
+     * The data retention time duration is 50 months.
+     * Available to 360 properties only.
+     * 
+ * + * FIFTY_MONTHS = 6; + */ + public static final int FIFTY_MONTHS_VALUE = 6; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static RetentionDuration valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static RetentionDuration forNumber(int value) { + switch (value) { + case 0: + return RETENTION_DURATION_UNSPECIFIED; + case 1: + return TWO_MONTHS; + case 3: + return FOURTEEN_MONTHS; + case 4: + return TWENTY_SIX_MONTHS; + case 5: + return THIRTY_EIGHT_MONTHS; + case 6: + return FIFTY_MONTHS; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public RetentionDuration findValueByNumber(int number) { + return RetentionDuration.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.analytics.admin.v1beta.DataRetentionSettings.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final RetentionDuration[] VALUES = values(); + + public static RetentionDuration valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private RetentionDuration(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.analytics.admin.v1beta.DataRetentionSettings.RetentionDuration) + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Output only. Resource name for this DataRetentionSetting resource.
+   * Format: properties/{property}/dataRetentionSettings
+   * 
+ * + * string name = 1 [(.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. Resource name for this DataRetentionSetting resource.
+   * Format: properties/{property}/dataRetentionSettings
+   * 
+ * + * string name = 1 [(.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 EVENT_DATA_RETENTION_FIELD_NUMBER = 2; + private int eventDataRetention_; + /** + * + * + *
+   * The length of time that event-level data is retained.
+   * 
+ * + * + * .google.analytics.admin.v1beta.DataRetentionSettings.RetentionDuration event_data_retention = 2; + * + * + * @return The enum numeric value on the wire for eventDataRetention. + */ + @java.lang.Override + public int getEventDataRetentionValue() { + return eventDataRetention_; + } + /** + * + * + *
+   * The length of time that event-level data is retained.
+   * 
+ * + * + * .google.analytics.admin.v1beta.DataRetentionSettings.RetentionDuration event_data_retention = 2; + * + * + * @return The eventDataRetention. + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.DataRetentionSettings.RetentionDuration + getEventDataRetention() { + @SuppressWarnings("deprecation") + com.google.analytics.admin.v1beta.DataRetentionSettings.RetentionDuration result = + com.google.analytics.admin.v1beta.DataRetentionSettings.RetentionDuration.valueOf( + eventDataRetention_); + return result == null + ? com.google.analytics.admin.v1beta.DataRetentionSettings.RetentionDuration.UNRECOGNIZED + : result; + } + + public static final int RESET_USER_DATA_ON_NEW_ACTIVITY_FIELD_NUMBER = 3; + private boolean resetUserDataOnNewActivity_; + /** + * + * + *
+   * If true, reset the retention period for the user identifier with every
+   * event from that user.
+   * 
+ * + * bool reset_user_data_on_new_activity = 3; + * + * @return The resetUserDataOnNewActivity. + */ + @java.lang.Override + public boolean getResetUserDataOnNewActivity() { + return resetUserDataOnNewActivity_; + } + + 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 (eventDataRetention_ + != com.google.analytics.admin.v1beta.DataRetentionSettings.RetentionDuration + .RETENTION_DURATION_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, eventDataRetention_); + } + if (resetUserDataOnNewActivity_ != false) { + output.writeBool(3, resetUserDataOnNewActivity_); + } + unknownFields.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 (eventDataRetention_ + != com.google.analytics.admin.v1beta.DataRetentionSettings.RetentionDuration + .RETENTION_DURATION_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, eventDataRetention_); + } + if (resetUserDataOnNewActivity_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, resetUserDataOnNewActivity_); + } + size += unknownFields.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.admin.v1beta.DataRetentionSettings)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.DataRetentionSettings other = + (com.google.analytics.admin.v1beta.DataRetentionSettings) obj; + + if (!getName().equals(other.getName())) return false; + if (eventDataRetention_ != other.eventDataRetention_) return false; + if (getResetUserDataOnNewActivity() != other.getResetUserDataOnNewActivity()) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + EVENT_DATA_RETENTION_FIELD_NUMBER; + hash = (53 * hash) + eventDataRetention_; + hash = (37 * hash) + RESET_USER_DATA_ON_NEW_ACTIVITY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getResetUserDataOnNewActivity()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.DataRetentionSettings parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.DataRetentionSettings 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.admin.v1beta.DataRetentionSettings parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.DataRetentionSettings 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.admin.v1beta.DataRetentionSettings parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.DataRetentionSettings parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.DataRetentionSettings parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.DataRetentionSettings 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.admin.v1beta.DataRetentionSettings parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.DataRetentionSettings 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.admin.v1beta.DataRetentionSettings parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.DataRetentionSettings 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.admin.v1beta.DataRetentionSettings 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; + } + /** + * + * + *
+   * Settings values for data retention. This is a singleton resource.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.DataRetentionSettings} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.DataRetentionSettings) + com.google.analytics.admin.v1beta.DataRetentionSettingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_DataRetentionSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_DataRetentionSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.DataRetentionSettings.class, + com.google.analytics.admin.v1beta.DataRetentionSettings.Builder.class); + } + + // Construct using com.google.analytics.admin.v1beta.DataRetentionSettings.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + eventDataRetention_ = 0; + + resetUserDataOnNewActivity_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_DataRetentionSettings_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.DataRetentionSettings getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.DataRetentionSettings.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.DataRetentionSettings build() { + com.google.analytics.admin.v1beta.DataRetentionSettings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.DataRetentionSettings buildPartial() { + com.google.analytics.admin.v1beta.DataRetentionSettings result = + new com.google.analytics.admin.v1beta.DataRetentionSettings(this); + result.name_ = name_; + result.eventDataRetention_ = eventDataRetention_; + result.resetUserDataOnNewActivity_ = resetUserDataOnNewActivity_; + onBuilt(); + return result; + } + + @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.admin.v1beta.DataRetentionSettings) { + return mergeFrom((com.google.analytics.admin.v1beta.DataRetentionSettings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1beta.DataRetentionSettings other) { + if (other == com.google.analytics.admin.v1beta.DataRetentionSettings.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.eventDataRetention_ != 0) { + setEventDataRetentionValue(other.getEventDataRetentionValue()); + } + if (other.getResetUserDataOnNewActivity() != false) { + setResetUserDataOnNewActivity(other.getResetUserDataOnNewActivity()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.DataRetentionSettings parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.DataRetentionSettings) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. Resource name for this DataRetentionSetting resource.
+     * Format: properties/{property}/dataRetentionSettings
+     * 
+ * + * string name = 1 [(.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. Resource name for this DataRetentionSetting resource.
+     * Format: properties/{property}/dataRetentionSettings
+     * 
+ * + * string name = 1 [(.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. Resource name for this DataRetentionSetting resource.
+     * Format: properties/{property}/dataRetentionSettings
+     * 
+ * + * string name = 1 [(.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; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Resource name for this DataRetentionSetting resource.
+     * Format: properties/{property}/dataRetentionSettings
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Resource name for this DataRetentionSetting resource.
+     * Format: properties/{property}/dataRetentionSettings
+     * 
+ * + * string name = 1 [(.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; + onChanged(); + return this; + } + + private int eventDataRetention_ = 0; + /** + * + * + *
+     * The length of time that event-level data is retained.
+     * 
+ * + * + * .google.analytics.admin.v1beta.DataRetentionSettings.RetentionDuration event_data_retention = 2; + * + * + * @return The enum numeric value on the wire for eventDataRetention. + */ + @java.lang.Override + public int getEventDataRetentionValue() { + return eventDataRetention_; + } + /** + * + * + *
+     * The length of time that event-level data is retained.
+     * 
+ * + * + * .google.analytics.admin.v1beta.DataRetentionSettings.RetentionDuration event_data_retention = 2; + * + * + * @param value The enum numeric value on the wire for eventDataRetention to set. + * @return This builder for chaining. + */ + public Builder setEventDataRetentionValue(int value) { + + eventDataRetention_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The length of time that event-level data is retained.
+     * 
+ * + * + * .google.analytics.admin.v1beta.DataRetentionSettings.RetentionDuration event_data_retention = 2; + * + * + * @return The eventDataRetention. + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.DataRetentionSettings.RetentionDuration + getEventDataRetention() { + @SuppressWarnings("deprecation") + com.google.analytics.admin.v1beta.DataRetentionSettings.RetentionDuration result = + com.google.analytics.admin.v1beta.DataRetentionSettings.RetentionDuration.valueOf( + eventDataRetention_); + return result == null + ? com.google.analytics.admin.v1beta.DataRetentionSettings.RetentionDuration.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The length of time that event-level data is retained.
+     * 
+ * + * + * .google.analytics.admin.v1beta.DataRetentionSettings.RetentionDuration event_data_retention = 2; + * + * + * @param value The eventDataRetention to set. + * @return This builder for chaining. + */ + public Builder setEventDataRetention( + com.google.analytics.admin.v1beta.DataRetentionSettings.RetentionDuration value) { + if (value == null) { + throw new NullPointerException(); + } + + eventDataRetention_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The length of time that event-level data is retained.
+     * 
+ * + * + * .google.analytics.admin.v1beta.DataRetentionSettings.RetentionDuration event_data_retention = 2; + * + * + * @return This builder for chaining. + */ + public Builder clearEventDataRetention() { + + eventDataRetention_ = 0; + onChanged(); + return this; + } + + private boolean resetUserDataOnNewActivity_; + /** + * + * + *
+     * If true, reset the retention period for the user identifier with every
+     * event from that user.
+     * 
+ * + * bool reset_user_data_on_new_activity = 3; + * + * @return The resetUserDataOnNewActivity. + */ + @java.lang.Override + public boolean getResetUserDataOnNewActivity() { + return resetUserDataOnNewActivity_; + } + /** + * + * + *
+     * If true, reset the retention period for the user identifier with every
+     * event from that user.
+     * 
+ * + * bool reset_user_data_on_new_activity = 3; + * + * @param value The resetUserDataOnNewActivity to set. + * @return This builder for chaining. + */ + public Builder setResetUserDataOnNewActivity(boolean value) { + + resetUserDataOnNewActivity_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If true, reset the retention period for the user identifier with every
+     * event from that user.
+     * 
+ * + * bool reset_user_data_on_new_activity = 3; + * + * @return This builder for chaining. + */ + public Builder clearResetUserDataOnNewActivity() { + + resetUserDataOnNewActivity_ = false; + 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.admin.v1beta.DataRetentionSettings) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.DataRetentionSettings) + private static final com.google.analytics.admin.v1beta.DataRetentionSettings DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.DataRetentionSettings(); + } + + public static com.google.analytics.admin.v1beta.DataRetentionSettings getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DataRetentionSettings parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DataRetentionSettings(input, extensionRegistry); + } + }; + + 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.admin.v1beta.DataRetentionSettings getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DataRetentionSettingsName.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DataRetentionSettingsName.java new file mode 100644 index 000000000000..0924dba3fdac --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DataRetentionSettingsName.java @@ -0,0 +1,169 @@ +/* + * Copyright 2022 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.admin.v1beta; + +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 DataRetentionSettingsName implements ResourceName { + private static final PathTemplate PROPERTY = + PathTemplate.createWithoutUrlEncoding("properties/{property}/dataRetentionSettings"); + private volatile Map fieldValuesMap; + private final String property; + + @Deprecated + protected DataRetentionSettingsName() { + property = null; + } + + private DataRetentionSettingsName(Builder builder) { + property = Preconditions.checkNotNull(builder.getProperty()); + } + + public String getProperty() { + return property; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static DataRetentionSettingsName of(String property) { + return newBuilder().setProperty(property).build(); + } + + public static String format(String property) { + return newBuilder().setProperty(property).build().toString(); + } + + public static DataRetentionSettingsName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROPERTY.validatedMatch( + formattedString, + "DataRetentionSettingsName.parse: formattedString not in valid format"); + return of(matchMap.get("property")); + } + + 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 (DataRetentionSettingsName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROPERTY.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); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROPERTY.instantiate("property", property); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + DataRetentionSettingsName that = ((DataRetentionSettingsName) o); + return Objects.equals(this.property, that.property); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(property); + return h; + } + + /** Builder for properties/{property}/dataRetentionSettings. */ + public static class Builder { + private String property; + + protected Builder() {} + + public String getProperty() { + return property; + } + + public Builder setProperty(String property) { + this.property = property; + return this; + } + + private Builder(DataRetentionSettingsName dataRetentionSettingsName) { + this.property = dataRetentionSettingsName.property; + } + + public DataRetentionSettingsName build() { + return new DataRetentionSettingsName(this); + } + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DataRetentionSettingsOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DataRetentionSettingsOrBuilder.java new file mode 100644 index 000000000000..bed080308bf6 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DataRetentionSettingsOrBuilder.java @@ -0,0 +1,95 @@ +/* + * Copyright 2020 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/admin/v1beta/resources.proto + +package com.google.analytics.admin.v1beta; + +public interface DataRetentionSettingsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.DataRetentionSettings) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Resource name for this DataRetentionSetting resource.
+   * Format: properties/{property}/dataRetentionSettings
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. Resource name for this DataRetentionSetting resource.
+   * Format: properties/{property}/dataRetentionSettings
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * The length of time that event-level data is retained.
+   * 
+ * + * + * .google.analytics.admin.v1beta.DataRetentionSettings.RetentionDuration event_data_retention = 2; + * + * + * @return The enum numeric value on the wire for eventDataRetention. + */ + int getEventDataRetentionValue(); + /** + * + * + *
+   * The length of time that event-level data is retained.
+   * 
+ * + * + * .google.analytics.admin.v1beta.DataRetentionSettings.RetentionDuration event_data_retention = 2; + * + * + * @return The eventDataRetention. + */ + com.google.analytics.admin.v1beta.DataRetentionSettings.RetentionDuration getEventDataRetention(); + + /** + * + * + *
+   * If true, reset the retention period for the user identifier with every
+   * event from that user.
+   * 
+ * + * bool reset_user_data_on_new_activity = 3; + * + * @return The resetUserDataOnNewActivity. + */ + boolean getResetUserDataOnNewActivity(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DataSharingSettings.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DataSharingSettings.java new file mode 100644 index 000000000000..8832b1fd90a7 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DataSharingSettings.java @@ -0,0 +1,1141 @@ +/* + * Copyright 2020 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/admin/v1beta/resources.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * A resource message representing data sharing settings of a Google Analytics
+ * account.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.DataSharingSettings} + */ +public final class DataSharingSettings extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.DataSharingSettings) + DataSharingSettingsOrBuilder { + private static final long serialVersionUID = 0L; + // Use DataSharingSettings.newBuilder() to construct. + private DataSharingSettings(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DataSharingSettings() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DataSharingSettings(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DataSharingSettings( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 16: + { + sharingWithGoogleSupportEnabled_ = input.readBool(); + break; + } + case 24: + { + sharingWithGoogleAssignedSalesEnabled_ = input.readBool(); + break; + } + case 32: + { + sharingWithGoogleAnySalesEnabled_ = input.readBool(); + break; + } + case 40: + { + sharingWithGoogleProductsEnabled_ = input.readBool(); + break; + } + case 48: + { + sharingWithOthersEnabled_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_DataSharingSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_DataSharingSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.DataSharingSettings.class, + com.google.analytics.admin.v1beta.DataSharingSettings.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Output only. Resource name.
+   * Format: accounts/{account}/dataSharingSettings
+   * Example: "accounts/1000/dataSharingSettings"
+   * 
+ * + * string name = 1 [(.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. Resource name.
+   * Format: accounts/{account}/dataSharingSettings
+   * Example: "accounts/1000/dataSharingSettings"
+   * 
+ * + * string name = 1 [(.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 SHARING_WITH_GOOGLE_SUPPORT_ENABLED_FIELD_NUMBER = 2; + private boolean sharingWithGoogleSupportEnabled_; + /** + * + * + *
+   * Allows Google support to access the data in order to help troubleshoot
+   * issues.
+   * 
+ * + * bool sharing_with_google_support_enabled = 2; + * + * @return The sharingWithGoogleSupportEnabled. + */ + @java.lang.Override + public boolean getSharingWithGoogleSupportEnabled() { + return sharingWithGoogleSupportEnabled_; + } + + public static final int SHARING_WITH_GOOGLE_ASSIGNED_SALES_ENABLED_FIELD_NUMBER = 3; + private boolean sharingWithGoogleAssignedSalesEnabled_; + /** + * + * + *
+   * Allows Google sales teams that are assigned to the customer to access the
+   * data in order to suggest configuration changes to improve results.
+   * Sales team restrictions still apply when enabled.
+   * 
+ * + * bool sharing_with_google_assigned_sales_enabled = 3; + * + * @return The sharingWithGoogleAssignedSalesEnabled. + */ + @java.lang.Override + public boolean getSharingWithGoogleAssignedSalesEnabled() { + return sharingWithGoogleAssignedSalesEnabled_; + } + + public static final int SHARING_WITH_GOOGLE_ANY_SALES_ENABLED_FIELD_NUMBER = 4; + private boolean sharingWithGoogleAnySalesEnabled_; + /** + * + * + *
+   * Allows any of Google sales to access the data in order to suggest
+   * configuration changes to improve results.
+   * 
+ * + * bool sharing_with_google_any_sales_enabled = 4; + * + * @return The sharingWithGoogleAnySalesEnabled. + */ + @java.lang.Override + public boolean getSharingWithGoogleAnySalesEnabled() { + return sharingWithGoogleAnySalesEnabled_; + } + + public static final int SHARING_WITH_GOOGLE_PRODUCTS_ENABLED_FIELD_NUMBER = 5; + private boolean sharingWithGoogleProductsEnabled_; + /** + * + * + *
+   * Allows Google to use the data to improve other Google products or services.
+   * 
+ * + * bool sharing_with_google_products_enabled = 5; + * + * @return The sharingWithGoogleProductsEnabled. + */ + @java.lang.Override + public boolean getSharingWithGoogleProductsEnabled() { + return sharingWithGoogleProductsEnabled_; + } + + public static final int SHARING_WITH_OTHERS_ENABLED_FIELD_NUMBER = 6; + private boolean sharingWithOthersEnabled_; + /** + * + * + *
+   * Allows Google to share the data anonymously in aggregate form with others.
+   * 
+ * + * bool sharing_with_others_enabled = 6; + * + * @return The sharingWithOthersEnabled. + */ + @java.lang.Override + public boolean getSharingWithOthersEnabled() { + return sharingWithOthersEnabled_; + } + + 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 (sharingWithGoogleSupportEnabled_ != false) { + output.writeBool(2, sharingWithGoogleSupportEnabled_); + } + if (sharingWithGoogleAssignedSalesEnabled_ != false) { + output.writeBool(3, sharingWithGoogleAssignedSalesEnabled_); + } + if (sharingWithGoogleAnySalesEnabled_ != false) { + output.writeBool(4, sharingWithGoogleAnySalesEnabled_); + } + if (sharingWithGoogleProductsEnabled_ != false) { + output.writeBool(5, sharingWithGoogleProductsEnabled_); + } + if (sharingWithOthersEnabled_ != false) { + output.writeBool(6, sharingWithOthersEnabled_); + } + unknownFields.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 (sharingWithGoogleSupportEnabled_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 2, sharingWithGoogleSupportEnabled_); + } + if (sharingWithGoogleAssignedSalesEnabled_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 3, sharingWithGoogleAssignedSalesEnabled_); + } + if (sharingWithGoogleAnySalesEnabled_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 4, sharingWithGoogleAnySalesEnabled_); + } + if (sharingWithGoogleProductsEnabled_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 5, sharingWithGoogleProductsEnabled_); + } + if (sharingWithOthersEnabled_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, sharingWithOthersEnabled_); + } + size += unknownFields.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.admin.v1beta.DataSharingSettings)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.DataSharingSettings other = + (com.google.analytics.admin.v1beta.DataSharingSettings) obj; + + if (!getName().equals(other.getName())) return false; + if (getSharingWithGoogleSupportEnabled() != other.getSharingWithGoogleSupportEnabled()) + return false; + if (getSharingWithGoogleAssignedSalesEnabled() + != other.getSharingWithGoogleAssignedSalesEnabled()) return false; + if (getSharingWithGoogleAnySalesEnabled() != other.getSharingWithGoogleAnySalesEnabled()) + return false; + if (getSharingWithGoogleProductsEnabled() != other.getSharingWithGoogleProductsEnabled()) + return false; + if (getSharingWithOthersEnabled() != other.getSharingWithOthersEnabled()) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + SHARING_WITH_GOOGLE_SUPPORT_ENABLED_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashBoolean(getSharingWithGoogleSupportEnabled()); + hash = (37 * hash) + SHARING_WITH_GOOGLE_ASSIGNED_SALES_ENABLED_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashBoolean(getSharingWithGoogleAssignedSalesEnabled()); + hash = (37 * hash) + SHARING_WITH_GOOGLE_ANY_SALES_ENABLED_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashBoolean(getSharingWithGoogleAnySalesEnabled()); + hash = (37 * hash) + SHARING_WITH_GOOGLE_PRODUCTS_ENABLED_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashBoolean(getSharingWithGoogleProductsEnabled()); + hash = (37 * hash) + SHARING_WITH_OTHERS_ENABLED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSharingWithOthersEnabled()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.DataSharingSettings parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.DataSharingSettings 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.admin.v1beta.DataSharingSettings parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.DataSharingSettings 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.admin.v1beta.DataSharingSettings parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.DataSharingSettings parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.DataSharingSettings parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.DataSharingSettings 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.admin.v1beta.DataSharingSettings parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.DataSharingSettings 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.admin.v1beta.DataSharingSettings parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.DataSharingSettings 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.admin.v1beta.DataSharingSettings 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 resource message representing data sharing settings of a Google Analytics
+   * account.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.DataSharingSettings} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.DataSharingSettings) + com.google.analytics.admin.v1beta.DataSharingSettingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_DataSharingSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_DataSharingSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.DataSharingSettings.class, + com.google.analytics.admin.v1beta.DataSharingSettings.Builder.class); + } + + // Construct using com.google.analytics.admin.v1beta.DataSharingSettings.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + sharingWithGoogleSupportEnabled_ = false; + + sharingWithGoogleAssignedSalesEnabled_ = false; + + sharingWithGoogleAnySalesEnabled_ = false; + + sharingWithGoogleProductsEnabled_ = false; + + sharingWithOthersEnabled_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_DataSharingSettings_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.DataSharingSettings getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.DataSharingSettings.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.DataSharingSettings build() { + com.google.analytics.admin.v1beta.DataSharingSettings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.DataSharingSettings buildPartial() { + com.google.analytics.admin.v1beta.DataSharingSettings result = + new com.google.analytics.admin.v1beta.DataSharingSettings(this); + result.name_ = name_; + result.sharingWithGoogleSupportEnabled_ = sharingWithGoogleSupportEnabled_; + result.sharingWithGoogleAssignedSalesEnabled_ = sharingWithGoogleAssignedSalesEnabled_; + result.sharingWithGoogleAnySalesEnabled_ = sharingWithGoogleAnySalesEnabled_; + result.sharingWithGoogleProductsEnabled_ = sharingWithGoogleProductsEnabled_; + result.sharingWithOthersEnabled_ = sharingWithOthersEnabled_; + onBuilt(); + return result; + } + + @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.admin.v1beta.DataSharingSettings) { + return mergeFrom((com.google.analytics.admin.v1beta.DataSharingSettings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1beta.DataSharingSettings other) { + if (other == com.google.analytics.admin.v1beta.DataSharingSettings.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.getSharingWithGoogleSupportEnabled() != false) { + setSharingWithGoogleSupportEnabled(other.getSharingWithGoogleSupportEnabled()); + } + if (other.getSharingWithGoogleAssignedSalesEnabled() != false) { + setSharingWithGoogleAssignedSalesEnabled(other.getSharingWithGoogleAssignedSalesEnabled()); + } + if (other.getSharingWithGoogleAnySalesEnabled() != false) { + setSharingWithGoogleAnySalesEnabled(other.getSharingWithGoogleAnySalesEnabled()); + } + if (other.getSharingWithGoogleProductsEnabled() != false) { + setSharingWithGoogleProductsEnabled(other.getSharingWithGoogleProductsEnabled()); + } + if (other.getSharingWithOthersEnabled() != false) { + setSharingWithOthersEnabled(other.getSharingWithOthersEnabled()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.DataSharingSettings parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.DataSharingSettings) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. Resource name.
+     * Format: accounts/{account}/dataSharingSettings
+     * Example: "accounts/1000/dataSharingSettings"
+     * 
+ * + * string name = 1 [(.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. Resource name.
+     * Format: accounts/{account}/dataSharingSettings
+     * Example: "accounts/1000/dataSharingSettings"
+     * 
+ * + * string name = 1 [(.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. Resource name.
+     * Format: accounts/{account}/dataSharingSettings
+     * Example: "accounts/1000/dataSharingSettings"
+     * 
+ * + * string name = 1 [(.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; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Resource name.
+     * Format: accounts/{account}/dataSharingSettings
+     * Example: "accounts/1000/dataSharingSettings"
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Resource name.
+     * Format: accounts/{account}/dataSharingSettings
+     * Example: "accounts/1000/dataSharingSettings"
+     * 
+ * + * string name = 1 [(.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; + onChanged(); + return this; + } + + private boolean sharingWithGoogleSupportEnabled_; + /** + * + * + *
+     * Allows Google support to access the data in order to help troubleshoot
+     * issues.
+     * 
+ * + * bool sharing_with_google_support_enabled = 2; + * + * @return The sharingWithGoogleSupportEnabled. + */ + @java.lang.Override + public boolean getSharingWithGoogleSupportEnabled() { + return sharingWithGoogleSupportEnabled_; + } + /** + * + * + *
+     * Allows Google support to access the data in order to help troubleshoot
+     * issues.
+     * 
+ * + * bool sharing_with_google_support_enabled = 2; + * + * @param value The sharingWithGoogleSupportEnabled to set. + * @return This builder for chaining. + */ + public Builder setSharingWithGoogleSupportEnabled(boolean value) { + + sharingWithGoogleSupportEnabled_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Allows Google support to access the data in order to help troubleshoot
+     * issues.
+     * 
+ * + * bool sharing_with_google_support_enabled = 2; + * + * @return This builder for chaining. + */ + public Builder clearSharingWithGoogleSupportEnabled() { + + sharingWithGoogleSupportEnabled_ = false; + onChanged(); + return this; + } + + private boolean sharingWithGoogleAssignedSalesEnabled_; + /** + * + * + *
+     * Allows Google sales teams that are assigned to the customer to access the
+     * data in order to suggest configuration changes to improve results.
+     * Sales team restrictions still apply when enabled.
+     * 
+ * + * bool sharing_with_google_assigned_sales_enabled = 3; + * + * @return The sharingWithGoogleAssignedSalesEnabled. + */ + @java.lang.Override + public boolean getSharingWithGoogleAssignedSalesEnabled() { + return sharingWithGoogleAssignedSalesEnabled_; + } + /** + * + * + *
+     * Allows Google sales teams that are assigned to the customer to access the
+     * data in order to suggest configuration changes to improve results.
+     * Sales team restrictions still apply when enabled.
+     * 
+ * + * bool sharing_with_google_assigned_sales_enabled = 3; + * + * @param value The sharingWithGoogleAssignedSalesEnabled to set. + * @return This builder for chaining. + */ + public Builder setSharingWithGoogleAssignedSalesEnabled(boolean value) { + + sharingWithGoogleAssignedSalesEnabled_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Allows Google sales teams that are assigned to the customer to access the
+     * data in order to suggest configuration changes to improve results.
+     * Sales team restrictions still apply when enabled.
+     * 
+ * + * bool sharing_with_google_assigned_sales_enabled = 3; + * + * @return This builder for chaining. + */ + public Builder clearSharingWithGoogleAssignedSalesEnabled() { + + sharingWithGoogleAssignedSalesEnabled_ = false; + onChanged(); + return this; + } + + private boolean sharingWithGoogleAnySalesEnabled_; + /** + * + * + *
+     * Allows any of Google sales to access the data in order to suggest
+     * configuration changes to improve results.
+     * 
+ * + * bool sharing_with_google_any_sales_enabled = 4; + * + * @return The sharingWithGoogleAnySalesEnabled. + */ + @java.lang.Override + public boolean getSharingWithGoogleAnySalesEnabled() { + return sharingWithGoogleAnySalesEnabled_; + } + /** + * + * + *
+     * Allows any of Google sales to access the data in order to suggest
+     * configuration changes to improve results.
+     * 
+ * + * bool sharing_with_google_any_sales_enabled = 4; + * + * @param value The sharingWithGoogleAnySalesEnabled to set. + * @return This builder for chaining. + */ + public Builder setSharingWithGoogleAnySalesEnabled(boolean value) { + + sharingWithGoogleAnySalesEnabled_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Allows any of Google sales to access the data in order to suggest
+     * configuration changes to improve results.
+     * 
+ * + * bool sharing_with_google_any_sales_enabled = 4; + * + * @return This builder for chaining. + */ + public Builder clearSharingWithGoogleAnySalesEnabled() { + + sharingWithGoogleAnySalesEnabled_ = false; + onChanged(); + return this; + } + + private boolean sharingWithGoogleProductsEnabled_; + /** + * + * + *
+     * Allows Google to use the data to improve other Google products or services.
+     * 
+ * + * bool sharing_with_google_products_enabled = 5; + * + * @return The sharingWithGoogleProductsEnabled. + */ + @java.lang.Override + public boolean getSharingWithGoogleProductsEnabled() { + return sharingWithGoogleProductsEnabled_; + } + /** + * + * + *
+     * Allows Google to use the data to improve other Google products or services.
+     * 
+ * + * bool sharing_with_google_products_enabled = 5; + * + * @param value The sharingWithGoogleProductsEnabled to set. + * @return This builder for chaining. + */ + public Builder setSharingWithGoogleProductsEnabled(boolean value) { + + sharingWithGoogleProductsEnabled_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Allows Google to use the data to improve other Google products or services.
+     * 
+ * + * bool sharing_with_google_products_enabled = 5; + * + * @return This builder for chaining. + */ + public Builder clearSharingWithGoogleProductsEnabled() { + + sharingWithGoogleProductsEnabled_ = false; + onChanged(); + return this; + } + + private boolean sharingWithOthersEnabled_; + /** + * + * + *
+     * Allows Google to share the data anonymously in aggregate form with others.
+     * 
+ * + * bool sharing_with_others_enabled = 6; + * + * @return The sharingWithOthersEnabled. + */ + @java.lang.Override + public boolean getSharingWithOthersEnabled() { + return sharingWithOthersEnabled_; + } + /** + * + * + *
+     * Allows Google to share the data anonymously in aggregate form with others.
+     * 
+ * + * bool sharing_with_others_enabled = 6; + * + * @param value The sharingWithOthersEnabled to set. + * @return This builder for chaining. + */ + public Builder setSharingWithOthersEnabled(boolean value) { + + sharingWithOthersEnabled_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Allows Google to share the data anonymously in aggregate form with others.
+     * 
+ * + * bool sharing_with_others_enabled = 6; + * + * @return This builder for chaining. + */ + public Builder clearSharingWithOthersEnabled() { + + sharingWithOthersEnabled_ = false; + 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.admin.v1beta.DataSharingSettings) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.DataSharingSettings) + private static final com.google.analytics.admin.v1beta.DataSharingSettings DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.DataSharingSettings(); + } + + public static com.google.analytics.admin.v1beta.DataSharingSettings getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DataSharingSettings parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DataSharingSettings(input, extensionRegistry); + } + }; + + 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.admin.v1beta.DataSharingSettings getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DataSharingSettingsName.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DataSharingSettingsName.java new file mode 100644 index 000000000000..e805617257de --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DataSharingSettingsName.java @@ -0,0 +1,168 @@ +/* + * Copyright 2022 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.admin.v1beta; + +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 DataSharingSettingsName implements ResourceName { + private static final PathTemplate ACCOUNT = + PathTemplate.createWithoutUrlEncoding("accounts/{account}/dataSharingSettings"); + private volatile Map fieldValuesMap; + private final String account; + + @Deprecated + protected DataSharingSettingsName() { + account = null; + } + + private DataSharingSettingsName(Builder builder) { + account = Preconditions.checkNotNull(builder.getAccount()); + } + + public String getAccount() { + return account; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static DataSharingSettingsName of(String account) { + return newBuilder().setAccount(account).build(); + } + + public static String format(String account) { + return newBuilder().setAccount(account).build().toString(); + } + + public static DataSharingSettingsName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + ACCOUNT.validatedMatch( + formattedString, "DataSharingSettingsName.parse: formattedString not in valid format"); + return of(matchMap.get("account")); + } + + 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 (DataSharingSettingsName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return ACCOUNT.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (account != null) { + fieldMapBuilder.put("account", account); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return ACCOUNT.instantiate("account", account); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + DataSharingSettingsName that = ((DataSharingSettingsName) o); + return Objects.equals(this.account, that.account); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(account); + return h; + } + + /** Builder for accounts/{account}/dataSharingSettings. */ + public static class Builder { + private String account; + + protected Builder() {} + + public String getAccount() { + return account; + } + + public Builder setAccount(String account) { + this.account = account; + return this; + } + + private Builder(DataSharingSettingsName dataSharingSettingsName) { + this.account = dataSharingSettingsName.account; + } + + public DataSharingSettingsName build() { + return new DataSharingSettingsName(this); + } + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DataSharingSettingsOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DataSharingSettingsOrBuilder.java new file mode 100644 index 000000000000..c23e0c309ce3 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DataSharingSettingsOrBuilder.java @@ -0,0 +1,123 @@ +/* + * Copyright 2020 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/admin/v1beta/resources.proto + +package com.google.analytics.admin.v1beta; + +public interface DataSharingSettingsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.DataSharingSettings) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Resource name.
+   * Format: accounts/{account}/dataSharingSettings
+   * Example: "accounts/1000/dataSharingSettings"
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. Resource name.
+   * Format: accounts/{account}/dataSharingSettings
+   * Example: "accounts/1000/dataSharingSettings"
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Allows Google support to access the data in order to help troubleshoot
+   * issues.
+   * 
+ * + * bool sharing_with_google_support_enabled = 2; + * + * @return The sharingWithGoogleSupportEnabled. + */ + boolean getSharingWithGoogleSupportEnabled(); + + /** + * + * + *
+   * Allows Google sales teams that are assigned to the customer to access the
+   * data in order to suggest configuration changes to improve results.
+   * Sales team restrictions still apply when enabled.
+   * 
+ * + * bool sharing_with_google_assigned_sales_enabled = 3; + * + * @return The sharingWithGoogleAssignedSalesEnabled. + */ + boolean getSharingWithGoogleAssignedSalesEnabled(); + + /** + * + * + *
+   * Allows any of Google sales to access the data in order to suggest
+   * configuration changes to improve results.
+   * 
+ * + * bool sharing_with_google_any_sales_enabled = 4; + * + * @return The sharingWithGoogleAnySalesEnabled. + */ + boolean getSharingWithGoogleAnySalesEnabled(); + + /** + * + * + *
+   * Allows Google to use the data to improve other Google products or services.
+   * 
+ * + * bool sharing_with_google_products_enabled = 5; + * + * @return The sharingWithGoogleProductsEnabled. + */ + boolean getSharingWithGoogleProductsEnabled(); + + /** + * + * + *
+   * Allows Google to share the data anonymously in aggregate form with others.
+   * 
+ * + * bool sharing_with_others_enabled = 6; + * + * @return The sharingWithOthersEnabled. + */ + boolean getSharingWithOthersEnabled(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DataStream.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DataStream.java new file mode 100644 index 000000000000..adea2f5eecc2 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DataStream.java @@ -0,0 +1,5779 @@ +/* + * Copyright 2020 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/admin/v1beta/resources.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * A resource message representing a data stream.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.DataStream} + */ +public final class DataStream extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.DataStream) + DataStreamOrBuilder { + private static final long serialVersionUID = 0L; + // Use DataStream.newBuilder() to construct. + private DataStream(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DataStream() { + name_ = ""; + type_ = 0; + displayName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DataStream(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DataStream( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 16: + { + int rawValue = input.readEnum(); + + type_ = rawValue; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 34: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 42: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + com.google.analytics.admin.v1beta.DataStream.WebStreamData.Builder subBuilder = null; + if (streamDataCase_ == 6) { + subBuilder = + ((com.google.analytics.admin.v1beta.DataStream.WebStreamData) streamData_) + .toBuilder(); + } + streamData_ = + input.readMessage( + com.google.analytics.admin.v1beta.DataStream.WebStreamData.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.analytics.admin.v1beta.DataStream.WebStreamData) streamData_); + streamData_ = subBuilder.buildPartial(); + } + streamDataCase_ = 6; + break; + } + case 58: + { + com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData.Builder subBuilder = + null; + if (streamDataCase_ == 7) { + subBuilder = + ((com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData) + streamData_) + .toBuilder(); + } + streamData_ = + input.readMessage( + com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData) + streamData_); + streamData_ = subBuilder.buildPartial(); + } + streamDataCase_ = 7; + break; + } + case 66: + { + com.google.analytics.admin.v1beta.DataStream.IosAppStreamData.Builder subBuilder = + null; + if (streamDataCase_ == 8) { + subBuilder = + ((com.google.analytics.admin.v1beta.DataStream.IosAppStreamData) streamData_) + .toBuilder(); + } + streamData_ = + input.readMessage( + com.google.analytics.admin.v1beta.DataStream.IosAppStreamData.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.analytics.admin.v1beta.DataStream.IosAppStreamData) streamData_); + streamData_ = subBuilder.buildPartial(); + } + streamDataCase_ = 8; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_DataStream_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_DataStream_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.DataStream.class, + com.google.analytics.admin.v1beta.DataStream.Builder.class); + } + + /** + * + * + *
+   * The type of the data stream.
+   * 
+ * + * Protobuf enum {@code google.analytics.admin.v1beta.DataStream.DataStreamType} + */ + public enum DataStreamType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Type unknown or not specified.
+     * 
+ * + * DATA_STREAM_TYPE_UNSPECIFIED = 0; + */ + DATA_STREAM_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Web data stream.
+     * 
+ * + * WEB_DATA_STREAM = 1; + */ + WEB_DATA_STREAM(1), + /** + * + * + *
+     * Android app data stream.
+     * 
+ * + * ANDROID_APP_DATA_STREAM = 2; + */ + ANDROID_APP_DATA_STREAM(2), + /** + * + * + *
+     * iOS app data stream.
+     * 
+ * + * IOS_APP_DATA_STREAM = 3; + */ + IOS_APP_DATA_STREAM(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Type unknown or not specified.
+     * 
+ * + * DATA_STREAM_TYPE_UNSPECIFIED = 0; + */ + public static final int DATA_STREAM_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Web data stream.
+     * 
+ * + * WEB_DATA_STREAM = 1; + */ + public static final int WEB_DATA_STREAM_VALUE = 1; + /** + * + * + *
+     * Android app data stream.
+     * 
+ * + * ANDROID_APP_DATA_STREAM = 2; + */ + public static final int ANDROID_APP_DATA_STREAM_VALUE = 2; + /** + * + * + *
+     * iOS app data stream.
+     * 
+ * + * IOS_APP_DATA_STREAM = 3; + */ + public static final int IOS_APP_DATA_STREAM_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DataStreamType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static DataStreamType forNumber(int value) { + switch (value) { + case 0: + return DATA_STREAM_TYPE_UNSPECIFIED; + case 1: + return WEB_DATA_STREAM; + case 2: + return ANDROID_APP_DATA_STREAM; + case 3: + return IOS_APP_DATA_STREAM; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public DataStreamType findValueByNumber(int number) { + return DataStreamType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.analytics.admin.v1beta.DataStream.getDescriptor().getEnumTypes().get(0); + } + + private static final DataStreamType[] VALUES = values(); + + public static DataStreamType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private DataStreamType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.analytics.admin.v1beta.DataStream.DataStreamType) + } + + public interface WebStreamDataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.DataStream.WebStreamData) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Output only. Analytics "Measurement ID", without the "G-" prefix.
+     * Example: "G-1A2BCD345E" would just be "1A2BCD345E"
+     * 
+ * + * string measurement_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The measurementId. + */ + java.lang.String getMeasurementId(); + /** + * + * + *
+     * Output only. Analytics "Measurement ID", without the "G-" prefix.
+     * Example: "G-1A2BCD345E" would just be "1A2BCD345E"
+     * 
+ * + * string measurement_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for measurementId. + */ + com.google.protobuf.ByteString getMeasurementIdBytes(); + + /** + * + * + *
+     * Output only. ID of the corresponding web app in Firebase, if any.
+     * This ID can change if the web app is deleted and recreated.
+     * 
+ * + * string firebase_app_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The firebaseAppId. + */ + java.lang.String getFirebaseAppId(); + /** + * + * + *
+     * Output only. ID of the corresponding web app in Firebase, if any.
+     * This ID can change if the web app is deleted and recreated.
+     * 
+ * + * string firebase_app_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for firebaseAppId. + */ + com.google.protobuf.ByteString getFirebaseAppIdBytes(); + + /** + * + * + *
+     * Immutable. Domain name of the web app being measured, or empty.
+     * Example: "http://www.google.com", "https://www.google.com"
+     * 
+ * + * string default_uri = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The defaultUri. + */ + java.lang.String getDefaultUri(); + /** + * + * + *
+     * Immutable. Domain name of the web app being measured, or empty.
+     * Example: "http://www.google.com", "https://www.google.com"
+     * 
+ * + * string default_uri = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for defaultUri. + */ + com.google.protobuf.ByteString getDefaultUriBytes(); + } + /** + * + * + *
+   * Data specific to web streams.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.DataStream.WebStreamData} + */ + public static final class WebStreamData extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.DataStream.WebStreamData) + WebStreamDataOrBuilder { + private static final long serialVersionUID = 0L; + // Use WebStreamData.newBuilder() to construct. + private WebStreamData(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private WebStreamData() { + measurementId_ = ""; + firebaseAppId_ = ""; + defaultUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new WebStreamData(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private WebStreamData( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + measurementId_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + firebaseAppId_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + defaultUri_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_DataStream_WebStreamData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_DataStream_WebStreamData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.DataStream.WebStreamData.class, + com.google.analytics.admin.v1beta.DataStream.WebStreamData.Builder.class); + } + + public static final int MEASUREMENT_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object measurementId_; + /** + * + * + *
+     * Output only. Analytics "Measurement ID", without the "G-" prefix.
+     * Example: "G-1A2BCD345E" would just be "1A2BCD345E"
+     * 
+ * + * string measurement_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The measurementId. + */ + @java.lang.Override + public java.lang.String getMeasurementId() { + java.lang.Object ref = measurementId_; + 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(); + measurementId_ = s; + return s; + } + } + /** + * + * + *
+     * Output only. Analytics "Measurement ID", without the "G-" prefix.
+     * Example: "G-1A2BCD345E" would just be "1A2BCD345E"
+     * 
+ * + * string measurement_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for measurementId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMeasurementIdBytes() { + java.lang.Object ref = measurementId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + measurementId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FIREBASE_APP_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object firebaseAppId_; + /** + * + * + *
+     * Output only. ID of the corresponding web app in Firebase, if any.
+     * This ID can change if the web app is deleted and recreated.
+     * 
+ * + * string firebase_app_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The firebaseAppId. + */ + @java.lang.Override + public java.lang.String getFirebaseAppId() { + java.lang.Object ref = firebaseAppId_; + 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(); + firebaseAppId_ = s; + return s; + } + } + /** + * + * + *
+     * Output only. ID of the corresponding web app in Firebase, if any.
+     * This ID can change if the web app is deleted and recreated.
+     * 
+ * + * string firebase_app_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for firebaseAppId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFirebaseAppIdBytes() { + java.lang.Object ref = firebaseAppId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + firebaseAppId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEFAULT_URI_FIELD_NUMBER = 3; + private volatile java.lang.Object defaultUri_; + /** + * + * + *
+     * Immutable. Domain name of the web app being measured, or empty.
+     * Example: "http://www.google.com", "https://www.google.com"
+     * 
+ * + * string default_uri = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The defaultUri. + */ + @java.lang.Override + public java.lang.String getDefaultUri() { + java.lang.Object ref = defaultUri_; + 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(); + defaultUri_ = s; + return s; + } + } + /** + * + * + *
+     * Immutable. Domain name of the web app being measured, or empty.
+     * Example: "http://www.google.com", "https://www.google.com"
+     * 
+ * + * string default_uri = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for defaultUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDefaultUriBytes() { + java.lang.Object ref = defaultUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + defaultUri_ = 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(measurementId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, measurementId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firebaseAppId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, firebaseAppId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(defaultUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, defaultUri_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(measurementId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, measurementId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firebaseAppId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, firebaseAppId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(defaultUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, defaultUri_); + } + size += unknownFields.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.admin.v1beta.DataStream.WebStreamData)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.DataStream.WebStreamData other = + (com.google.analytics.admin.v1beta.DataStream.WebStreamData) obj; + + if (!getMeasurementId().equals(other.getMeasurementId())) return false; + if (!getFirebaseAppId().equals(other.getFirebaseAppId())) return false; + if (!getDefaultUri().equals(other.getDefaultUri())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + MEASUREMENT_ID_FIELD_NUMBER; + hash = (53 * hash) + getMeasurementId().hashCode(); + hash = (37 * hash) + FIREBASE_APP_ID_FIELD_NUMBER; + hash = (53 * hash) + getFirebaseAppId().hashCode(); + hash = (37 * hash) + DEFAULT_URI_FIELD_NUMBER; + hash = (53 * hash) + getDefaultUri().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.DataStream.WebStreamData parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.DataStream.WebStreamData 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.admin.v1beta.DataStream.WebStreamData parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.DataStream.WebStreamData 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.admin.v1beta.DataStream.WebStreamData parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.DataStream.WebStreamData parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.DataStream.WebStreamData parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.DataStream.WebStreamData 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.admin.v1beta.DataStream.WebStreamData parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.DataStream.WebStreamData 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.admin.v1beta.DataStream.WebStreamData parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.DataStream.WebStreamData 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.admin.v1beta.DataStream.WebStreamData 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; + } + /** + * + * + *
+     * Data specific to web streams.
+     * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.DataStream.WebStreamData} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.DataStream.WebStreamData) + com.google.analytics.admin.v1beta.DataStream.WebStreamDataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_DataStream_WebStreamData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_DataStream_WebStreamData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.DataStream.WebStreamData.class, + com.google.analytics.admin.v1beta.DataStream.WebStreamData.Builder.class); + } + + // Construct using com.google.analytics.admin.v1beta.DataStream.WebStreamData.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + measurementId_ = ""; + + firebaseAppId_ = ""; + + defaultUri_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_DataStream_WebStreamData_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.DataStream.WebStreamData + getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.DataStream.WebStreamData.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.DataStream.WebStreamData build() { + com.google.analytics.admin.v1beta.DataStream.WebStreamData result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.DataStream.WebStreamData buildPartial() { + com.google.analytics.admin.v1beta.DataStream.WebStreamData result = + new com.google.analytics.admin.v1beta.DataStream.WebStreamData(this); + result.measurementId_ = measurementId_; + result.firebaseAppId_ = firebaseAppId_; + result.defaultUri_ = defaultUri_; + onBuilt(); + return result; + } + + @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.admin.v1beta.DataStream.WebStreamData) { + return mergeFrom((com.google.analytics.admin.v1beta.DataStream.WebStreamData) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1beta.DataStream.WebStreamData other) { + if (other + == com.google.analytics.admin.v1beta.DataStream.WebStreamData.getDefaultInstance()) + return this; + if (!other.getMeasurementId().isEmpty()) { + measurementId_ = other.measurementId_; + onChanged(); + } + if (!other.getFirebaseAppId().isEmpty()) { + firebaseAppId_ = other.firebaseAppId_; + onChanged(); + } + if (!other.getDefaultUri().isEmpty()) { + defaultUri_ = other.defaultUri_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.DataStream.WebStreamData parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.DataStream.WebStreamData) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object measurementId_ = ""; + /** + * + * + *
+       * Output only. Analytics "Measurement ID", without the "G-" prefix.
+       * Example: "G-1A2BCD345E" would just be "1A2BCD345E"
+       * 
+ * + * string measurement_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The measurementId. + */ + public java.lang.String getMeasurementId() { + java.lang.Object ref = measurementId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + measurementId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Output only. Analytics "Measurement ID", without the "G-" prefix.
+       * Example: "G-1A2BCD345E" would just be "1A2BCD345E"
+       * 
+ * + * string measurement_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for measurementId. + */ + public com.google.protobuf.ByteString getMeasurementIdBytes() { + java.lang.Object ref = measurementId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + measurementId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Output only. Analytics "Measurement ID", without the "G-" prefix.
+       * Example: "G-1A2BCD345E" would just be "1A2BCD345E"
+       * 
+ * + * string measurement_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The measurementId to set. + * @return This builder for chaining. + */ + public Builder setMeasurementId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + measurementId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. Analytics "Measurement ID", without the "G-" prefix.
+       * Example: "G-1A2BCD345E" would just be "1A2BCD345E"
+       * 
+ * + * string measurement_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearMeasurementId() { + + measurementId_ = getDefaultInstance().getMeasurementId(); + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. Analytics "Measurement ID", without the "G-" prefix.
+       * Example: "G-1A2BCD345E" would just be "1A2BCD345E"
+       * 
+ * + * string measurement_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for measurementId to set. + * @return This builder for chaining. + */ + public Builder setMeasurementIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + measurementId_ = value; + onChanged(); + return this; + } + + private java.lang.Object firebaseAppId_ = ""; + /** + * + * + *
+       * Output only. ID of the corresponding web app in Firebase, if any.
+       * This ID can change if the web app is deleted and recreated.
+       * 
+ * + * string firebase_app_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The firebaseAppId. + */ + public java.lang.String getFirebaseAppId() { + java.lang.Object ref = firebaseAppId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + firebaseAppId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Output only. ID of the corresponding web app in Firebase, if any.
+       * This ID can change if the web app is deleted and recreated.
+       * 
+ * + * string firebase_app_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for firebaseAppId. + */ + public com.google.protobuf.ByteString getFirebaseAppIdBytes() { + java.lang.Object ref = firebaseAppId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + firebaseAppId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Output only. ID of the corresponding web app in Firebase, if any.
+       * This ID can change if the web app is deleted and recreated.
+       * 
+ * + * string firebase_app_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The firebaseAppId to set. + * @return This builder for chaining. + */ + public Builder setFirebaseAppId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + firebaseAppId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. ID of the corresponding web app in Firebase, if any.
+       * This ID can change if the web app is deleted and recreated.
+       * 
+ * + * string firebase_app_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearFirebaseAppId() { + + firebaseAppId_ = getDefaultInstance().getFirebaseAppId(); + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. ID of the corresponding web app in Firebase, if any.
+       * This ID can change if the web app is deleted and recreated.
+       * 
+ * + * string firebase_app_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for firebaseAppId to set. + * @return This builder for chaining. + */ + public Builder setFirebaseAppIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + firebaseAppId_ = value; + onChanged(); + return this; + } + + private java.lang.Object defaultUri_ = ""; + /** + * + * + *
+       * Immutable. Domain name of the web app being measured, or empty.
+       * Example: "http://www.google.com", "https://www.google.com"
+       * 
+ * + * string default_uri = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The defaultUri. + */ + public java.lang.String getDefaultUri() { + java.lang.Object ref = defaultUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + defaultUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Immutable. Domain name of the web app being measured, or empty.
+       * Example: "http://www.google.com", "https://www.google.com"
+       * 
+ * + * string default_uri = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for defaultUri. + */ + public com.google.protobuf.ByteString getDefaultUriBytes() { + java.lang.Object ref = defaultUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + defaultUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Immutable. Domain name of the web app being measured, or empty.
+       * Example: "http://www.google.com", "https://www.google.com"
+       * 
+ * + * string default_uri = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The defaultUri to set. + * @return This builder for chaining. + */ + public Builder setDefaultUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + defaultUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Immutable. Domain name of the web app being measured, or empty.
+       * Example: "http://www.google.com", "https://www.google.com"
+       * 
+ * + * string default_uri = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearDefaultUri() { + + defaultUri_ = getDefaultInstance().getDefaultUri(); + onChanged(); + return this; + } + /** + * + * + *
+       * Immutable. Domain name of the web app being measured, or empty.
+       * Example: "http://www.google.com", "https://www.google.com"
+       * 
+ * + * string default_uri = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The bytes for defaultUri to set. + * @return This builder for chaining. + */ + public Builder setDefaultUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + defaultUri_ = value; + 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.admin.v1beta.DataStream.WebStreamData) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.DataStream.WebStreamData) + private static final com.google.analytics.admin.v1beta.DataStream.WebStreamData + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.DataStream.WebStreamData(); + } + + public static com.google.analytics.admin.v1beta.DataStream.WebStreamData getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WebStreamData parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new WebStreamData(input, extensionRegistry); + } + }; + + 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.admin.v1beta.DataStream.WebStreamData getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface AndroidAppStreamDataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.DataStream.AndroidAppStreamData) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Output only. ID of the corresponding Android app in Firebase, if any.
+     * This ID can change if the Android app is deleted and recreated.
+     * 
+ * + * string firebase_app_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The firebaseAppId. + */ + java.lang.String getFirebaseAppId(); + /** + * + * + *
+     * Output only. ID of the corresponding Android app in Firebase, if any.
+     * This ID can change if the Android app is deleted and recreated.
+     * 
+ * + * string firebase_app_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for firebaseAppId. + */ + com.google.protobuf.ByteString getFirebaseAppIdBytes(); + + /** + * + * + *
+     * Immutable. The package name for the app being measured.
+     * Example: "com.example.myandroidapp"
+     * 
+ * + * string package_name = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The packageName. + */ + java.lang.String getPackageName(); + /** + * + * + *
+     * Immutable. The package name for the app being measured.
+     * Example: "com.example.myandroidapp"
+     * 
+ * + * string package_name = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for packageName. + */ + com.google.protobuf.ByteString getPackageNameBytes(); + } + /** + * + * + *
+   * Data specific to Android app streams.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.DataStream.AndroidAppStreamData} + */ + public static final class AndroidAppStreamData extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.DataStream.AndroidAppStreamData) + AndroidAppStreamDataOrBuilder { + private static final long serialVersionUID = 0L; + // Use AndroidAppStreamData.newBuilder() to construct. + private AndroidAppStreamData(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AndroidAppStreamData() { + firebaseAppId_ = ""; + packageName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AndroidAppStreamData(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AndroidAppStreamData( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + firebaseAppId_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + packageName_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_DataStream_AndroidAppStreamData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_DataStream_AndroidAppStreamData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData.class, + com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData.Builder.class); + } + + public static final int FIREBASE_APP_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object firebaseAppId_; + /** + * + * + *
+     * Output only. ID of the corresponding Android app in Firebase, if any.
+     * This ID can change if the Android app is deleted and recreated.
+     * 
+ * + * string firebase_app_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The firebaseAppId. + */ + @java.lang.Override + public java.lang.String getFirebaseAppId() { + java.lang.Object ref = firebaseAppId_; + 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(); + firebaseAppId_ = s; + return s; + } + } + /** + * + * + *
+     * Output only. ID of the corresponding Android app in Firebase, if any.
+     * This ID can change if the Android app is deleted and recreated.
+     * 
+ * + * string firebase_app_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for firebaseAppId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFirebaseAppIdBytes() { + java.lang.Object ref = firebaseAppId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + firebaseAppId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PACKAGE_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object packageName_; + /** + * + * + *
+     * Immutable. The package name for the app being measured.
+     * Example: "com.example.myandroidapp"
+     * 
+ * + * string package_name = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The packageName. + */ + @java.lang.Override + public java.lang.String getPackageName() { + java.lang.Object ref = packageName_; + 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(); + packageName_ = s; + return s; + } + } + /** + * + * + *
+     * Immutable. The package name for the app being measured.
+     * Example: "com.example.myandroidapp"
+     * 
+ * + * string package_name = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for packageName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPackageNameBytes() { + java.lang.Object ref = packageName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + packageName_ = 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(firebaseAppId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, firebaseAppId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(packageName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, packageName_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firebaseAppId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, firebaseAppId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(packageName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, packageName_); + } + size += unknownFields.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.admin.v1beta.DataStream.AndroidAppStreamData)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData other = + (com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData) obj; + + if (!getFirebaseAppId().equals(other.getFirebaseAppId())) return false; + if (!getPackageName().equals(other.getPackageName())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + FIREBASE_APP_ID_FIELD_NUMBER; + hash = (53 * hash) + getFirebaseAppId().hashCode(); + hash = (37 * hash) + PACKAGE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getPackageName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData 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.admin.v1beta.DataStream.AndroidAppStreamData parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData 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.admin.v1beta.DataStream.AndroidAppStreamData parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData 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.admin.v1beta.DataStream.AndroidAppStreamData + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData + 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.admin.v1beta.DataStream.AndroidAppStreamData parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData 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.admin.v1beta.DataStream.AndroidAppStreamData 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; + } + /** + * + * + *
+     * Data specific to Android app streams.
+     * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.DataStream.AndroidAppStreamData} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.DataStream.AndroidAppStreamData) + com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamDataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_DataStream_AndroidAppStreamData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_DataStream_AndroidAppStreamData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData.class, + com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData.Builder.class); + } + + // Construct using + // com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + firebaseAppId_ = ""; + + packageName_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_DataStream_AndroidAppStreamData_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData + getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData build() { + com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData buildPartial() { + com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData result = + new com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData(this); + result.firebaseAppId_ = firebaseAppId_; + result.packageName_ = packageName_; + onBuilt(); + return result; + } + + @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.admin.v1beta.DataStream.AndroidAppStreamData) { + return mergeFrom( + (com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData other) { + if (other + == com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData + .getDefaultInstance()) return this; + if (!other.getFirebaseAppId().isEmpty()) { + firebaseAppId_ = other.firebaseAppId_; + onChanged(); + } + if (!other.getPackageName().isEmpty()) { + packageName_ = other.packageName_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object firebaseAppId_ = ""; + /** + * + * + *
+       * Output only. ID of the corresponding Android app in Firebase, if any.
+       * This ID can change if the Android app is deleted and recreated.
+       * 
+ * + * string firebase_app_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The firebaseAppId. + */ + public java.lang.String getFirebaseAppId() { + java.lang.Object ref = firebaseAppId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + firebaseAppId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Output only. ID of the corresponding Android app in Firebase, if any.
+       * This ID can change if the Android app is deleted and recreated.
+       * 
+ * + * string firebase_app_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for firebaseAppId. + */ + public com.google.protobuf.ByteString getFirebaseAppIdBytes() { + java.lang.Object ref = firebaseAppId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + firebaseAppId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Output only. ID of the corresponding Android app in Firebase, if any.
+       * This ID can change if the Android app is deleted and recreated.
+       * 
+ * + * string firebase_app_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The firebaseAppId to set. + * @return This builder for chaining. + */ + public Builder setFirebaseAppId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + firebaseAppId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. ID of the corresponding Android app in Firebase, if any.
+       * This ID can change if the Android app is deleted and recreated.
+       * 
+ * + * string firebase_app_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearFirebaseAppId() { + + firebaseAppId_ = getDefaultInstance().getFirebaseAppId(); + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. ID of the corresponding Android app in Firebase, if any.
+       * This ID can change if the Android app is deleted and recreated.
+       * 
+ * + * string firebase_app_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for firebaseAppId to set. + * @return This builder for chaining. + */ + public Builder setFirebaseAppIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + firebaseAppId_ = value; + onChanged(); + return this; + } + + private java.lang.Object packageName_ = ""; + /** + * + * + *
+       * Immutable. The package name for the app being measured.
+       * Example: "com.example.myandroidapp"
+       * 
+ * + * string package_name = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The packageName. + */ + public java.lang.String getPackageName() { + java.lang.Object ref = packageName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + packageName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Immutable. The package name for the app being measured.
+       * Example: "com.example.myandroidapp"
+       * 
+ * + * string package_name = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for packageName. + */ + public com.google.protobuf.ByteString getPackageNameBytes() { + java.lang.Object ref = packageName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + packageName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Immutable. The package name for the app being measured.
+       * Example: "com.example.myandroidapp"
+       * 
+ * + * string package_name = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The packageName to set. + * @return This builder for chaining. + */ + public Builder setPackageName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + packageName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Immutable. The package name for the app being measured.
+       * Example: "com.example.myandroidapp"
+       * 
+ * + * string package_name = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearPackageName() { + + packageName_ = getDefaultInstance().getPackageName(); + onChanged(); + return this; + } + /** + * + * + *
+       * Immutable. The package name for the app being measured.
+       * Example: "com.example.myandroidapp"
+       * 
+ * + * string package_name = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The bytes for packageName to set. + * @return This builder for chaining. + */ + public Builder setPackageNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + packageName_ = value; + 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.admin.v1beta.DataStream.AndroidAppStreamData) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.DataStream.AndroidAppStreamData) + private static final com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData(); + } + + public static com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AndroidAppStreamData parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AndroidAppStreamData(input, extensionRegistry); + } + }; + + 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.admin.v1beta.DataStream.AndroidAppStreamData + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface IosAppStreamDataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.DataStream.IosAppStreamData) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Output only. ID of the corresponding iOS app in Firebase, if any.
+     * This ID can change if the iOS app is deleted and recreated.
+     * 
+ * + * string firebase_app_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The firebaseAppId. + */ + java.lang.String getFirebaseAppId(); + /** + * + * + *
+     * Output only. ID of the corresponding iOS app in Firebase, if any.
+     * This ID can change if the iOS app is deleted and recreated.
+     * 
+ * + * string firebase_app_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for firebaseAppId. + */ + com.google.protobuf.ByteString getFirebaseAppIdBytes(); + + /** + * + * + *
+     * Required. Immutable. The Apple App Store Bundle ID for the app
+     * Example: "com.example.myiosapp"
+     * 
+ * + * + * string bundle_id = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bundleId. + */ + java.lang.String getBundleId(); + /** + * + * + *
+     * Required. Immutable. The Apple App Store Bundle ID for the app
+     * Example: "com.example.myiosapp"
+     * 
+ * + * + * string bundle_id = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for bundleId. + */ + com.google.protobuf.ByteString getBundleIdBytes(); + } + /** + * + * + *
+   * Data specific to iOS app streams.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.DataStream.IosAppStreamData} + */ + public static final class IosAppStreamData extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.DataStream.IosAppStreamData) + IosAppStreamDataOrBuilder { + private static final long serialVersionUID = 0L; + // Use IosAppStreamData.newBuilder() to construct. + private IosAppStreamData(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private IosAppStreamData() { + firebaseAppId_ = ""; + bundleId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new IosAppStreamData(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private IosAppStreamData( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + firebaseAppId_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + bundleId_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_DataStream_IosAppStreamData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_DataStream_IosAppStreamData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.DataStream.IosAppStreamData.class, + com.google.analytics.admin.v1beta.DataStream.IosAppStreamData.Builder.class); + } + + public static final int FIREBASE_APP_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object firebaseAppId_; + /** + * + * + *
+     * Output only. ID of the corresponding iOS app in Firebase, if any.
+     * This ID can change if the iOS app is deleted and recreated.
+     * 
+ * + * string firebase_app_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The firebaseAppId. + */ + @java.lang.Override + public java.lang.String getFirebaseAppId() { + java.lang.Object ref = firebaseAppId_; + 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(); + firebaseAppId_ = s; + return s; + } + } + /** + * + * + *
+     * Output only. ID of the corresponding iOS app in Firebase, if any.
+     * This ID can change if the iOS app is deleted and recreated.
+     * 
+ * + * string firebase_app_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for firebaseAppId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFirebaseAppIdBytes() { + java.lang.Object ref = firebaseAppId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + firebaseAppId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BUNDLE_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object bundleId_; + /** + * + * + *
+     * Required. Immutable. The Apple App Store Bundle ID for the app
+     * Example: "com.example.myiosapp"
+     * 
+ * + * + * string bundle_id = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bundleId. + */ + @java.lang.Override + public java.lang.String getBundleId() { + java.lang.Object ref = bundleId_; + 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(); + bundleId_ = s; + return s; + } + } + /** + * + * + *
+     * Required. Immutable. The Apple App Store Bundle ID for the app
+     * Example: "com.example.myiosapp"
+     * 
+ * + * + * string bundle_id = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for bundleId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBundleIdBytes() { + java.lang.Object ref = bundleId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + bundleId_ = 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(firebaseAppId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, firebaseAppId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(bundleId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, bundleId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firebaseAppId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, firebaseAppId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(bundleId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, bundleId_); + } + size += unknownFields.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.admin.v1beta.DataStream.IosAppStreamData)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.DataStream.IosAppStreamData other = + (com.google.analytics.admin.v1beta.DataStream.IosAppStreamData) obj; + + if (!getFirebaseAppId().equals(other.getFirebaseAppId())) return false; + if (!getBundleId().equals(other.getBundleId())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + FIREBASE_APP_ID_FIELD_NUMBER; + hash = (53 * hash) + getFirebaseAppId().hashCode(); + hash = (37 * hash) + BUNDLE_ID_FIELD_NUMBER; + hash = (53 * hash) + getBundleId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.DataStream.IosAppStreamData parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.DataStream.IosAppStreamData 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.admin.v1beta.DataStream.IosAppStreamData parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.DataStream.IosAppStreamData 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.admin.v1beta.DataStream.IosAppStreamData parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.DataStream.IosAppStreamData parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.DataStream.IosAppStreamData parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.DataStream.IosAppStreamData 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.admin.v1beta.DataStream.IosAppStreamData parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.DataStream.IosAppStreamData 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.admin.v1beta.DataStream.IosAppStreamData parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.DataStream.IosAppStreamData 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.admin.v1beta.DataStream.IosAppStreamData 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; + } + /** + * + * + *
+     * Data specific to iOS app streams.
+     * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.DataStream.IosAppStreamData} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.DataStream.IosAppStreamData) + com.google.analytics.admin.v1beta.DataStream.IosAppStreamDataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_DataStream_IosAppStreamData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_DataStream_IosAppStreamData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.DataStream.IosAppStreamData.class, + com.google.analytics.admin.v1beta.DataStream.IosAppStreamData.Builder.class); + } + + // Construct using com.google.analytics.admin.v1beta.DataStream.IosAppStreamData.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + firebaseAppId_ = ""; + + bundleId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_DataStream_IosAppStreamData_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.DataStream.IosAppStreamData + getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.DataStream.IosAppStreamData.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.DataStream.IosAppStreamData build() { + com.google.analytics.admin.v1beta.DataStream.IosAppStreamData result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.DataStream.IosAppStreamData buildPartial() { + com.google.analytics.admin.v1beta.DataStream.IosAppStreamData result = + new com.google.analytics.admin.v1beta.DataStream.IosAppStreamData(this); + result.firebaseAppId_ = firebaseAppId_; + result.bundleId_ = bundleId_; + onBuilt(); + return result; + } + + @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.admin.v1beta.DataStream.IosAppStreamData) { + return mergeFrom((com.google.analytics.admin.v1beta.DataStream.IosAppStreamData) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.analytics.admin.v1beta.DataStream.IosAppStreamData other) { + if (other + == com.google.analytics.admin.v1beta.DataStream.IosAppStreamData.getDefaultInstance()) + return this; + if (!other.getFirebaseAppId().isEmpty()) { + firebaseAppId_ = other.firebaseAppId_; + onChanged(); + } + if (!other.getBundleId().isEmpty()) { + bundleId_ = other.bundleId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.DataStream.IosAppStreamData parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.DataStream.IosAppStreamData) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object firebaseAppId_ = ""; + /** + * + * + *
+       * Output only. ID of the corresponding iOS app in Firebase, if any.
+       * This ID can change if the iOS app is deleted and recreated.
+       * 
+ * + * string firebase_app_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The firebaseAppId. + */ + public java.lang.String getFirebaseAppId() { + java.lang.Object ref = firebaseAppId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + firebaseAppId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Output only. ID of the corresponding iOS app in Firebase, if any.
+       * This ID can change if the iOS app is deleted and recreated.
+       * 
+ * + * string firebase_app_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for firebaseAppId. + */ + public com.google.protobuf.ByteString getFirebaseAppIdBytes() { + java.lang.Object ref = firebaseAppId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + firebaseAppId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Output only. ID of the corresponding iOS app in Firebase, if any.
+       * This ID can change if the iOS app is deleted and recreated.
+       * 
+ * + * string firebase_app_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The firebaseAppId to set. + * @return This builder for chaining. + */ + public Builder setFirebaseAppId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + firebaseAppId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. ID of the corresponding iOS app in Firebase, if any.
+       * This ID can change if the iOS app is deleted and recreated.
+       * 
+ * + * string firebase_app_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearFirebaseAppId() { + + firebaseAppId_ = getDefaultInstance().getFirebaseAppId(); + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. ID of the corresponding iOS app in Firebase, if any.
+       * This ID can change if the iOS app is deleted and recreated.
+       * 
+ * + * string firebase_app_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for firebaseAppId to set. + * @return This builder for chaining. + */ + public Builder setFirebaseAppIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + firebaseAppId_ = value; + onChanged(); + return this; + } + + private java.lang.Object bundleId_ = ""; + /** + * + * + *
+       * Required. Immutable. The Apple App Store Bundle ID for the app
+       * Example: "com.example.myiosapp"
+       * 
+ * + * + * string bundle_id = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bundleId. + */ + public java.lang.String getBundleId() { + java.lang.Object ref = bundleId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + bundleId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. Immutable. The Apple App Store Bundle ID for the app
+       * Example: "com.example.myiosapp"
+       * 
+ * + * + * string bundle_id = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for bundleId. + */ + public com.google.protobuf.ByteString getBundleIdBytes() { + java.lang.Object ref = bundleId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + bundleId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. Immutable. The Apple App Store Bundle ID for the app
+       * Example: "com.example.myiosapp"
+       * 
+ * + * + * string bundle_id = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The bundleId to set. + * @return This builder for chaining. + */ + public Builder setBundleId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + bundleId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Immutable. The Apple App Store Bundle ID for the app
+       * Example: "com.example.myiosapp"
+       * 
+ * + * + * string bundle_id = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearBundleId() { + + bundleId_ = getDefaultInstance().getBundleId(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Immutable. The Apple App Store Bundle ID for the app
+       * Example: "com.example.myiosapp"
+       * 
+ * + * + * string bundle_id = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The bytes for bundleId to set. + * @return This builder for chaining. + */ + public Builder setBundleIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + bundleId_ = value; + 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.admin.v1beta.DataStream.IosAppStreamData) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.DataStream.IosAppStreamData) + private static final com.google.analytics.admin.v1beta.DataStream.IosAppStreamData + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.DataStream.IosAppStreamData(); + } + + public static com.google.analytics.admin.v1beta.DataStream.IosAppStreamData + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IosAppStreamData parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new IosAppStreamData(input, extensionRegistry); + } + }; + + 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.admin.v1beta.DataStream.IosAppStreamData + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int streamDataCase_ = 0; + private java.lang.Object streamData_; + + public enum StreamDataCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + WEB_STREAM_DATA(6), + ANDROID_APP_STREAM_DATA(7), + IOS_APP_STREAM_DATA(8), + STREAMDATA_NOT_SET(0); + private final int value; + + private StreamDataCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static StreamDataCase valueOf(int value) { + return forNumber(value); + } + + public static StreamDataCase forNumber(int value) { + switch (value) { + case 6: + return WEB_STREAM_DATA; + case 7: + return ANDROID_APP_STREAM_DATA; + case 8: + return IOS_APP_STREAM_DATA; + case 0: + return STREAMDATA_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public StreamDataCase getStreamDataCase() { + return StreamDataCase.forNumber(streamDataCase_); + } + + public static final int WEB_STREAM_DATA_FIELD_NUMBER = 6; + /** + * + * + *
+   * Data specific to web streams. Must be populated if type is
+   * WEB_DATA_STREAM.
+   * 
+ * + * .google.analytics.admin.v1beta.DataStream.WebStreamData web_stream_data = 6; + * + * @return Whether the webStreamData field is set. + */ + @java.lang.Override + public boolean hasWebStreamData() { + return streamDataCase_ == 6; + } + /** + * + * + *
+   * Data specific to web streams. Must be populated if type is
+   * WEB_DATA_STREAM.
+   * 
+ * + * .google.analytics.admin.v1beta.DataStream.WebStreamData web_stream_data = 6; + * + * @return The webStreamData. + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.DataStream.WebStreamData getWebStreamData() { + if (streamDataCase_ == 6) { + return (com.google.analytics.admin.v1beta.DataStream.WebStreamData) streamData_; + } + return com.google.analytics.admin.v1beta.DataStream.WebStreamData.getDefaultInstance(); + } + /** + * + * + *
+   * Data specific to web streams. Must be populated if type is
+   * WEB_DATA_STREAM.
+   * 
+ * + * .google.analytics.admin.v1beta.DataStream.WebStreamData web_stream_data = 6; + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.DataStream.WebStreamDataOrBuilder + getWebStreamDataOrBuilder() { + if (streamDataCase_ == 6) { + return (com.google.analytics.admin.v1beta.DataStream.WebStreamData) streamData_; + } + return com.google.analytics.admin.v1beta.DataStream.WebStreamData.getDefaultInstance(); + } + + public static final int ANDROID_APP_STREAM_DATA_FIELD_NUMBER = 7; + /** + * + * + *
+   * Data specific to Android app streams. Must be populated if type is
+   * ANDROID_APP_DATA_STREAM.
+   * 
+ * + * + * .google.analytics.admin.v1beta.DataStream.AndroidAppStreamData android_app_stream_data = 7; + * + * + * @return Whether the androidAppStreamData field is set. + */ + @java.lang.Override + public boolean hasAndroidAppStreamData() { + return streamDataCase_ == 7; + } + /** + * + * + *
+   * Data specific to Android app streams. Must be populated if type is
+   * ANDROID_APP_DATA_STREAM.
+   * 
+ * + * + * .google.analytics.admin.v1beta.DataStream.AndroidAppStreamData android_app_stream_data = 7; + * + * + * @return The androidAppStreamData. + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData + getAndroidAppStreamData() { + if (streamDataCase_ == 7) { + return (com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData) streamData_; + } + return com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData.getDefaultInstance(); + } + /** + * + * + *
+   * Data specific to Android app streams. Must be populated if type is
+   * ANDROID_APP_DATA_STREAM.
+   * 
+ * + * + * .google.analytics.admin.v1beta.DataStream.AndroidAppStreamData android_app_stream_data = 7; + * + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamDataOrBuilder + getAndroidAppStreamDataOrBuilder() { + if (streamDataCase_ == 7) { + return (com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData) streamData_; + } + return com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData.getDefaultInstance(); + } + + public static final int IOS_APP_STREAM_DATA_FIELD_NUMBER = 8; + /** + * + * + *
+   * Data specific to iOS app streams. Must be populated if type is
+   * IOS_APP_DATA_STREAM.
+   * 
+ * + * .google.analytics.admin.v1beta.DataStream.IosAppStreamData ios_app_stream_data = 8; + * + * + * @return Whether the iosAppStreamData field is set. + */ + @java.lang.Override + public boolean hasIosAppStreamData() { + return streamDataCase_ == 8; + } + /** + * + * + *
+   * Data specific to iOS app streams. Must be populated if type is
+   * IOS_APP_DATA_STREAM.
+   * 
+ * + * .google.analytics.admin.v1beta.DataStream.IosAppStreamData ios_app_stream_data = 8; + * + * + * @return The iosAppStreamData. + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.DataStream.IosAppStreamData getIosAppStreamData() { + if (streamDataCase_ == 8) { + return (com.google.analytics.admin.v1beta.DataStream.IosAppStreamData) streamData_; + } + return com.google.analytics.admin.v1beta.DataStream.IosAppStreamData.getDefaultInstance(); + } + /** + * + * + *
+   * Data specific to iOS app streams. Must be populated if type is
+   * IOS_APP_DATA_STREAM.
+   * 
+ * + * .google.analytics.admin.v1beta.DataStream.IosAppStreamData ios_app_stream_data = 8; + * + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.DataStream.IosAppStreamDataOrBuilder + getIosAppStreamDataOrBuilder() { + if (streamDataCase_ == 8) { + return (com.google.analytics.admin.v1beta.DataStream.IosAppStreamData) streamData_; + } + return com.google.analytics.admin.v1beta.DataStream.IosAppStreamData.getDefaultInstance(); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Output only. Resource name of this Data Stream.
+   * Format: properties/{property_id}/dataStreams/{stream_id}
+   * Example: "properties/1000/dataStreams/2000"
+   * 
+ * + * string name = 1 [(.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. Resource name of this Data Stream.
+   * Format: properties/{property_id}/dataStreams/{stream_id}
+   * Example: "properties/1000/dataStreams/2000"
+   * 
+ * + * string name = 1 [(.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 TYPE_FIELD_NUMBER = 2; + private int type_; + /** + * + * + *
+   * Required. Immutable. The type of this DataStream resource.
+   * 
+ * + * + * .google.analytics.admin.v1beta.DataStream.DataStreamType type = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+   * Required. Immutable. The type of this DataStream resource.
+   * 
+ * + * + * .google.analytics.admin.v1beta.DataStream.DataStreamType type = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.DataStream.DataStreamType getType() { + @SuppressWarnings("deprecation") + com.google.analytics.admin.v1beta.DataStream.DataStreamType result = + com.google.analytics.admin.v1beta.DataStream.DataStreamType.valueOf(type_); + return result == null + ? com.google.analytics.admin.v1beta.DataStream.DataStreamType.UNRECOGNIZED + : result; + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 3; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * Human-readable display name for the Data Stream.
+   * Required for web data streams.
+   * The max allowed display name length is 255 UTF-16 code units.
+   * 
+ * + * string display_name = 3; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Human-readable display name for the Data Stream.
+   * Required for web data streams.
+   * The max allowed display name length is 255 UTF-16 code units.
+   * 
+ * + * string display_name = 3; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Time when this stream was originally created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. Time when this stream was originally created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Time when this stream was originally created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. Time when stream payload fields were last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. Time when stream payload fields were last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. Time when stream payload fields were last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + 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 (type_ + != com.google.analytics.admin.v1beta.DataStream.DataStreamType.DATA_STREAM_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, type_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, displayName_); + } + if (createTime_ != null) { + output.writeMessage(4, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(5, getUpdateTime()); + } + if (streamDataCase_ == 6) { + output.writeMessage( + 6, (com.google.analytics.admin.v1beta.DataStream.WebStreamData) streamData_); + } + if (streamDataCase_ == 7) { + output.writeMessage( + 7, (com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData) streamData_); + } + if (streamDataCase_ == 8) { + output.writeMessage( + 8, (com.google.analytics.admin.v1beta.DataStream.IosAppStreamData) streamData_); + } + unknownFields.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 (type_ + != com.google.analytics.admin.v1beta.DataStream.DataStreamType.DATA_STREAM_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, type_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, displayName_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getUpdateTime()); + } + if (streamDataCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.analytics.admin.v1beta.DataStream.WebStreamData) streamData_); + } + if (streamDataCase_ == 7) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, (com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData) streamData_); + } + if (streamDataCase_ == 8) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 8, (com.google.analytics.admin.v1beta.DataStream.IosAppStreamData) streamData_); + } + size += unknownFields.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.admin.v1beta.DataStream)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.DataStream other = + (com.google.analytics.admin.v1beta.DataStream) obj; + + if (!getName().equals(other.getName())) return false; + if (type_ != other.type_) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getStreamDataCase().equals(other.getStreamDataCase())) return false; + switch (streamDataCase_) { + case 6: + if (!getWebStreamData().equals(other.getWebStreamData())) return false; + break; + case 7: + if (!getAndroidAppStreamData().equals(other.getAndroidAppStreamData())) return false; + break; + case 8: + if (!getIosAppStreamData().equals(other.getIosAppStreamData())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) 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) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + switch (streamDataCase_) { + case 6: + hash = (37 * hash) + WEB_STREAM_DATA_FIELD_NUMBER; + hash = (53 * hash) + getWebStreamData().hashCode(); + break; + case 7: + hash = (37 * hash) + ANDROID_APP_STREAM_DATA_FIELD_NUMBER; + hash = (53 * hash) + getAndroidAppStreamData().hashCode(); + break; + case 8: + hash = (37 * hash) + IOS_APP_STREAM_DATA_FIELD_NUMBER; + hash = (53 * hash) + getIosAppStreamData().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.DataStream parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.DataStream 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.admin.v1beta.DataStream parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.DataStream 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.admin.v1beta.DataStream parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.DataStream parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.DataStream parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.DataStream 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.admin.v1beta.DataStream parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.DataStream 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.admin.v1beta.DataStream parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.DataStream 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.admin.v1beta.DataStream 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 resource message representing a data stream.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.DataStream} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.DataStream) + com.google.analytics.admin.v1beta.DataStreamOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_DataStream_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_DataStream_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.DataStream.class, + com.google.analytics.admin.v1beta.DataStream.Builder.class); + } + + // Construct using com.google.analytics.admin.v1beta.DataStream.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + type_ = 0; + + displayName_ = ""; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + streamDataCase_ = 0; + streamData_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_DataStream_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.DataStream getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.DataStream.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.DataStream build() { + com.google.analytics.admin.v1beta.DataStream result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.DataStream buildPartial() { + com.google.analytics.admin.v1beta.DataStream result = + new com.google.analytics.admin.v1beta.DataStream(this); + if (streamDataCase_ == 6) { + if (webStreamDataBuilder_ == null) { + result.streamData_ = streamData_; + } else { + result.streamData_ = webStreamDataBuilder_.build(); + } + } + if (streamDataCase_ == 7) { + if (androidAppStreamDataBuilder_ == null) { + result.streamData_ = streamData_; + } else { + result.streamData_ = androidAppStreamDataBuilder_.build(); + } + } + if (streamDataCase_ == 8) { + if (iosAppStreamDataBuilder_ == null) { + result.streamData_ = streamData_; + } else { + result.streamData_ = iosAppStreamDataBuilder_.build(); + } + } + result.name_ = name_; + result.type_ = type_; + result.displayName_ = displayName_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + result.streamDataCase_ = streamDataCase_; + onBuilt(); + return result; + } + + @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.admin.v1beta.DataStream) { + return mergeFrom((com.google.analytics.admin.v1beta.DataStream) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1beta.DataStream other) { + if (other == com.google.analytics.admin.v1beta.DataStream.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + switch (other.getStreamDataCase()) { + case WEB_STREAM_DATA: + { + mergeWebStreamData(other.getWebStreamData()); + break; + } + case ANDROID_APP_STREAM_DATA: + { + mergeAndroidAppStreamData(other.getAndroidAppStreamData()); + break; + } + case IOS_APP_STREAM_DATA: + { + mergeIosAppStreamData(other.getIosAppStreamData()); + break; + } + case STREAMDATA_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.DataStream parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.analytics.admin.v1beta.DataStream) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int streamDataCase_ = 0; + private java.lang.Object streamData_; + + public StreamDataCase getStreamDataCase() { + return StreamDataCase.forNumber(streamDataCase_); + } + + public Builder clearStreamData() { + streamDataCase_ = 0; + streamData_ = null; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.DataStream.WebStreamData, + com.google.analytics.admin.v1beta.DataStream.WebStreamData.Builder, + com.google.analytics.admin.v1beta.DataStream.WebStreamDataOrBuilder> + webStreamDataBuilder_; + /** + * + * + *
+     * Data specific to web streams. Must be populated if type is
+     * WEB_DATA_STREAM.
+     * 
+ * + * .google.analytics.admin.v1beta.DataStream.WebStreamData web_stream_data = 6; + * + * @return Whether the webStreamData field is set. + */ + @java.lang.Override + public boolean hasWebStreamData() { + return streamDataCase_ == 6; + } + /** + * + * + *
+     * Data specific to web streams. Must be populated if type is
+     * WEB_DATA_STREAM.
+     * 
+ * + * .google.analytics.admin.v1beta.DataStream.WebStreamData web_stream_data = 6; + * + * @return The webStreamData. + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.DataStream.WebStreamData getWebStreamData() { + if (webStreamDataBuilder_ == null) { + if (streamDataCase_ == 6) { + return (com.google.analytics.admin.v1beta.DataStream.WebStreamData) streamData_; + } + return com.google.analytics.admin.v1beta.DataStream.WebStreamData.getDefaultInstance(); + } else { + if (streamDataCase_ == 6) { + return webStreamDataBuilder_.getMessage(); + } + return com.google.analytics.admin.v1beta.DataStream.WebStreamData.getDefaultInstance(); + } + } + /** + * + * + *
+     * Data specific to web streams. Must be populated if type is
+     * WEB_DATA_STREAM.
+     * 
+ * + * .google.analytics.admin.v1beta.DataStream.WebStreamData web_stream_data = 6; + */ + public Builder setWebStreamData( + com.google.analytics.admin.v1beta.DataStream.WebStreamData value) { + if (webStreamDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + streamData_ = value; + onChanged(); + } else { + webStreamDataBuilder_.setMessage(value); + } + streamDataCase_ = 6; + return this; + } + /** + * + * + *
+     * Data specific to web streams. Must be populated if type is
+     * WEB_DATA_STREAM.
+     * 
+ * + * .google.analytics.admin.v1beta.DataStream.WebStreamData web_stream_data = 6; + */ + public Builder setWebStreamData( + com.google.analytics.admin.v1beta.DataStream.WebStreamData.Builder builderForValue) { + if (webStreamDataBuilder_ == null) { + streamData_ = builderForValue.build(); + onChanged(); + } else { + webStreamDataBuilder_.setMessage(builderForValue.build()); + } + streamDataCase_ = 6; + return this; + } + /** + * + * + *
+     * Data specific to web streams. Must be populated if type is
+     * WEB_DATA_STREAM.
+     * 
+ * + * .google.analytics.admin.v1beta.DataStream.WebStreamData web_stream_data = 6; + */ + public Builder mergeWebStreamData( + com.google.analytics.admin.v1beta.DataStream.WebStreamData value) { + if (webStreamDataBuilder_ == null) { + if (streamDataCase_ == 6 + && streamData_ + != com.google.analytics.admin.v1beta.DataStream.WebStreamData + .getDefaultInstance()) { + streamData_ = + com.google.analytics.admin.v1beta.DataStream.WebStreamData.newBuilder( + (com.google.analytics.admin.v1beta.DataStream.WebStreamData) streamData_) + .mergeFrom(value) + .buildPartial(); + } else { + streamData_ = value; + } + onChanged(); + } else { + if (streamDataCase_ == 6) { + webStreamDataBuilder_.mergeFrom(value); + } else { + webStreamDataBuilder_.setMessage(value); + } + } + streamDataCase_ = 6; + return this; + } + /** + * + * + *
+     * Data specific to web streams. Must be populated if type is
+     * WEB_DATA_STREAM.
+     * 
+ * + * .google.analytics.admin.v1beta.DataStream.WebStreamData web_stream_data = 6; + */ + public Builder clearWebStreamData() { + if (webStreamDataBuilder_ == null) { + if (streamDataCase_ == 6) { + streamDataCase_ = 0; + streamData_ = null; + onChanged(); + } + } else { + if (streamDataCase_ == 6) { + streamDataCase_ = 0; + streamData_ = null; + } + webStreamDataBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Data specific to web streams. Must be populated if type is
+     * WEB_DATA_STREAM.
+     * 
+ * + * .google.analytics.admin.v1beta.DataStream.WebStreamData web_stream_data = 6; + */ + public com.google.analytics.admin.v1beta.DataStream.WebStreamData.Builder + getWebStreamDataBuilder() { + return getWebStreamDataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Data specific to web streams. Must be populated if type is
+     * WEB_DATA_STREAM.
+     * 
+ * + * .google.analytics.admin.v1beta.DataStream.WebStreamData web_stream_data = 6; + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.DataStream.WebStreamDataOrBuilder + getWebStreamDataOrBuilder() { + if ((streamDataCase_ == 6) && (webStreamDataBuilder_ != null)) { + return webStreamDataBuilder_.getMessageOrBuilder(); + } else { + if (streamDataCase_ == 6) { + return (com.google.analytics.admin.v1beta.DataStream.WebStreamData) streamData_; + } + return com.google.analytics.admin.v1beta.DataStream.WebStreamData.getDefaultInstance(); + } + } + /** + * + * + *
+     * Data specific to web streams. Must be populated if type is
+     * WEB_DATA_STREAM.
+     * 
+ * + * .google.analytics.admin.v1beta.DataStream.WebStreamData web_stream_data = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.DataStream.WebStreamData, + com.google.analytics.admin.v1beta.DataStream.WebStreamData.Builder, + com.google.analytics.admin.v1beta.DataStream.WebStreamDataOrBuilder> + getWebStreamDataFieldBuilder() { + if (webStreamDataBuilder_ == null) { + if (!(streamDataCase_ == 6)) { + streamData_ = + com.google.analytics.admin.v1beta.DataStream.WebStreamData.getDefaultInstance(); + } + webStreamDataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.DataStream.WebStreamData, + com.google.analytics.admin.v1beta.DataStream.WebStreamData.Builder, + com.google.analytics.admin.v1beta.DataStream.WebStreamDataOrBuilder>( + (com.google.analytics.admin.v1beta.DataStream.WebStreamData) streamData_, + getParentForChildren(), + isClean()); + streamData_ = null; + } + streamDataCase_ = 6; + onChanged(); + ; + return webStreamDataBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData, + com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData.Builder, + com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamDataOrBuilder> + androidAppStreamDataBuilder_; + /** + * + * + *
+     * Data specific to Android app streams. Must be populated if type is
+     * ANDROID_APP_DATA_STREAM.
+     * 
+ * + * + * .google.analytics.admin.v1beta.DataStream.AndroidAppStreamData android_app_stream_data = 7; + * + * + * @return Whether the androidAppStreamData field is set. + */ + @java.lang.Override + public boolean hasAndroidAppStreamData() { + return streamDataCase_ == 7; + } + /** + * + * + *
+     * Data specific to Android app streams. Must be populated if type is
+     * ANDROID_APP_DATA_STREAM.
+     * 
+ * + * + * .google.analytics.admin.v1beta.DataStream.AndroidAppStreamData android_app_stream_data = 7; + * + * + * @return The androidAppStreamData. + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData + getAndroidAppStreamData() { + if (androidAppStreamDataBuilder_ == null) { + if (streamDataCase_ == 7) { + return (com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData) streamData_; + } + return com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData + .getDefaultInstance(); + } else { + if (streamDataCase_ == 7) { + return androidAppStreamDataBuilder_.getMessage(); + } + return com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Data specific to Android app streams. Must be populated if type is
+     * ANDROID_APP_DATA_STREAM.
+     * 
+ * + * + * .google.analytics.admin.v1beta.DataStream.AndroidAppStreamData android_app_stream_data = 7; + * + */ + public Builder setAndroidAppStreamData( + com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData value) { + if (androidAppStreamDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + streamData_ = value; + onChanged(); + } else { + androidAppStreamDataBuilder_.setMessage(value); + } + streamDataCase_ = 7; + return this; + } + /** + * + * + *
+     * Data specific to Android app streams. Must be populated if type is
+     * ANDROID_APP_DATA_STREAM.
+     * 
+ * + * + * .google.analytics.admin.v1beta.DataStream.AndroidAppStreamData android_app_stream_data = 7; + * + */ + public Builder setAndroidAppStreamData( + com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData.Builder builderForValue) { + if (androidAppStreamDataBuilder_ == null) { + streamData_ = builderForValue.build(); + onChanged(); + } else { + androidAppStreamDataBuilder_.setMessage(builderForValue.build()); + } + streamDataCase_ = 7; + return this; + } + /** + * + * + *
+     * Data specific to Android app streams. Must be populated if type is
+     * ANDROID_APP_DATA_STREAM.
+     * 
+ * + * + * .google.analytics.admin.v1beta.DataStream.AndroidAppStreamData android_app_stream_data = 7; + * + */ + public Builder mergeAndroidAppStreamData( + com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData value) { + if (androidAppStreamDataBuilder_ == null) { + if (streamDataCase_ == 7 + && streamData_ + != com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData + .getDefaultInstance()) { + streamData_ = + com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData.newBuilder( + (com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData) + streamData_) + .mergeFrom(value) + .buildPartial(); + } else { + streamData_ = value; + } + onChanged(); + } else { + if (streamDataCase_ == 7) { + androidAppStreamDataBuilder_.mergeFrom(value); + } else { + androidAppStreamDataBuilder_.setMessage(value); + } + } + streamDataCase_ = 7; + return this; + } + /** + * + * + *
+     * Data specific to Android app streams. Must be populated if type is
+     * ANDROID_APP_DATA_STREAM.
+     * 
+ * + * + * .google.analytics.admin.v1beta.DataStream.AndroidAppStreamData android_app_stream_data = 7; + * + */ + public Builder clearAndroidAppStreamData() { + if (androidAppStreamDataBuilder_ == null) { + if (streamDataCase_ == 7) { + streamDataCase_ = 0; + streamData_ = null; + onChanged(); + } + } else { + if (streamDataCase_ == 7) { + streamDataCase_ = 0; + streamData_ = null; + } + androidAppStreamDataBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Data specific to Android app streams. Must be populated if type is
+     * ANDROID_APP_DATA_STREAM.
+     * 
+ * + * + * .google.analytics.admin.v1beta.DataStream.AndroidAppStreamData android_app_stream_data = 7; + * + */ + public com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData.Builder + getAndroidAppStreamDataBuilder() { + return getAndroidAppStreamDataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Data specific to Android app streams. Must be populated if type is
+     * ANDROID_APP_DATA_STREAM.
+     * 
+ * + * + * .google.analytics.admin.v1beta.DataStream.AndroidAppStreamData android_app_stream_data = 7; + * + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamDataOrBuilder + getAndroidAppStreamDataOrBuilder() { + if ((streamDataCase_ == 7) && (androidAppStreamDataBuilder_ != null)) { + return androidAppStreamDataBuilder_.getMessageOrBuilder(); + } else { + if (streamDataCase_ == 7) { + return (com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData) streamData_; + } + return com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Data specific to Android app streams. Must be populated if type is
+     * ANDROID_APP_DATA_STREAM.
+     * 
+ * + * + * .google.analytics.admin.v1beta.DataStream.AndroidAppStreamData android_app_stream_data = 7; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData, + com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData.Builder, + com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamDataOrBuilder> + getAndroidAppStreamDataFieldBuilder() { + if (androidAppStreamDataBuilder_ == null) { + if (!(streamDataCase_ == 7)) { + streamData_ = + com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData + .getDefaultInstance(); + } + androidAppStreamDataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData, + com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData.Builder, + com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamDataOrBuilder>( + (com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData) streamData_, + getParentForChildren(), + isClean()); + streamData_ = null; + } + streamDataCase_ = 7; + onChanged(); + ; + return androidAppStreamDataBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.DataStream.IosAppStreamData, + com.google.analytics.admin.v1beta.DataStream.IosAppStreamData.Builder, + com.google.analytics.admin.v1beta.DataStream.IosAppStreamDataOrBuilder> + iosAppStreamDataBuilder_; + /** + * + * + *
+     * Data specific to iOS app streams. Must be populated if type is
+     * IOS_APP_DATA_STREAM.
+     * 
+ * + * .google.analytics.admin.v1beta.DataStream.IosAppStreamData ios_app_stream_data = 8; + * + * + * @return Whether the iosAppStreamData field is set. + */ + @java.lang.Override + public boolean hasIosAppStreamData() { + return streamDataCase_ == 8; + } + /** + * + * + *
+     * Data specific to iOS app streams. Must be populated if type is
+     * IOS_APP_DATA_STREAM.
+     * 
+ * + * .google.analytics.admin.v1beta.DataStream.IosAppStreamData ios_app_stream_data = 8; + * + * + * @return The iosAppStreamData. + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.DataStream.IosAppStreamData getIosAppStreamData() { + if (iosAppStreamDataBuilder_ == null) { + if (streamDataCase_ == 8) { + return (com.google.analytics.admin.v1beta.DataStream.IosAppStreamData) streamData_; + } + return com.google.analytics.admin.v1beta.DataStream.IosAppStreamData.getDefaultInstance(); + } else { + if (streamDataCase_ == 8) { + return iosAppStreamDataBuilder_.getMessage(); + } + return com.google.analytics.admin.v1beta.DataStream.IosAppStreamData.getDefaultInstance(); + } + } + /** + * + * + *
+     * Data specific to iOS app streams. Must be populated if type is
+     * IOS_APP_DATA_STREAM.
+     * 
+ * + * .google.analytics.admin.v1beta.DataStream.IosAppStreamData ios_app_stream_data = 8; + * + */ + public Builder setIosAppStreamData( + com.google.analytics.admin.v1beta.DataStream.IosAppStreamData value) { + if (iosAppStreamDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + streamData_ = value; + onChanged(); + } else { + iosAppStreamDataBuilder_.setMessage(value); + } + streamDataCase_ = 8; + return this; + } + /** + * + * + *
+     * Data specific to iOS app streams. Must be populated if type is
+     * IOS_APP_DATA_STREAM.
+     * 
+ * + * .google.analytics.admin.v1beta.DataStream.IosAppStreamData ios_app_stream_data = 8; + * + */ + public Builder setIosAppStreamData( + com.google.analytics.admin.v1beta.DataStream.IosAppStreamData.Builder builderForValue) { + if (iosAppStreamDataBuilder_ == null) { + streamData_ = builderForValue.build(); + onChanged(); + } else { + iosAppStreamDataBuilder_.setMessage(builderForValue.build()); + } + streamDataCase_ = 8; + return this; + } + /** + * + * + *
+     * Data specific to iOS app streams. Must be populated if type is
+     * IOS_APP_DATA_STREAM.
+     * 
+ * + * .google.analytics.admin.v1beta.DataStream.IosAppStreamData ios_app_stream_data = 8; + * + */ + public Builder mergeIosAppStreamData( + com.google.analytics.admin.v1beta.DataStream.IosAppStreamData value) { + if (iosAppStreamDataBuilder_ == null) { + if (streamDataCase_ == 8 + && streamData_ + != com.google.analytics.admin.v1beta.DataStream.IosAppStreamData + .getDefaultInstance()) { + streamData_ = + com.google.analytics.admin.v1beta.DataStream.IosAppStreamData.newBuilder( + (com.google.analytics.admin.v1beta.DataStream.IosAppStreamData) streamData_) + .mergeFrom(value) + .buildPartial(); + } else { + streamData_ = value; + } + onChanged(); + } else { + if (streamDataCase_ == 8) { + iosAppStreamDataBuilder_.mergeFrom(value); + } else { + iosAppStreamDataBuilder_.setMessage(value); + } + } + streamDataCase_ = 8; + return this; + } + /** + * + * + *
+     * Data specific to iOS app streams. Must be populated if type is
+     * IOS_APP_DATA_STREAM.
+     * 
+ * + * .google.analytics.admin.v1beta.DataStream.IosAppStreamData ios_app_stream_data = 8; + * + */ + public Builder clearIosAppStreamData() { + if (iosAppStreamDataBuilder_ == null) { + if (streamDataCase_ == 8) { + streamDataCase_ = 0; + streamData_ = null; + onChanged(); + } + } else { + if (streamDataCase_ == 8) { + streamDataCase_ = 0; + streamData_ = null; + } + iosAppStreamDataBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Data specific to iOS app streams. Must be populated if type is
+     * IOS_APP_DATA_STREAM.
+     * 
+ * + * .google.analytics.admin.v1beta.DataStream.IosAppStreamData ios_app_stream_data = 8; + * + */ + public com.google.analytics.admin.v1beta.DataStream.IosAppStreamData.Builder + getIosAppStreamDataBuilder() { + return getIosAppStreamDataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Data specific to iOS app streams. Must be populated if type is
+     * IOS_APP_DATA_STREAM.
+     * 
+ * + * .google.analytics.admin.v1beta.DataStream.IosAppStreamData ios_app_stream_data = 8; + * + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.DataStream.IosAppStreamDataOrBuilder + getIosAppStreamDataOrBuilder() { + if ((streamDataCase_ == 8) && (iosAppStreamDataBuilder_ != null)) { + return iosAppStreamDataBuilder_.getMessageOrBuilder(); + } else { + if (streamDataCase_ == 8) { + return (com.google.analytics.admin.v1beta.DataStream.IosAppStreamData) streamData_; + } + return com.google.analytics.admin.v1beta.DataStream.IosAppStreamData.getDefaultInstance(); + } + } + /** + * + * + *
+     * Data specific to iOS app streams. Must be populated if type is
+     * IOS_APP_DATA_STREAM.
+     * 
+ * + * .google.analytics.admin.v1beta.DataStream.IosAppStreamData ios_app_stream_data = 8; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.DataStream.IosAppStreamData, + com.google.analytics.admin.v1beta.DataStream.IosAppStreamData.Builder, + com.google.analytics.admin.v1beta.DataStream.IosAppStreamDataOrBuilder> + getIosAppStreamDataFieldBuilder() { + if (iosAppStreamDataBuilder_ == null) { + if (!(streamDataCase_ == 8)) { + streamData_ = + com.google.analytics.admin.v1beta.DataStream.IosAppStreamData.getDefaultInstance(); + } + iosAppStreamDataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.DataStream.IosAppStreamData, + com.google.analytics.admin.v1beta.DataStream.IosAppStreamData.Builder, + com.google.analytics.admin.v1beta.DataStream.IosAppStreamDataOrBuilder>( + (com.google.analytics.admin.v1beta.DataStream.IosAppStreamData) streamData_, + getParentForChildren(), + isClean()); + streamData_ = null; + } + streamDataCase_ = 8; + onChanged(); + ; + return iosAppStreamDataBuilder_; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. Resource name of this Data Stream.
+     * Format: properties/{property_id}/dataStreams/{stream_id}
+     * Example: "properties/1000/dataStreams/2000"
+     * 
+ * + * string name = 1 [(.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. Resource name of this Data Stream.
+     * Format: properties/{property_id}/dataStreams/{stream_id}
+     * Example: "properties/1000/dataStreams/2000"
+     * 
+ * + * string name = 1 [(.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. Resource name of this Data Stream.
+     * Format: properties/{property_id}/dataStreams/{stream_id}
+     * Example: "properties/1000/dataStreams/2000"
+     * 
+ * + * string name = 1 [(.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; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Resource name of this Data Stream.
+     * Format: properties/{property_id}/dataStreams/{stream_id}
+     * Example: "properties/1000/dataStreams/2000"
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Resource name of this Data Stream.
+     * Format: properties/{property_id}/dataStreams/{stream_id}
+     * Example: "properties/1000/dataStreams/2000"
+     * 
+ * + * string name = 1 [(.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; + onChanged(); + return this; + } + + private int type_ = 0; + /** + * + * + *
+     * Required. Immutable. The type of this DataStream resource.
+     * 
+ * + * + * .google.analytics.admin.v1beta.DataStream.DataStreamType type = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+     * Required. Immutable. The type of this DataStream resource.
+     * 
+ * + * + * .google.analytics.admin.v1beta.DataStream.DataStreamType type = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + + type_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Immutable. The type of this DataStream resource.
+     * 
+ * + * + * .google.analytics.admin.v1beta.DataStream.DataStreamType type = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.DataStream.DataStreamType getType() { + @SuppressWarnings("deprecation") + com.google.analytics.admin.v1beta.DataStream.DataStreamType result = + com.google.analytics.admin.v1beta.DataStream.DataStreamType.valueOf(type_); + return result == null + ? com.google.analytics.admin.v1beta.DataStream.DataStreamType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Required. Immutable. The type of this DataStream resource.
+     * 
+ * + * + * .google.analytics.admin.v1beta.DataStream.DataStreamType type = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.analytics.admin.v1beta.DataStream.DataStreamType value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Immutable. The type of this DataStream resource.
+     * 
+ * + * + * .google.analytics.admin.v1beta.DataStream.DataStreamType type = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Human-readable display name for the Data Stream.
+     * Required for web data streams.
+     * The max allowed display name length is 255 UTF-16 code units.
+     * 
+ * + * string display_name = 3; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Human-readable display name for the Data Stream.
+     * Required for web data streams.
+     * The max allowed display name length is 255 UTF-16 code units.
+     * 
+ * + * string display_name = 3; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Human-readable display name for the Data Stream.
+     * Required for web data streams.
+     * The max allowed display name length is 255 UTF-16 code units.
+     * 
+ * + * string display_name = 3; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Human-readable display name for the Data Stream.
+     * Required for web data streams.
+     * The max allowed display name length is 255 UTF-16 code units.
+     * 
+ * + * string display_name = 3; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Human-readable display name for the Data Stream.
+     * Required for web data streams.
+     * The max allowed display name length is 255 UTF-16 code units.
+     * 
+ * + * string display_name = 3; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. Time when this stream was originally created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. Time when this stream was originally created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when this stream was originally created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when this stream was originally created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when this stream was originally created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when this stream was originally created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Time when this stream was originally created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when this stream was originally created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Time when this stream was originally created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. Time when stream payload fields were last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * Output only. Time when stream payload fields were last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when stream payload fields were last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when stream payload fields were last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when stream payload fields were last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when stream payload fields were last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Time when stream payload fields were last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when stream payload fields were last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. Time when stream payload fields were last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + @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.admin.v1beta.DataStream) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.DataStream) + private static final com.google.analytics.admin.v1beta.DataStream DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.DataStream(); + } + + public static com.google.analytics.admin.v1beta.DataStream getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DataStream parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DataStream(input, extensionRegistry); + } + }; + + 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.admin.v1beta.DataStream getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DataStreamName.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DataStreamName.java new file mode 100644 index 000000000000..6c9129765bb8 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DataStreamName.java @@ -0,0 +1,192 @@ +/* + * Copyright 2022 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.admin.v1beta; + +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 DataStreamName implements ResourceName { + private static final PathTemplate PROPERTY_DATA_STREAM = + PathTemplate.createWithoutUrlEncoding("properties/{property}/dataStreams/{data_stream}"); + private volatile Map fieldValuesMap; + private final String property; + private final String dataStream; + + @Deprecated + protected DataStreamName() { + property = null; + dataStream = null; + } + + private DataStreamName(Builder builder) { + property = Preconditions.checkNotNull(builder.getProperty()); + dataStream = Preconditions.checkNotNull(builder.getDataStream()); + } + + public String getProperty() { + return property; + } + + public String getDataStream() { + return dataStream; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static DataStreamName of(String property, String dataStream) { + return newBuilder().setProperty(property).setDataStream(dataStream).build(); + } + + public static String format(String property, String dataStream) { + return newBuilder().setProperty(property).setDataStream(dataStream).build().toString(); + } + + public static DataStreamName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROPERTY_DATA_STREAM.validatedMatch( + formattedString, "DataStreamName.parse: formattedString not in valid format"); + return of(matchMap.get("property"), matchMap.get("data_stream")); + } + + 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 (DataStreamName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROPERTY_DATA_STREAM.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 (dataStream != null) { + fieldMapBuilder.put("data_stream", dataStream); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROPERTY_DATA_STREAM.instantiate("property", property, "data_stream", dataStream); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + DataStreamName that = ((DataStreamName) o); + return Objects.equals(this.property, that.property) + && Objects.equals(this.dataStream, that.dataStream); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(property); + h *= 1000003; + h ^= Objects.hashCode(dataStream); + return h; + } + + /** Builder for properties/{property}/dataStreams/{data_stream}. */ + public static class Builder { + private String property; + private String dataStream; + + protected Builder() {} + + public String getProperty() { + return property; + } + + public String getDataStream() { + return dataStream; + } + + public Builder setProperty(String property) { + this.property = property; + return this; + } + + public Builder setDataStream(String dataStream) { + this.dataStream = dataStream; + return this; + } + + private Builder(DataStreamName dataStreamName) { + this.property = dataStreamName.property; + this.dataStream = dataStreamName.dataStream; + } + + public DataStreamName build() { + return new DataStreamName(this); + } + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DataStreamOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DataStreamOrBuilder.java new file mode 100644 index 000000000000..30731d5d4919 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DataStreamOrBuilder.java @@ -0,0 +1,315 @@ +/* + * Copyright 2020 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/admin/v1beta/resources.proto + +package com.google.analytics.admin.v1beta; + +public interface DataStreamOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.DataStream) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Data specific to web streams. Must be populated if type is
+   * WEB_DATA_STREAM.
+   * 
+ * + * .google.analytics.admin.v1beta.DataStream.WebStreamData web_stream_data = 6; + * + * @return Whether the webStreamData field is set. + */ + boolean hasWebStreamData(); + /** + * + * + *
+   * Data specific to web streams. Must be populated if type is
+   * WEB_DATA_STREAM.
+   * 
+ * + * .google.analytics.admin.v1beta.DataStream.WebStreamData web_stream_data = 6; + * + * @return The webStreamData. + */ + com.google.analytics.admin.v1beta.DataStream.WebStreamData getWebStreamData(); + /** + * + * + *
+   * Data specific to web streams. Must be populated if type is
+   * WEB_DATA_STREAM.
+   * 
+ * + * .google.analytics.admin.v1beta.DataStream.WebStreamData web_stream_data = 6; + */ + com.google.analytics.admin.v1beta.DataStream.WebStreamDataOrBuilder getWebStreamDataOrBuilder(); + + /** + * + * + *
+   * Data specific to Android app streams. Must be populated if type is
+   * ANDROID_APP_DATA_STREAM.
+   * 
+ * + * + * .google.analytics.admin.v1beta.DataStream.AndroidAppStreamData android_app_stream_data = 7; + * + * + * @return Whether the androidAppStreamData field is set. + */ + boolean hasAndroidAppStreamData(); + /** + * + * + *
+   * Data specific to Android app streams. Must be populated if type is
+   * ANDROID_APP_DATA_STREAM.
+   * 
+ * + * + * .google.analytics.admin.v1beta.DataStream.AndroidAppStreamData android_app_stream_data = 7; + * + * + * @return The androidAppStreamData. + */ + com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData getAndroidAppStreamData(); + /** + * + * + *
+   * Data specific to Android app streams. Must be populated if type is
+   * ANDROID_APP_DATA_STREAM.
+   * 
+ * + * + * .google.analytics.admin.v1beta.DataStream.AndroidAppStreamData android_app_stream_data = 7; + * + */ + com.google.analytics.admin.v1beta.DataStream.AndroidAppStreamDataOrBuilder + getAndroidAppStreamDataOrBuilder(); + + /** + * + * + *
+   * Data specific to iOS app streams. Must be populated if type is
+   * IOS_APP_DATA_STREAM.
+   * 
+ * + * .google.analytics.admin.v1beta.DataStream.IosAppStreamData ios_app_stream_data = 8; + * + * + * @return Whether the iosAppStreamData field is set. + */ + boolean hasIosAppStreamData(); + /** + * + * + *
+   * Data specific to iOS app streams. Must be populated if type is
+   * IOS_APP_DATA_STREAM.
+   * 
+ * + * .google.analytics.admin.v1beta.DataStream.IosAppStreamData ios_app_stream_data = 8; + * + * + * @return The iosAppStreamData. + */ + com.google.analytics.admin.v1beta.DataStream.IosAppStreamData getIosAppStreamData(); + /** + * + * + *
+   * Data specific to iOS app streams. Must be populated if type is
+   * IOS_APP_DATA_STREAM.
+   * 
+ * + * .google.analytics.admin.v1beta.DataStream.IosAppStreamData ios_app_stream_data = 8; + * + */ + com.google.analytics.admin.v1beta.DataStream.IosAppStreamDataOrBuilder + getIosAppStreamDataOrBuilder(); + + /** + * + * + *
+   * Output only. Resource name of this Data Stream.
+   * Format: properties/{property_id}/dataStreams/{stream_id}
+   * Example: "properties/1000/dataStreams/2000"
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. Resource name of this Data Stream.
+   * Format: properties/{property_id}/dataStreams/{stream_id}
+   * Example: "properties/1000/dataStreams/2000"
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. Immutable. The type of this DataStream resource.
+   * 
+ * + * + * .google.analytics.admin.v1beta.DataStream.DataStreamType type = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + * + * + *
+   * Required. Immutable. The type of this DataStream resource.
+   * 
+ * + * + * .google.analytics.admin.v1beta.DataStream.DataStreamType type = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The type. + */ + com.google.analytics.admin.v1beta.DataStream.DataStreamType getType(); + + /** + * + * + *
+   * Human-readable display name for the Data Stream.
+   * Required for web data streams.
+   * The max allowed display name length is 255 UTF-16 code units.
+   * 
+ * + * string display_name = 3; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Human-readable display name for the Data Stream.
+   * Required for web data streams.
+   * The max allowed display name length is 255 UTF-16 code units.
+   * 
+ * + * string display_name = 3; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Output only. Time when this stream was originally created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Time when this stream was originally created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Time when this stream was originally created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time when stream payload fields were last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. Time when stream payload fields were last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. Time when stream payload fields were last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + public com.google.analytics.admin.v1beta.DataStream.StreamDataCase getStreamDataCase(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DeleteAccountRequest.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DeleteAccountRequest.java new file mode 100644 index 000000000000..8ec0b71b51bd --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DeleteAccountRequest.java @@ -0,0 +1,667 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * Request message for DeleteAccount RPC.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.DeleteAccountRequest} + */ +public final class DeleteAccountRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.DeleteAccountRequest) + DeleteAccountRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteAccountRequest.newBuilder() to construct. + private DeleteAccountRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteAccountRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteAccountRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteAccountRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_DeleteAccountRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_DeleteAccountRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.DeleteAccountRequest.class, + com.google.analytics.admin.v1beta.DeleteAccountRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the Account to soft-delete.
+   * Format: accounts/{account}
+   * Example: "accounts/100"
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the Account to soft-delete.
+   * Format: accounts/{account}
+   * Example: "accounts/100"
+   * 
+ * + * + * 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_); + } + unknownFields.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 += unknownFields.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.admin.v1beta.DeleteAccountRequest)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.DeleteAccountRequest other = + (com.google.analytics.admin.v1beta.DeleteAccountRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.DeleteAccountRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.DeleteAccountRequest 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.admin.v1beta.DeleteAccountRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.DeleteAccountRequest 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.admin.v1beta.DeleteAccountRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.DeleteAccountRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.DeleteAccountRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.DeleteAccountRequest 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.admin.v1beta.DeleteAccountRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.DeleteAccountRequest 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.admin.v1beta.DeleteAccountRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.DeleteAccountRequest 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.admin.v1beta.DeleteAccountRequest 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; + } + /** + * + * + *
+   * Request message for DeleteAccount RPC.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.DeleteAccountRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.DeleteAccountRequest) + com.google.analytics.admin.v1beta.DeleteAccountRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_DeleteAccountRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_DeleteAccountRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.DeleteAccountRequest.class, + com.google.analytics.admin.v1beta.DeleteAccountRequest.Builder.class); + } + + // Construct using com.google.analytics.admin.v1beta.DeleteAccountRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_DeleteAccountRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.DeleteAccountRequest getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.DeleteAccountRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.DeleteAccountRequest build() { + com.google.analytics.admin.v1beta.DeleteAccountRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.DeleteAccountRequest buildPartial() { + com.google.analytics.admin.v1beta.DeleteAccountRequest result = + new com.google.analytics.admin.v1beta.DeleteAccountRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @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.admin.v1beta.DeleteAccountRequest) { + return mergeFrom((com.google.analytics.admin.v1beta.DeleteAccountRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1beta.DeleteAccountRequest other) { + if (other == com.google.analytics.admin.v1beta.DeleteAccountRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.DeleteAccountRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.DeleteAccountRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the Account to soft-delete.
+     * Format: accounts/{account}
+     * Example: "accounts/100"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the Account to soft-delete.
+     * Format: accounts/{account}
+     * Example: "accounts/100"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the Account to soft-delete.
+     * Format: accounts/{account}
+     * Example: "accounts/100"
+     * 
+ * + * + * 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; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the Account to soft-delete.
+     * Format: accounts/{account}
+     * Example: "accounts/100"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the Account to soft-delete.
+     * Format: accounts/{account}
+     * Example: "accounts/100"
+     * 
+ * + * + * 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; + 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.admin.v1beta.DeleteAccountRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.DeleteAccountRequest) + private static final com.google.analytics.admin.v1beta.DeleteAccountRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.DeleteAccountRequest(); + } + + public static com.google.analytics.admin.v1beta.DeleteAccountRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteAccountRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteAccountRequest(input, extensionRegistry); + } + }; + + 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.admin.v1beta.DeleteAccountRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DeleteAccountRequestOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DeleteAccountRequestOrBuilder.java new file mode 100644 index 000000000000..416667007523 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DeleteAccountRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +public interface DeleteAccountRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.DeleteAccountRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the Account to soft-delete.
+   * Format: accounts/{account}
+   * Example: "accounts/100"
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the Account to soft-delete.
+   * Format: accounts/{account}
+   * Example: "accounts/100"
+   * 
+ * + * + * 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-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DeleteConversionEventRequest.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DeleteConversionEventRequest.java new file mode 100644 index 000000000000..dd942c8ac2a4 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DeleteConversionEventRequest.java @@ -0,0 +1,673 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * Request message for DeleteConversionEvent RPC
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.DeleteConversionEventRequest} + */ +public final class DeleteConversionEventRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.DeleteConversionEventRequest) + DeleteConversionEventRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteConversionEventRequest.newBuilder() to construct. + private DeleteConversionEventRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteConversionEventRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteConversionEventRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteConversionEventRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_DeleteConversionEventRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_DeleteConversionEventRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.DeleteConversionEventRequest.class, + com.google.analytics.admin.v1beta.DeleteConversionEventRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The resource name of the conversion event to delete.
+   * Format: properties/{property}/conversionEvents/{conversion_event}
+   * Example: "properties/123/conversionEvents/456"
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the conversion event to delete.
+   * Format: properties/{property}/conversionEvents/{conversion_event}
+   * Example: "properties/123/conversionEvents/456"
+   * 
+ * + * + * 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_); + } + unknownFields.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 += unknownFields.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.admin.v1beta.DeleteConversionEventRequest)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.DeleteConversionEventRequest other = + (com.google.analytics.admin.v1beta.DeleteConversionEventRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.DeleteConversionEventRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.DeleteConversionEventRequest 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.admin.v1beta.DeleteConversionEventRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.DeleteConversionEventRequest 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.admin.v1beta.DeleteConversionEventRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.DeleteConversionEventRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.DeleteConversionEventRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.DeleteConversionEventRequest 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.admin.v1beta.DeleteConversionEventRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.DeleteConversionEventRequest 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.admin.v1beta.DeleteConversionEventRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.DeleteConversionEventRequest 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.admin.v1beta.DeleteConversionEventRequest 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; + } + /** + * + * + *
+   * Request message for DeleteConversionEvent RPC
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.DeleteConversionEventRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.DeleteConversionEventRequest) + com.google.analytics.admin.v1beta.DeleteConversionEventRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_DeleteConversionEventRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_DeleteConversionEventRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.DeleteConversionEventRequest.class, + com.google.analytics.admin.v1beta.DeleteConversionEventRequest.Builder.class); + } + + // Construct using com.google.analytics.admin.v1beta.DeleteConversionEventRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_DeleteConversionEventRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.DeleteConversionEventRequest + getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.DeleteConversionEventRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.DeleteConversionEventRequest build() { + com.google.analytics.admin.v1beta.DeleteConversionEventRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.DeleteConversionEventRequest buildPartial() { + com.google.analytics.admin.v1beta.DeleteConversionEventRequest result = + new com.google.analytics.admin.v1beta.DeleteConversionEventRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @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.admin.v1beta.DeleteConversionEventRequest) { + return mergeFrom((com.google.analytics.admin.v1beta.DeleteConversionEventRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1beta.DeleteConversionEventRequest other) { + if (other + == com.google.analytics.admin.v1beta.DeleteConversionEventRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.DeleteConversionEventRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.DeleteConversionEventRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The resource name of the conversion event to delete.
+     * Format: properties/{property}/conversionEvents/{conversion_event}
+     * Example: "properties/123/conversionEvents/456"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the conversion event to delete.
+     * Format: properties/{property}/conversionEvents/{conversion_event}
+     * Example: "properties/123/conversionEvents/456"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the conversion event to delete.
+     * Format: properties/{property}/conversionEvents/{conversion_event}
+     * Example: "properties/123/conversionEvents/456"
+     * 
+ * + * + * 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; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the conversion event to delete.
+     * Format: properties/{property}/conversionEvents/{conversion_event}
+     * Example: "properties/123/conversionEvents/456"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the conversion event to delete.
+     * Format: properties/{property}/conversionEvents/{conversion_event}
+     * Example: "properties/123/conversionEvents/456"
+     * 
+ * + * + * 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; + 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.admin.v1beta.DeleteConversionEventRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.DeleteConversionEventRequest) + private static final com.google.analytics.admin.v1beta.DeleteConversionEventRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.DeleteConversionEventRequest(); + } + + public static com.google.analytics.admin.v1beta.DeleteConversionEventRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteConversionEventRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteConversionEventRequest(input, extensionRegistry); + } + }; + + 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.admin.v1beta.DeleteConversionEventRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DeleteConversionEventRequestOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DeleteConversionEventRequestOrBuilder.java new file mode 100644 index 000000000000..59d7788ef752 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DeleteConversionEventRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +public interface DeleteConversionEventRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.DeleteConversionEventRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the conversion event to delete.
+   * Format: properties/{property}/conversionEvents/{conversion_event}
+   * Example: "properties/123/conversionEvents/456"
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The resource name of the conversion event to delete.
+   * Format: properties/{property}/conversionEvents/{conversion_event}
+   * Example: "properties/123/conversionEvents/456"
+   * 
+ * + * + * 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-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DeleteDataStreamRequest.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DeleteDataStreamRequest.java new file mode 100644 index 000000000000..0e671bcd1057 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DeleteDataStreamRequest.java @@ -0,0 +1,660 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * Request message for DeleteDataStream RPC.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.DeleteDataStreamRequest} + */ +public final class DeleteDataStreamRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.DeleteDataStreamRequest) + DeleteDataStreamRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteDataStreamRequest.newBuilder() to construct. + private DeleteDataStreamRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteDataStreamRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteDataStreamRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteDataStreamRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_DeleteDataStreamRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_DeleteDataStreamRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.DeleteDataStreamRequest.class, + com.google.analytics.admin.v1beta.DeleteDataStreamRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the DataStream to delete.
+   * Example format: properties/1234/dataStreams/5678
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the DataStream to delete.
+   * Example format: properties/1234/dataStreams/5678
+   * 
+ * + * + * 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_); + } + unknownFields.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 += unknownFields.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.admin.v1beta.DeleteDataStreamRequest)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.DeleteDataStreamRequest other = + (com.google.analytics.admin.v1beta.DeleteDataStreamRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.DeleteDataStreamRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.DeleteDataStreamRequest 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.admin.v1beta.DeleteDataStreamRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.DeleteDataStreamRequest 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.admin.v1beta.DeleteDataStreamRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.DeleteDataStreamRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.DeleteDataStreamRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.DeleteDataStreamRequest 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.admin.v1beta.DeleteDataStreamRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.DeleteDataStreamRequest 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.admin.v1beta.DeleteDataStreamRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.DeleteDataStreamRequest 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.admin.v1beta.DeleteDataStreamRequest 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; + } + /** + * + * + *
+   * Request message for DeleteDataStream RPC.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.DeleteDataStreamRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.DeleteDataStreamRequest) + com.google.analytics.admin.v1beta.DeleteDataStreamRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_DeleteDataStreamRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_DeleteDataStreamRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.DeleteDataStreamRequest.class, + com.google.analytics.admin.v1beta.DeleteDataStreamRequest.Builder.class); + } + + // Construct using com.google.analytics.admin.v1beta.DeleteDataStreamRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_DeleteDataStreamRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.DeleteDataStreamRequest getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.DeleteDataStreamRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.DeleteDataStreamRequest build() { + com.google.analytics.admin.v1beta.DeleteDataStreamRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.DeleteDataStreamRequest buildPartial() { + com.google.analytics.admin.v1beta.DeleteDataStreamRequest result = + new com.google.analytics.admin.v1beta.DeleteDataStreamRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @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.admin.v1beta.DeleteDataStreamRequest) { + return mergeFrom((com.google.analytics.admin.v1beta.DeleteDataStreamRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1beta.DeleteDataStreamRequest other) { + if (other == com.google.analytics.admin.v1beta.DeleteDataStreamRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.DeleteDataStreamRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.DeleteDataStreamRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the DataStream to delete.
+     * Example format: properties/1234/dataStreams/5678
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the DataStream to delete.
+     * Example format: properties/1234/dataStreams/5678
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the DataStream to delete.
+     * Example format: properties/1234/dataStreams/5678
+     * 
+ * + * + * 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; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the DataStream to delete.
+     * Example format: properties/1234/dataStreams/5678
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the DataStream to delete.
+     * Example format: properties/1234/dataStreams/5678
+     * 
+ * + * + * 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; + 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.admin.v1beta.DeleteDataStreamRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.DeleteDataStreamRequest) + private static final com.google.analytics.admin.v1beta.DeleteDataStreamRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.DeleteDataStreamRequest(); + } + + public static com.google.analytics.admin.v1beta.DeleteDataStreamRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteDataStreamRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteDataStreamRequest(input, extensionRegistry); + } + }; + + 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.admin.v1beta.DeleteDataStreamRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DeleteDataStreamRequestOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DeleteDataStreamRequestOrBuilder.java new file mode 100644 index 000000000000..58b8f635dfaf --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DeleteDataStreamRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +public interface DeleteDataStreamRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.DeleteDataStreamRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the DataStream to delete.
+   * Example format: properties/1234/dataStreams/5678
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the DataStream to delete.
+   * Example format: properties/1234/dataStreams/5678
+   * 
+ * + * + * 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-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DeleteFirebaseLinkRequest.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DeleteFirebaseLinkRequest.java new file mode 100644 index 000000000000..68109db8ca58 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DeleteFirebaseLinkRequest.java @@ -0,0 +1,660 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * Request message for DeleteFirebaseLink RPC
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.DeleteFirebaseLinkRequest} + */ +public final class DeleteFirebaseLinkRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.DeleteFirebaseLinkRequest) + DeleteFirebaseLinkRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteFirebaseLinkRequest.newBuilder() to construct. + private DeleteFirebaseLinkRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteFirebaseLinkRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteFirebaseLinkRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteFirebaseLinkRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_DeleteFirebaseLinkRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_DeleteFirebaseLinkRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.DeleteFirebaseLinkRequest.class, + com.google.analytics.admin.v1beta.DeleteFirebaseLinkRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Format: properties/{property_id}/firebaseLinks/{firebase_link_id}
+   * Example: properties/1234/firebaseLinks/5678
+   * 
+ * + * + * 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. Format: properties/{property_id}/firebaseLinks/{firebase_link_id}
+   * Example: properties/1234/firebaseLinks/5678
+   * 
+ * + * + * 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_); + } + unknownFields.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 += unknownFields.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.admin.v1beta.DeleteFirebaseLinkRequest)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.DeleteFirebaseLinkRequest other = + (com.google.analytics.admin.v1beta.DeleteFirebaseLinkRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.DeleteFirebaseLinkRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.DeleteFirebaseLinkRequest 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.admin.v1beta.DeleteFirebaseLinkRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.DeleteFirebaseLinkRequest 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.admin.v1beta.DeleteFirebaseLinkRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.DeleteFirebaseLinkRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.DeleteFirebaseLinkRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.DeleteFirebaseLinkRequest 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.admin.v1beta.DeleteFirebaseLinkRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.DeleteFirebaseLinkRequest 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.admin.v1beta.DeleteFirebaseLinkRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.DeleteFirebaseLinkRequest 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.admin.v1beta.DeleteFirebaseLinkRequest 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; + } + /** + * + * + *
+   * Request message for DeleteFirebaseLink RPC
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.DeleteFirebaseLinkRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.DeleteFirebaseLinkRequest) + com.google.analytics.admin.v1beta.DeleteFirebaseLinkRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_DeleteFirebaseLinkRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_DeleteFirebaseLinkRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.DeleteFirebaseLinkRequest.class, + com.google.analytics.admin.v1beta.DeleteFirebaseLinkRequest.Builder.class); + } + + // Construct using com.google.analytics.admin.v1beta.DeleteFirebaseLinkRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_DeleteFirebaseLinkRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.DeleteFirebaseLinkRequest getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.DeleteFirebaseLinkRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.DeleteFirebaseLinkRequest build() { + com.google.analytics.admin.v1beta.DeleteFirebaseLinkRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.DeleteFirebaseLinkRequest buildPartial() { + com.google.analytics.admin.v1beta.DeleteFirebaseLinkRequest result = + new com.google.analytics.admin.v1beta.DeleteFirebaseLinkRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @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.admin.v1beta.DeleteFirebaseLinkRequest) { + return mergeFrom((com.google.analytics.admin.v1beta.DeleteFirebaseLinkRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1beta.DeleteFirebaseLinkRequest other) { + if (other == com.google.analytics.admin.v1beta.DeleteFirebaseLinkRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.DeleteFirebaseLinkRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.DeleteFirebaseLinkRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Format: properties/{property_id}/firebaseLinks/{firebase_link_id}
+     * Example: properties/1234/firebaseLinks/5678
+     * 
+ * + * + * 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. Format: properties/{property_id}/firebaseLinks/{firebase_link_id}
+     * Example: properties/1234/firebaseLinks/5678
+     * 
+ * + * + * 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. Format: properties/{property_id}/firebaseLinks/{firebase_link_id}
+     * Example: properties/1234/firebaseLinks/5678
+     * 
+ * + * + * 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; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format: properties/{property_id}/firebaseLinks/{firebase_link_id}
+     * Example: properties/1234/firebaseLinks/5678
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format: properties/{property_id}/firebaseLinks/{firebase_link_id}
+     * Example: properties/1234/firebaseLinks/5678
+     * 
+ * + * + * 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; + 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.admin.v1beta.DeleteFirebaseLinkRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.DeleteFirebaseLinkRequest) + private static final com.google.analytics.admin.v1beta.DeleteFirebaseLinkRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.DeleteFirebaseLinkRequest(); + } + + public static com.google.analytics.admin.v1beta.DeleteFirebaseLinkRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteFirebaseLinkRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteFirebaseLinkRequest(input, extensionRegistry); + } + }; + + 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.admin.v1beta.DeleteFirebaseLinkRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DeleteFirebaseLinkRequestOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DeleteFirebaseLinkRequestOrBuilder.java new file mode 100644 index 000000000000..a79f08c72b72 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DeleteFirebaseLinkRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +public interface DeleteFirebaseLinkRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.DeleteFirebaseLinkRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Format: properties/{property_id}/firebaseLinks/{firebase_link_id}
+   * Example: properties/1234/firebaseLinks/5678
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Format: properties/{property_id}/firebaseLinks/{firebase_link_id}
+   * Example: properties/1234/firebaseLinks/5678
+   * 
+ * + * + * 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-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DeleteGoogleAdsLinkRequest.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DeleteGoogleAdsLinkRequest.java new file mode 100644 index 000000000000..8d5651224f98 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DeleteGoogleAdsLinkRequest.java @@ -0,0 +1,656 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * Request message for DeleteGoogleAdsLink RPC.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest} + */ +public final class DeleteGoogleAdsLinkRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest) + DeleteGoogleAdsLinkRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteGoogleAdsLinkRequest.newBuilder() to construct. + private DeleteGoogleAdsLinkRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteGoogleAdsLinkRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteGoogleAdsLinkRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteGoogleAdsLinkRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_DeleteGoogleAdsLinkRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_DeleteGoogleAdsLinkRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest.class, + com.google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Example format: properties/1234/googleAdsLinks/5678
+   * 
+ * + * + * 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. Example format: properties/1234/googleAdsLinks/5678
+   * 
+ * + * + * 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_); + } + unknownFields.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 += unknownFields.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.admin.v1beta.DeleteGoogleAdsLinkRequest)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest other = + (com.google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest 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.admin.v1beta.DeleteGoogleAdsLinkRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest 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.admin.v1beta.DeleteGoogleAdsLinkRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest 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.admin.v1beta.DeleteGoogleAdsLinkRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest 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.admin.v1beta.DeleteGoogleAdsLinkRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest 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.admin.v1beta.DeleteGoogleAdsLinkRequest 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; + } + /** + * + * + *
+   * Request message for DeleteGoogleAdsLink RPC.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest) + com.google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_DeleteGoogleAdsLinkRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_DeleteGoogleAdsLinkRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest.class, + com.google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest.Builder.class); + } + + // Construct using com.google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_DeleteGoogleAdsLinkRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest + getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest build() { + com.google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest buildPartial() { + com.google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest result = + new com.google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @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.admin.v1beta.DeleteGoogleAdsLinkRequest) { + return mergeFrom((com.google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest other) { + if (other + == com.google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Example format: properties/1234/googleAdsLinks/5678
+     * 
+ * + * + * 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. Example format: properties/1234/googleAdsLinks/5678
+     * 
+ * + * + * 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. Example format: properties/1234/googleAdsLinks/5678
+     * 
+ * + * + * 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; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Example format: properties/1234/googleAdsLinks/5678
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Example format: properties/1234/googleAdsLinks/5678
+     * 
+ * + * + * 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; + 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.admin.v1beta.DeleteGoogleAdsLinkRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest) + private static final com.google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest(); + } + + public static com.google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteGoogleAdsLinkRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteGoogleAdsLinkRequest(input, extensionRegistry); + } + }; + + 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.admin.v1beta.DeleteGoogleAdsLinkRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DeleteGoogleAdsLinkRequestOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DeleteGoogleAdsLinkRequestOrBuilder.java new file mode 100644 index 000000000000..ad68b6f26b3d --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DeleteGoogleAdsLinkRequestOrBuilder.java @@ -0,0 +1,54 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +public interface DeleteGoogleAdsLinkRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Example format: properties/1234/googleAdsLinks/5678
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Example format: properties/1234/googleAdsLinks/5678
+   * 
+ * + * + * 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-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DeleteMeasurementProtocolSecretRequest.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DeleteMeasurementProtocolSecretRequest.java new file mode 100644 index 000000000000..46f979d8f81c --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DeleteMeasurementProtocolSecretRequest.java @@ -0,0 +1,685 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * Request message for DeleteMeasurementProtocolSecret RPC
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest} + */ +public final class DeleteMeasurementProtocolSecretRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest) + DeleteMeasurementProtocolSecretRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteMeasurementProtocolSecretRequest.newBuilder() to construct. + private DeleteMeasurementProtocolSecretRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteMeasurementProtocolSecretRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteMeasurementProtocolSecretRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteMeasurementProtocolSecretRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_DeleteMeasurementProtocolSecretRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_DeleteMeasurementProtocolSecretRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest.class, + com.google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the MeasurementProtocolSecret to delete.
+   * Format:
+   * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the MeasurementProtocolSecret to delete.
+   * Format:
+   * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret}
+   * 
+ * + * + * 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_); + } + unknownFields.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 += unknownFields.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.admin.v1beta.DeleteMeasurementProtocolSecretRequest)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest other = + (com.google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest 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.admin.v1beta.DeleteMeasurementProtocolSecretRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest 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.admin.v1beta.DeleteMeasurementProtocolSecretRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest 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.admin.v1beta.DeleteMeasurementProtocolSecretRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest + 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.admin.v1beta.DeleteMeasurementProtocolSecretRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest 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.admin.v1beta.DeleteMeasurementProtocolSecretRequest 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; + } + /** + * + * + *
+   * Request message for DeleteMeasurementProtocolSecret RPC
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest) + com.google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_DeleteMeasurementProtocolSecretRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_DeleteMeasurementProtocolSecretRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest.class, + com.google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest.Builder + .class); + } + + // Construct using + // com.google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_DeleteMeasurementProtocolSecretRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest + getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest build() { + com.google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest buildPartial() { + com.google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest result = + new com.google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @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.admin.v1beta.DeleteMeasurementProtocolSecretRequest) { + return mergeFrom( + (com.google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest other) { + if (other + == com.google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the MeasurementProtocolSecret to delete.
+     * Format:
+     * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the MeasurementProtocolSecret to delete.
+     * Format:
+     * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the MeasurementProtocolSecret to delete.
+     * Format:
+     * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret}
+     * 
+ * + * + * 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; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the MeasurementProtocolSecret to delete.
+     * Format:
+     * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the MeasurementProtocolSecret to delete.
+     * Format:
+     * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret}
+     * 
+ * + * + * 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; + 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.admin.v1beta.DeleteMeasurementProtocolSecretRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest) + private static final com.google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest(); + } + + public static com.google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteMeasurementProtocolSecretRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteMeasurementProtocolSecretRequest(input, extensionRegistry); + } + }; + + 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.admin.v1beta.DeleteMeasurementProtocolSecretRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DeleteMeasurementProtocolSecretRequestOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DeleteMeasurementProtocolSecretRequestOrBuilder.java new file mode 100644 index 000000000000..20d7012f6c91 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DeleteMeasurementProtocolSecretRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +public interface DeleteMeasurementProtocolSecretRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the MeasurementProtocolSecret to delete.
+   * Format:
+   * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the MeasurementProtocolSecret to delete.
+   * Format:
+   * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret}
+   * 
+ * + * + * 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-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DeletePropertyRequest.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DeletePropertyRequest.java new file mode 100644 index 000000000000..8c33e038e502 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DeletePropertyRequest.java @@ -0,0 +1,667 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * Request message for DeleteProperty RPC.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.DeletePropertyRequest} + */ +public final class DeletePropertyRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.DeletePropertyRequest) + DeletePropertyRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeletePropertyRequest.newBuilder() to construct. + private DeletePropertyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeletePropertyRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeletePropertyRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeletePropertyRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_DeletePropertyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_DeletePropertyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.DeletePropertyRequest.class, + com.google.analytics.admin.v1beta.DeletePropertyRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the Property to soft-delete.
+   * Format: properties/{property_id}
+   * Example: "properties/1000"
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the Property to soft-delete.
+   * Format: properties/{property_id}
+   * Example: "properties/1000"
+   * 
+ * + * + * 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_); + } + unknownFields.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 += unknownFields.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.admin.v1beta.DeletePropertyRequest)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.DeletePropertyRequest other = + (com.google.analytics.admin.v1beta.DeletePropertyRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.DeletePropertyRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.DeletePropertyRequest 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.admin.v1beta.DeletePropertyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.DeletePropertyRequest 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.admin.v1beta.DeletePropertyRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.DeletePropertyRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.DeletePropertyRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.DeletePropertyRequest 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.admin.v1beta.DeletePropertyRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.DeletePropertyRequest 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.admin.v1beta.DeletePropertyRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.DeletePropertyRequest 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.admin.v1beta.DeletePropertyRequest 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; + } + /** + * + * + *
+   * Request message for DeleteProperty RPC.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.DeletePropertyRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.DeletePropertyRequest) + com.google.analytics.admin.v1beta.DeletePropertyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_DeletePropertyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_DeletePropertyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.DeletePropertyRequest.class, + com.google.analytics.admin.v1beta.DeletePropertyRequest.Builder.class); + } + + // Construct using com.google.analytics.admin.v1beta.DeletePropertyRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_DeletePropertyRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.DeletePropertyRequest getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.DeletePropertyRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.DeletePropertyRequest build() { + com.google.analytics.admin.v1beta.DeletePropertyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.DeletePropertyRequest buildPartial() { + com.google.analytics.admin.v1beta.DeletePropertyRequest result = + new com.google.analytics.admin.v1beta.DeletePropertyRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @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.admin.v1beta.DeletePropertyRequest) { + return mergeFrom((com.google.analytics.admin.v1beta.DeletePropertyRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1beta.DeletePropertyRequest other) { + if (other == com.google.analytics.admin.v1beta.DeletePropertyRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.DeletePropertyRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.DeletePropertyRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the Property to soft-delete.
+     * Format: properties/{property_id}
+     * Example: "properties/1000"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the Property to soft-delete.
+     * Format: properties/{property_id}
+     * Example: "properties/1000"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the Property to soft-delete.
+     * Format: properties/{property_id}
+     * Example: "properties/1000"
+     * 
+ * + * + * 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; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the Property to soft-delete.
+     * Format: properties/{property_id}
+     * Example: "properties/1000"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the Property to soft-delete.
+     * Format: properties/{property_id}
+     * Example: "properties/1000"
+     * 
+ * + * + * 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; + 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.admin.v1beta.DeletePropertyRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.DeletePropertyRequest) + private static final com.google.analytics.admin.v1beta.DeletePropertyRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.DeletePropertyRequest(); + } + + public static com.google.analytics.admin.v1beta.DeletePropertyRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeletePropertyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeletePropertyRequest(input, extensionRegistry); + } + }; + + 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.admin.v1beta.DeletePropertyRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DeletePropertyRequestOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DeletePropertyRequestOrBuilder.java new file mode 100644 index 000000000000..6157f1ff1eb0 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/DeletePropertyRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +public interface DeletePropertyRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.DeletePropertyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the Property to soft-delete.
+   * Format: properties/{property_id}
+   * Example: "properties/1000"
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the Property to soft-delete.
+   * Format: properties/{property_id}
+   * Example: "properties/1000"
+   * 
+ * + * + * 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-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/FirebaseLink.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/FirebaseLink.java new file mode 100644 index 000000000000..d8dcb484d988 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/FirebaseLink.java @@ -0,0 +1,1143 @@ +/* + * Copyright 2020 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/admin/v1beta/resources.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * A link between a GA4 property and a Firebase project.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.FirebaseLink} + */ +public final class FirebaseLink extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.FirebaseLink) + FirebaseLinkOrBuilder { + private static final long serialVersionUID = 0L; + // Use FirebaseLink.newBuilder() to construct. + private FirebaseLink(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FirebaseLink() { + name_ = ""; + project_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FirebaseLink(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private FirebaseLink( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + project_ = s; + break; + } + case 26: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_FirebaseLink_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_FirebaseLink_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.FirebaseLink.class, + com.google.analytics.admin.v1beta.FirebaseLink.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Output only. Example format: properties/1234/firebaseLinks/5678
+   * 
+ * + * string name = 1 [(.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. Example format: properties/1234/firebaseLinks/5678
+   * 
+ * + * string name = 1 [(.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 PROJECT_FIELD_NUMBER = 2; + private volatile java.lang.Object project_; + /** + * + * + *
+   * Immutable. Firebase project resource name. When creating a FirebaseLink, you may
+   * provide this resource name using either a project number or project ID.
+   * Once this resource has been created, returned FirebaseLinks will always
+   * have a project_name that contains a project number.
+   * Format: 'projects/{project number}'
+   * Example: 'projects/1234'
+   * 
+ * + * string project = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The project. + */ + @java.lang.Override + public java.lang.String getProject() { + java.lang.Object ref = project_; + 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(); + project_ = s; + return s; + } + } + /** + * + * + *
+   * Immutable. Firebase project resource name. When creating a FirebaseLink, you may
+   * provide this resource name using either a project number or project ID.
+   * Once this resource has been created, returned FirebaseLinks will always
+   * have a project_name that contains a project number.
+   * Format: 'projects/{project number}'
+   * Example: 'projects/1234'
+   * 
+ * + * string project = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for project. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProjectBytes() { + java.lang.Object ref = project_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + project_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Time when this FirebaseLink was originally created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. Time when this FirebaseLink was originally created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Time when this FirebaseLink was originally created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + 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(project_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, project_); + } + if (createTime_ != null) { + output.writeMessage(3, getCreateTime()); + } + unknownFields.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(project_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, project_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCreateTime()); + } + size += unknownFields.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.admin.v1beta.FirebaseLink)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.FirebaseLink other = + (com.google.analytics.admin.v1beta.FirebaseLink) obj; + + if (!getName().equals(other.getName())) return false; + if (!getProject().equals(other.getProject())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (!unknownFields.equals(other.unknownFields)) 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) + PROJECT_FIELD_NUMBER; + hash = (53 * hash) + getProject().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.FirebaseLink parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.FirebaseLink 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.admin.v1beta.FirebaseLink parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.FirebaseLink 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.admin.v1beta.FirebaseLink parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.FirebaseLink parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.FirebaseLink parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.FirebaseLink 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.admin.v1beta.FirebaseLink parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.FirebaseLink 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.admin.v1beta.FirebaseLink parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.FirebaseLink 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.admin.v1beta.FirebaseLink 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 link between a GA4 property and a Firebase project.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.FirebaseLink} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.FirebaseLink) + com.google.analytics.admin.v1beta.FirebaseLinkOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_FirebaseLink_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_FirebaseLink_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.FirebaseLink.class, + com.google.analytics.admin.v1beta.FirebaseLink.Builder.class); + } + + // Construct using com.google.analytics.admin.v1beta.FirebaseLink.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + project_ = ""; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_FirebaseLink_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.FirebaseLink getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.FirebaseLink.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.FirebaseLink build() { + com.google.analytics.admin.v1beta.FirebaseLink result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.FirebaseLink buildPartial() { + com.google.analytics.admin.v1beta.FirebaseLink result = + new com.google.analytics.admin.v1beta.FirebaseLink(this); + result.name_ = name_; + result.project_ = project_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + onBuilt(); + return result; + } + + @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.admin.v1beta.FirebaseLink) { + return mergeFrom((com.google.analytics.admin.v1beta.FirebaseLink) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1beta.FirebaseLink other) { + if (other == com.google.analytics.admin.v1beta.FirebaseLink.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getProject().isEmpty()) { + project_ = other.project_; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.FirebaseLink parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.analytics.admin.v1beta.FirebaseLink) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. Example format: properties/1234/firebaseLinks/5678
+     * 
+ * + * string name = 1 [(.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. Example format: properties/1234/firebaseLinks/5678
+     * 
+ * + * string name = 1 [(.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. Example format: properties/1234/firebaseLinks/5678
+     * 
+ * + * string name = 1 [(.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; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Example format: properties/1234/firebaseLinks/5678
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Example format: properties/1234/firebaseLinks/5678
+     * 
+ * + * string name = 1 [(.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; + onChanged(); + return this; + } + + private java.lang.Object project_ = ""; + /** + * + * + *
+     * Immutable. Firebase project resource name. When creating a FirebaseLink, you may
+     * provide this resource name using either a project number or project ID.
+     * Once this resource has been created, returned FirebaseLinks will always
+     * have a project_name that contains a project number.
+     * Format: 'projects/{project number}'
+     * Example: 'projects/1234'
+     * 
+ * + * string project = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The project. + */ + public java.lang.String getProject() { + java.lang.Object ref = project_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + project_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Immutable. Firebase project resource name. When creating a FirebaseLink, you may
+     * provide this resource name using either a project number or project ID.
+     * Once this resource has been created, returned FirebaseLinks will always
+     * have a project_name that contains a project number.
+     * Format: 'projects/{project number}'
+     * Example: 'projects/1234'
+     * 
+ * + * string project = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for project. + */ + public com.google.protobuf.ByteString getProjectBytes() { + java.lang.Object ref = project_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + project_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Immutable. Firebase project resource name. When creating a FirebaseLink, you may
+     * provide this resource name using either a project number or project ID.
+     * Once this resource has been created, returned FirebaseLinks will always
+     * have a project_name that contains a project number.
+     * Format: 'projects/{project number}'
+     * Example: 'projects/1234'
+     * 
+ * + * string project = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The project to set. + * @return This builder for chaining. + */ + public Builder setProject(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + project_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. Firebase project resource name. When creating a FirebaseLink, you may
+     * provide this resource name using either a project number or project ID.
+     * Once this resource has been created, returned FirebaseLinks will always
+     * have a project_name that contains a project number.
+     * Format: 'projects/{project number}'
+     * Example: 'projects/1234'
+     * 
+ * + * string project = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearProject() { + + project_ = getDefaultInstance().getProject(); + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. Firebase project resource name. When creating a FirebaseLink, you may
+     * provide this resource name using either a project number or project ID.
+     * Once this resource has been created, returned FirebaseLinks will always
+     * have a project_name that contains a project number.
+     * Format: 'projects/{project number}'
+     * Example: 'projects/1234'
+     * 
+ * + * string project = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The bytes for project to set. + * @return This builder for chaining. + */ + public Builder setProjectBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + project_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. Time when this FirebaseLink was originally created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. Time when this FirebaseLink was originally created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when this FirebaseLink was originally created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when this FirebaseLink was originally created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when this FirebaseLink was originally created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when this FirebaseLink was originally created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Time when this FirebaseLink was originally created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when this FirebaseLink was originally created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Time when this FirebaseLink was originally created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + @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.admin.v1beta.FirebaseLink) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.FirebaseLink) + private static final com.google.analytics.admin.v1beta.FirebaseLink DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.FirebaseLink(); + } + + public static com.google.analytics.admin.v1beta.FirebaseLink getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FirebaseLink parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new FirebaseLink(input, extensionRegistry); + } + }; + + 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.admin.v1beta.FirebaseLink getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/FirebaseLinkName.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/FirebaseLinkName.java new file mode 100644 index 000000000000..7a654a321d3c --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/FirebaseLinkName.java @@ -0,0 +1,192 @@ +/* + * Copyright 2022 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.admin.v1beta; + +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 FirebaseLinkName implements ResourceName { + private static final PathTemplate PROPERTY_FIREBASE_LINK = + PathTemplate.createWithoutUrlEncoding("properties/{property}/firebaseLinks/{firebase_link}"); + private volatile Map fieldValuesMap; + private final String property; + private final String firebaseLink; + + @Deprecated + protected FirebaseLinkName() { + property = null; + firebaseLink = null; + } + + private FirebaseLinkName(Builder builder) { + property = Preconditions.checkNotNull(builder.getProperty()); + firebaseLink = Preconditions.checkNotNull(builder.getFirebaseLink()); + } + + public String getProperty() { + return property; + } + + public String getFirebaseLink() { + return firebaseLink; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static FirebaseLinkName of(String property, String firebaseLink) { + return newBuilder().setProperty(property).setFirebaseLink(firebaseLink).build(); + } + + public static String format(String property, String firebaseLink) { + return newBuilder().setProperty(property).setFirebaseLink(firebaseLink).build().toString(); + } + + public static FirebaseLinkName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROPERTY_FIREBASE_LINK.validatedMatch( + formattedString, "FirebaseLinkName.parse: formattedString not in valid format"); + return of(matchMap.get("property"), matchMap.get("firebase_link")); + } + + 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 (FirebaseLinkName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROPERTY_FIREBASE_LINK.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 (firebaseLink != null) { + fieldMapBuilder.put("firebase_link", firebaseLink); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROPERTY_FIREBASE_LINK.instantiate("property", property, "firebase_link", firebaseLink); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + FirebaseLinkName that = ((FirebaseLinkName) o); + return Objects.equals(this.property, that.property) + && Objects.equals(this.firebaseLink, that.firebaseLink); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(property); + h *= 1000003; + h ^= Objects.hashCode(firebaseLink); + return h; + } + + /** Builder for properties/{property}/firebaseLinks/{firebase_link}. */ + public static class Builder { + private String property; + private String firebaseLink; + + protected Builder() {} + + public String getProperty() { + return property; + } + + public String getFirebaseLink() { + return firebaseLink; + } + + public Builder setProperty(String property) { + this.property = property; + return this; + } + + public Builder setFirebaseLink(String firebaseLink) { + this.firebaseLink = firebaseLink; + return this; + } + + private Builder(FirebaseLinkName firebaseLinkName) { + this.property = firebaseLinkName.property; + this.firebaseLink = firebaseLinkName.firebaseLink; + } + + public FirebaseLinkName build() { + return new FirebaseLinkName(this); + } + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/FirebaseLinkOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/FirebaseLinkOrBuilder.java new file mode 100644 index 000000000000..86bae0302a38 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/FirebaseLinkOrBuilder.java @@ -0,0 +1,123 @@ +/* + * Copyright 2020 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/admin/v1beta/resources.proto + +package com.google.analytics.admin.v1beta; + +public interface FirebaseLinkOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.FirebaseLink) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Example format: properties/1234/firebaseLinks/5678
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. Example format: properties/1234/firebaseLinks/5678
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Immutable. Firebase project resource name. When creating a FirebaseLink, you may
+   * provide this resource name using either a project number or project ID.
+   * Once this resource has been created, returned FirebaseLinks will always
+   * have a project_name that contains a project number.
+   * Format: 'projects/{project number}'
+   * Example: 'projects/1234'
+   * 
+ * + * string project = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The project. + */ + java.lang.String getProject(); + /** + * + * + *
+   * Immutable. Firebase project resource name. When creating a FirebaseLink, you may
+   * provide this resource name using either a project number or project ID.
+   * Once this resource has been created, returned FirebaseLinks will always
+   * have a project_name that contains a project number.
+   * Format: 'projects/{project number}'
+   * Example: 'projects/1234'
+   * 
+ * + * string project = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for project. + */ + com.google.protobuf.ByteString getProjectBytes(); + + /** + * + * + *
+   * Output only. Time when this FirebaseLink was originally created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Time when this FirebaseLink was originally created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Time when this FirebaseLink was originally created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetAccountRequest.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetAccountRequest.java new file mode 100644 index 000000000000..a5b56e9db8ee --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetAccountRequest.java @@ -0,0 +1,666 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * Request message for GetAccount RPC.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.GetAccountRequest} + */ +public final class GetAccountRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.GetAccountRequest) + GetAccountRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetAccountRequest.newBuilder() to construct. + private GetAccountRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetAccountRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetAccountRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetAccountRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_GetAccountRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_GetAccountRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.GetAccountRequest.class, + com.google.analytics.admin.v1beta.GetAccountRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the account to lookup.
+   * Format: accounts/{account}
+   * Example: "accounts/100"
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the account to lookup.
+   * Format: accounts/{account}
+   * Example: "accounts/100"
+   * 
+ * + * + * 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_); + } + unknownFields.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 += unknownFields.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.admin.v1beta.GetAccountRequest)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.GetAccountRequest other = + (com.google.analytics.admin.v1beta.GetAccountRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.GetAccountRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.GetAccountRequest 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.admin.v1beta.GetAccountRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.GetAccountRequest 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.admin.v1beta.GetAccountRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.GetAccountRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.GetAccountRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.GetAccountRequest 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.admin.v1beta.GetAccountRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.GetAccountRequest 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.admin.v1beta.GetAccountRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.GetAccountRequest 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.admin.v1beta.GetAccountRequest 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; + } + /** + * + * + *
+   * Request message for GetAccount RPC.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.GetAccountRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.GetAccountRequest) + com.google.analytics.admin.v1beta.GetAccountRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_GetAccountRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_GetAccountRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.GetAccountRequest.class, + com.google.analytics.admin.v1beta.GetAccountRequest.Builder.class); + } + + // Construct using com.google.analytics.admin.v1beta.GetAccountRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_GetAccountRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.GetAccountRequest getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.GetAccountRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.GetAccountRequest build() { + com.google.analytics.admin.v1beta.GetAccountRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.GetAccountRequest buildPartial() { + com.google.analytics.admin.v1beta.GetAccountRequest result = + new com.google.analytics.admin.v1beta.GetAccountRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @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.admin.v1beta.GetAccountRequest) { + return mergeFrom((com.google.analytics.admin.v1beta.GetAccountRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1beta.GetAccountRequest other) { + if (other == com.google.analytics.admin.v1beta.GetAccountRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.GetAccountRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.GetAccountRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the account to lookup.
+     * Format: accounts/{account}
+     * Example: "accounts/100"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the account to lookup.
+     * Format: accounts/{account}
+     * Example: "accounts/100"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the account to lookup.
+     * Format: accounts/{account}
+     * Example: "accounts/100"
+     * 
+ * + * + * 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; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the account to lookup.
+     * Format: accounts/{account}
+     * Example: "accounts/100"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the account to lookup.
+     * Format: accounts/{account}
+     * Example: "accounts/100"
+     * 
+ * + * + * 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; + 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.admin.v1beta.GetAccountRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.GetAccountRequest) + private static final com.google.analytics.admin.v1beta.GetAccountRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.GetAccountRequest(); + } + + public static com.google.analytics.admin.v1beta.GetAccountRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetAccountRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetAccountRequest(input, extensionRegistry); + } + }; + + 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.admin.v1beta.GetAccountRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetAccountRequestOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetAccountRequestOrBuilder.java new file mode 100644 index 000000000000..d618363f7fa1 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetAccountRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +public interface GetAccountRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.GetAccountRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the account to lookup.
+   * Format: accounts/{account}
+   * Example: "accounts/100"
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the account to lookup.
+   * Format: accounts/{account}
+   * Example: "accounts/100"
+   * 
+ * + * + * 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-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetConversionEventRequest.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetConversionEventRequest.java new file mode 100644 index 000000000000..c5d2d799c56b --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetConversionEventRequest.java @@ -0,0 +1,667 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * Request message for GetConversionEvent RPC
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.GetConversionEventRequest} + */ +public final class GetConversionEventRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.GetConversionEventRequest) + GetConversionEventRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetConversionEventRequest.newBuilder() to construct. + private GetConversionEventRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetConversionEventRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetConversionEventRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetConversionEventRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_GetConversionEventRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_GetConversionEventRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.GetConversionEventRequest.class, + com.google.analytics.admin.v1beta.GetConversionEventRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The resource name of the conversion event to retrieve.
+   * Format: properties/{property}/conversionEvents/{conversion_event}
+   * Example: "properties/123/conversionEvents/456"
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the conversion event to retrieve.
+   * Format: properties/{property}/conversionEvents/{conversion_event}
+   * Example: "properties/123/conversionEvents/456"
+   * 
+ * + * + * 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_); + } + unknownFields.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 += unknownFields.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.admin.v1beta.GetConversionEventRequest)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.GetConversionEventRequest other = + (com.google.analytics.admin.v1beta.GetConversionEventRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.GetConversionEventRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.GetConversionEventRequest 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.admin.v1beta.GetConversionEventRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.GetConversionEventRequest 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.admin.v1beta.GetConversionEventRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.GetConversionEventRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.GetConversionEventRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.GetConversionEventRequest 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.admin.v1beta.GetConversionEventRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.GetConversionEventRequest 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.admin.v1beta.GetConversionEventRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.GetConversionEventRequest 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.admin.v1beta.GetConversionEventRequest 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; + } + /** + * + * + *
+   * Request message for GetConversionEvent RPC
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.GetConversionEventRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.GetConversionEventRequest) + com.google.analytics.admin.v1beta.GetConversionEventRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_GetConversionEventRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_GetConversionEventRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.GetConversionEventRequest.class, + com.google.analytics.admin.v1beta.GetConversionEventRequest.Builder.class); + } + + // Construct using com.google.analytics.admin.v1beta.GetConversionEventRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_GetConversionEventRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.GetConversionEventRequest getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.GetConversionEventRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.GetConversionEventRequest build() { + com.google.analytics.admin.v1beta.GetConversionEventRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.GetConversionEventRequest buildPartial() { + com.google.analytics.admin.v1beta.GetConversionEventRequest result = + new com.google.analytics.admin.v1beta.GetConversionEventRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @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.admin.v1beta.GetConversionEventRequest) { + return mergeFrom((com.google.analytics.admin.v1beta.GetConversionEventRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1beta.GetConversionEventRequest other) { + if (other == com.google.analytics.admin.v1beta.GetConversionEventRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.GetConversionEventRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.GetConversionEventRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The resource name of the conversion event to retrieve.
+     * Format: properties/{property}/conversionEvents/{conversion_event}
+     * Example: "properties/123/conversionEvents/456"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the conversion event to retrieve.
+     * Format: properties/{property}/conversionEvents/{conversion_event}
+     * Example: "properties/123/conversionEvents/456"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the conversion event to retrieve.
+     * Format: properties/{property}/conversionEvents/{conversion_event}
+     * Example: "properties/123/conversionEvents/456"
+     * 
+ * + * + * 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; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the conversion event to retrieve.
+     * Format: properties/{property}/conversionEvents/{conversion_event}
+     * Example: "properties/123/conversionEvents/456"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the conversion event to retrieve.
+     * Format: properties/{property}/conversionEvents/{conversion_event}
+     * Example: "properties/123/conversionEvents/456"
+     * 
+ * + * + * 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; + 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.admin.v1beta.GetConversionEventRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.GetConversionEventRequest) + private static final com.google.analytics.admin.v1beta.GetConversionEventRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.GetConversionEventRequest(); + } + + public static com.google.analytics.admin.v1beta.GetConversionEventRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetConversionEventRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetConversionEventRequest(input, extensionRegistry); + } + }; + + 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.admin.v1beta.GetConversionEventRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetConversionEventRequestOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetConversionEventRequestOrBuilder.java new file mode 100644 index 000000000000..fdd3c74cdefb --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetConversionEventRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +public interface GetConversionEventRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.GetConversionEventRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the conversion event to retrieve.
+   * Format: properties/{property}/conversionEvents/{conversion_event}
+   * Example: "properties/123/conversionEvents/456"
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The resource name of the conversion event to retrieve.
+   * Format: properties/{property}/conversionEvents/{conversion_event}
+   * Example: "properties/123/conversionEvents/456"
+   * 
+ * + * + * 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-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetCustomDimensionRequest.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetCustomDimensionRequest.java new file mode 100644 index 000000000000..442ec1cca4e1 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetCustomDimensionRequest.java @@ -0,0 +1,660 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * Request message for GetCustomDimension RPC.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.GetCustomDimensionRequest} + */ +public final class GetCustomDimensionRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.GetCustomDimensionRequest) + GetCustomDimensionRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetCustomDimensionRequest.newBuilder() to construct. + private GetCustomDimensionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetCustomDimensionRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetCustomDimensionRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetCustomDimensionRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_GetCustomDimensionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_GetCustomDimensionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.GetCustomDimensionRequest.class, + com.google.analytics.admin.v1beta.GetCustomDimensionRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the CustomDimension to get.
+   * Example format: properties/1234/customDimensions/5678
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the CustomDimension to get.
+   * Example format: properties/1234/customDimensions/5678
+   * 
+ * + * + * 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_); + } + unknownFields.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 += unknownFields.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.admin.v1beta.GetCustomDimensionRequest)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.GetCustomDimensionRequest other = + (com.google.analytics.admin.v1beta.GetCustomDimensionRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.GetCustomDimensionRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.GetCustomDimensionRequest 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.admin.v1beta.GetCustomDimensionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.GetCustomDimensionRequest 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.admin.v1beta.GetCustomDimensionRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.GetCustomDimensionRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.GetCustomDimensionRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.GetCustomDimensionRequest 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.admin.v1beta.GetCustomDimensionRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.GetCustomDimensionRequest 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.admin.v1beta.GetCustomDimensionRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.GetCustomDimensionRequest 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.admin.v1beta.GetCustomDimensionRequest 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; + } + /** + * + * + *
+   * Request message for GetCustomDimension RPC.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.GetCustomDimensionRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.GetCustomDimensionRequest) + com.google.analytics.admin.v1beta.GetCustomDimensionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_GetCustomDimensionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_GetCustomDimensionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.GetCustomDimensionRequest.class, + com.google.analytics.admin.v1beta.GetCustomDimensionRequest.Builder.class); + } + + // Construct using com.google.analytics.admin.v1beta.GetCustomDimensionRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_GetCustomDimensionRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.GetCustomDimensionRequest getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.GetCustomDimensionRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.GetCustomDimensionRequest build() { + com.google.analytics.admin.v1beta.GetCustomDimensionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.GetCustomDimensionRequest buildPartial() { + com.google.analytics.admin.v1beta.GetCustomDimensionRequest result = + new com.google.analytics.admin.v1beta.GetCustomDimensionRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @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.admin.v1beta.GetCustomDimensionRequest) { + return mergeFrom((com.google.analytics.admin.v1beta.GetCustomDimensionRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1beta.GetCustomDimensionRequest other) { + if (other == com.google.analytics.admin.v1beta.GetCustomDimensionRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.GetCustomDimensionRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.GetCustomDimensionRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the CustomDimension to get.
+     * Example format: properties/1234/customDimensions/5678
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the CustomDimension to get.
+     * Example format: properties/1234/customDimensions/5678
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the CustomDimension to get.
+     * Example format: properties/1234/customDimensions/5678
+     * 
+ * + * + * 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; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the CustomDimension to get.
+     * Example format: properties/1234/customDimensions/5678
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the CustomDimension to get.
+     * Example format: properties/1234/customDimensions/5678
+     * 
+ * + * + * 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; + 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.admin.v1beta.GetCustomDimensionRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.GetCustomDimensionRequest) + private static final com.google.analytics.admin.v1beta.GetCustomDimensionRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.GetCustomDimensionRequest(); + } + + public static com.google.analytics.admin.v1beta.GetCustomDimensionRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetCustomDimensionRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetCustomDimensionRequest(input, extensionRegistry); + } + }; + + 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.admin.v1beta.GetCustomDimensionRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetCustomDimensionRequestOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetCustomDimensionRequestOrBuilder.java new file mode 100644 index 000000000000..2b670f37122c --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetCustomDimensionRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +public interface GetCustomDimensionRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.GetCustomDimensionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the CustomDimension to get.
+   * Example format: properties/1234/customDimensions/5678
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the CustomDimension to get.
+   * Example format: properties/1234/customDimensions/5678
+   * 
+ * + * + * 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-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetCustomMetricRequest.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetCustomMetricRequest.java new file mode 100644 index 000000000000..918794f88be9 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetCustomMetricRequest.java @@ -0,0 +1,660 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * Request message for GetCustomMetric RPC.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.GetCustomMetricRequest} + */ +public final class GetCustomMetricRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.GetCustomMetricRequest) + GetCustomMetricRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetCustomMetricRequest.newBuilder() to construct. + private GetCustomMetricRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetCustomMetricRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetCustomMetricRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetCustomMetricRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_GetCustomMetricRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_GetCustomMetricRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.GetCustomMetricRequest.class, + com.google.analytics.admin.v1beta.GetCustomMetricRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the CustomMetric to get.
+   * Example format: properties/1234/customMetrics/5678
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the CustomMetric to get.
+   * Example format: properties/1234/customMetrics/5678
+   * 
+ * + * + * 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_); + } + unknownFields.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 += unknownFields.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.admin.v1beta.GetCustomMetricRequest)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.GetCustomMetricRequest other = + (com.google.analytics.admin.v1beta.GetCustomMetricRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.GetCustomMetricRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.GetCustomMetricRequest 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.admin.v1beta.GetCustomMetricRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.GetCustomMetricRequest 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.admin.v1beta.GetCustomMetricRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.GetCustomMetricRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.GetCustomMetricRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.GetCustomMetricRequest 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.admin.v1beta.GetCustomMetricRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.GetCustomMetricRequest 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.admin.v1beta.GetCustomMetricRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.GetCustomMetricRequest 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.admin.v1beta.GetCustomMetricRequest 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; + } + /** + * + * + *
+   * Request message for GetCustomMetric RPC.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.GetCustomMetricRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.GetCustomMetricRequest) + com.google.analytics.admin.v1beta.GetCustomMetricRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_GetCustomMetricRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_GetCustomMetricRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.GetCustomMetricRequest.class, + com.google.analytics.admin.v1beta.GetCustomMetricRequest.Builder.class); + } + + // Construct using com.google.analytics.admin.v1beta.GetCustomMetricRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_GetCustomMetricRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.GetCustomMetricRequest getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.GetCustomMetricRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.GetCustomMetricRequest build() { + com.google.analytics.admin.v1beta.GetCustomMetricRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.GetCustomMetricRequest buildPartial() { + com.google.analytics.admin.v1beta.GetCustomMetricRequest result = + new com.google.analytics.admin.v1beta.GetCustomMetricRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @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.admin.v1beta.GetCustomMetricRequest) { + return mergeFrom((com.google.analytics.admin.v1beta.GetCustomMetricRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1beta.GetCustomMetricRequest other) { + if (other == com.google.analytics.admin.v1beta.GetCustomMetricRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.GetCustomMetricRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.GetCustomMetricRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the CustomMetric to get.
+     * Example format: properties/1234/customMetrics/5678
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the CustomMetric to get.
+     * Example format: properties/1234/customMetrics/5678
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the CustomMetric to get.
+     * Example format: properties/1234/customMetrics/5678
+     * 
+ * + * + * 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; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the CustomMetric to get.
+     * Example format: properties/1234/customMetrics/5678
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the CustomMetric to get.
+     * Example format: properties/1234/customMetrics/5678
+     * 
+ * + * + * 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; + 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.admin.v1beta.GetCustomMetricRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.GetCustomMetricRequest) + private static final com.google.analytics.admin.v1beta.GetCustomMetricRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.GetCustomMetricRequest(); + } + + public static com.google.analytics.admin.v1beta.GetCustomMetricRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetCustomMetricRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetCustomMetricRequest(input, extensionRegistry); + } + }; + + 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.admin.v1beta.GetCustomMetricRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetCustomMetricRequestOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetCustomMetricRequestOrBuilder.java new file mode 100644 index 000000000000..6a34dd0ce5c0 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetCustomMetricRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +public interface GetCustomMetricRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.GetCustomMetricRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the CustomMetric to get.
+   * Example format: properties/1234/customMetrics/5678
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the CustomMetric to get.
+   * Example format: properties/1234/customMetrics/5678
+   * 
+ * + * + * 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-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetDataRetentionSettingsRequest.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetDataRetentionSettingsRequest.java new file mode 100644 index 000000000000..29b31097b23c --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetDataRetentionSettingsRequest.java @@ -0,0 +1,684 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * Request message for GetDataRetentionSettings RPC.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.GetDataRetentionSettingsRequest} + */ +public final class GetDataRetentionSettingsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.GetDataRetentionSettingsRequest) + GetDataRetentionSettingsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetDataRetentionSettingsRequest.newBuilder() to construct. + private GetDataRetentionSettingsRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetDataRetentionSettingsRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetDataRetentionSettingsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetDataRetentionSettingsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_GetDataRetentionSettingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_GetDataRetentionSettingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.GetDataRetentionSettingsRequest.class, + com.google.analytics.admin.v1beta.GetDataRetentionSettingsRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the settings to lookup.
+   * Format:
+   * properties/{property}/dataRetentionSettings
+   * Example: "properties/1000/dataRetentionSettings"
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the settings to lookup.
+   * Format:
+   * properties/{property}/dataRetentionSettings
+   * Example: "properties/1000/dataRetentionSettings"
+   * 
+ * + * + * 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_); + } + unknownFields.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 += unknownFields.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.admin.v1beta.GetDataRetentionSettingsRequest)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.GetDataRetentionSettingsRequest other = + (com.google.analytics.admin.v1beta.GetDataRetentionSettingsRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.GetDataRetentionSettingsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.GetDataRetentionSettingsRequest 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.admin.v1beta.GetDataRetentionSettingsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.GetDataRetentionSettingsRequest 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.admin.v1beta.GetDataRetentionSettingsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.GetDataRetentionSettingsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.GetDataRetentionSettingsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.GetDataRetentionSettingsRequest 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.admin.v1beta.GetDataRetentionSettingsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.GetDataRetentionSettingsRequest + 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.admin.v1beta.GetDataRetentionSettingsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.GetDataRetentionSettingsRequest 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.admin.v1beta.GetDataRetentionSettingsRequest 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; + } + /** + * + * + *
+   * Request message for GetDataRetentionSettings RPC.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.GetDataRetentionSettingsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.GetDataRetentionSettingsRequest) + com.google.analytics.admin.v1beta.GetDataRetentionSettingsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_GetDataRetentionSettingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_GetDataRetentionSettingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.GetDataRetentionSettingsRequest.class, + com.google.analytics.admin.v1beta.GetDataRetentionSettingsRequest.Builder.class); + } + + // Construct using + // com.google.analytics.admin.v1beta.GetDataRetentionSettingsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_GetDataRetentionSettingsRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.GetDataRetentionSettingsRequest + getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.GetDataRetentionSettingsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.GetDataRetentionSettingsRequest build() { + com.google.analytics.admin.v1beta.GetDataRetentionSettingsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.GetDataRetentionSettingsRequest buildPartial() { + com.google.analytics.admin.v1beta.GetDataRetentionSettingsRequest result = + new com.google.analytics.admin.v1beta.GetDataRetentionSettingsRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @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.admin.v1beta.GetDataRetentionSettingsRequest) { + return mergeFrom((com.google.analytics.admin.v1beta.GetDataRetentionSettingsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.analytics.admin.v1beta.GetDataRetentionSettingsRequest other) { + if (other + == com.google.analytics.admin.v1beta.GetDataRetentionSettingsRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.GetDataRetentionSettingsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.GetDataRetentionSettingsRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the settings to lookup.
+     * Format:
+     * properties/{property}/dataRetentionSettings
+     * Example: "properties/1000/dataRetentionSettings"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the settings to lookup.
+     * Format:
+     * properties/{property}/dataRetentionSettings
+     * Example: "properties/1000/dataRetentionSettings"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the settings to lookup.
+     * Format:
+     * properties/{property}/dataRetentionSettings
+     * Example: "properties/1000/dataRetentionSettings"
+     * 
+ * + * + * 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; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the settings to lookup.
+     * Format:
+     * properties/{property}/dataRetentionSettings
+     * Example: "properties/1000/dataRetentionSettings"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the settings to lookup.
+     * Format:
+     * properties/{property}/dataRetentionSettings
+     * Example: "properties/1000/dataRetentionSettings"
+     * 
+ * + * + * 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; + 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.admin.v1beta.GetDataRetentionSettingsRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.GetDataRetentionSettingsRequest) + private static final com.google.analytics.admin.v1beta.GetDataRetentionSettingsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.GetDataRetentionSettingsRequest(); + } + + public static com.google.analytics.admin.v1beta.GetDataRetentionSettingsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetDataRetentionSettingsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetDataRetentionSettingsRequest(input, extensionRegistry); + } + }; + + 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.admin.v1beta.GetDataRetentionSettingsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetDataRetentionSettingsRequestOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetDataRetentionSettingsRequestOrBuilder.java new file mode 100644 index 000000000000..e4a28fc482dd --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetDataRetentionSettingsRequestOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +public interface GetDataRetentionSettingsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.GetDataRetentionSettingsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the settings to lookup.
+   * Format:
+   * properties/{property}/dataRetentionSettings
+   * Example: "properties/1000/dataRetentionSettings"
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the settings to lookup.
+   * Format:
+   * properties/{property}/dataRetentionSettings
+   * Example: "properties/1000/dataRetentionSettings"
+   * 
+ * + * + * 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-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetDataSharingSettingsRequest.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetDataSharingSettingsRequest.java new file mode 100644 index 000000000000..71d2c8e8a3b9 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetDataSharingSettingsRequest.java @@ -0,0 +1,674 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * Request message for GetDataSharingSettings RPC.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.GetDataSharingSettingsRequest} + */ +public final class GetDataSharingSettingsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.GetDataSharingSettingsRequest) + GetDataSharingSettingsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetDataSharingSettingsRequest.newBuilder() to construct. + private GetDataSharingSettingsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetDataSharingSettingsRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetDataSharingSettingsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetDataSharingSettingsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_GetDataSharingSettingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_GetDataSharingSettingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.GetDataSharingSettingsRequest.class, + com.google.analytics.admin.v1beta.GetDataSharingSettingsRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the settings to lookup.
+   * Format: accounts/{account}/dataSharingSettings
+   * Example: "accounts/1000/dataSharingSettings"
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the settings to lookup.
+   * Format: accounts/{account}/dataSharingSettings
+   * Example: "accounts/1000/dataSharingSettings"
+   * 
+ * + * + * 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_); + } + unknownFields.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 += unknownFields.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.admin.v1beta.GetDataSharingSettingsRequest)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.GetDataSharingSettingsRequest other = + (com.google.analytics.admin.v1beta.GetDataSharingSettingsRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.GetDataSharingSettingsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.GetDataSharingSettingsRequest 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.admin.v1beta.GetDataSharingSettingsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.GetDataSharingSettingsRequest 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.admin.v1beta.GetDataSharingSettingsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.GetDataSharingSettingsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.GetDataSharingSettingsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.GetDataSharingSettingsRequest 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.admin.v1beta.GetDataSharingSettingsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.GetDataSharingSettingsRequest 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.admin.v1beta.GetDataSharingSettingsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.GetDataSharingSettingsRequest 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.admin.v1beta.GetDataSharingSettingsRequest 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; + } + /** + * + * + *
+   * Request message for GetDataSharingSettings RPC.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.GetDataSharingSettingsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.GetDataSharingSettingsRequest) + com.google.analytics.admin.v1beta.GetDataSharingSettingsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_GetDataSharingSettingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_GetDataSharingSettingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.GetDataSharingSettingsRequest.class, + com.google.analytics.admin.v1beta.GetDataSharingSettingsRequest.Builder.class); + } + + // Construct using com.google.analytics.admin.v1beta.GetDataSharingSettingsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_GetDataSharingSettingsRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.GetDataSharingSettingsRequest + getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.GetDataSharingSettingsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.GetDataSharingSettingsRequest build() { + com.google.analytics.admin.v1beta.GetDataSharingSettingsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.GetDataSharingSettingsRequest buildPartial() { + com.google.analytics.admin.v1beta.GetDataSharingSettingsRequest result = + new com.google.analytics.admin.v1beta.GetDataSharingSettingsRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @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.admin.v1beta.GetDataSharingSettingsRequest) { + return mergeFrom((com.google.analytics.admin.v1beta.GetDataSharingSettingsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.analytics.admin.v1beta.GetDataSharingSettingsRequest other) { + if (other + == com.google.analytics.admin.v1beta.GetDataSharingSettingsRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.GetDataSharingSettingsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.GetDataSharingSettingsRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the settings to lookup.
+     * Format: accounts/{account}/dataSharingSettings
+     * Example: "accounts/1000/dataSharingSettings"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the settings to lookup.
+     * Format: accounts/{account}/dataSharingSettings
+     * Example: "accounts/1000/dataSharingSettings"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the settings to lookup.
+     * Format: accounts/{account}/dataSharingSettings
+     * Example: "accounts/1000/dataSharingSettings"
+     * 
+ * + * + * 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; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the settings to lookup.
+     * Format: accounts/{account}/dataSharingSettings
+     * Example: "accounts/1000/dataSharingSettings"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the settings to lookup.
+     * Format: accounts/{account}/dataSharingSettings
+     * Example: "accounts/1000/dataSharingSettings"
+     * 
+ * + * + * 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; + 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.admin.v1beta.GetDataSharingSettingsRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.GetDataSharingSettingsRequest) + private static final com.google.analytics.admin.v1beta.GetDataSharingSettingsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.GetDataSharingSettingsRequest(); + } + + public static com.google.analytics.admin.v1beta.GetDataSharingSettingsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetDataSharingSettingsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetDataSharingSettingsRequest(input, extensionRegistry); + } + }; + + 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.admin.v1beta.GetDataSharingSettingsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetDataSharingSettingsRequestOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetDataSharingSettingsRequestOrBuilder.java new file mode 100644 index 000000000000..19282a80c9f4 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetDataSharingSettingsRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +public interface GetDataSharingSettingsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.GetDataSharingSettingsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the settings to lookup.
+   * Format: accounts/{account}/dataSharingSettings
+   * Example: "accounts/1000/dataSharingSettings"
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the settings to lookup.
+   * Format: accounts/{account}/dataSharingSettings
+   * Example: "accounts/1000/dataSharingSettings"
+   * 
+ * + * + * 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-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetDataStreamRequest.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetDataStreamRequest.java new file mode 100644 index 000000000000..5dab843952dd --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetDataStreamRequest.java @@ -0,0 +1,660 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * Request message for GetDataStream RPC.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.GetDataStreamRequest} + */ +public final class GetDataStreamRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.GetDataStreamRequest) + GetDataStreamRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetDataStreamRequest.newBuilder() to construct. + private GetDataStreamRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetDataStreamRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetDataStreamRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetDataStreamRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_GetDataStreamRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_GetDataStreamRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.GetDataStreamRequest.class, + com.google.analytics.admin.v1beta.GetDataStreamRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the DataStream to get.
+   * Example format: properties/1234/dataStreams/5678
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the DataStream to get.
+   * Example format: properties/1234/dataStreams/5678
+   * 
+ * + * + * 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_); + } + unknownFields.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 += unknownFields.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.admin.v1beta.GetDataStreamRequest)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.GetDataStreamRequest other = + (com.google.analytics.admin.v1beta.GetDataStreamRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.GetDataStreamRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.GetDataStreamRequest 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.admin.v1beta.GetDataStreamRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.GetDataStreamRequest 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.admin.v1beta.GetDataStreamRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.GetDataStreamRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.GetDataStreamRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.GetDataStreamRequest 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.admin.v1beta.GetDataStreamRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.GetDataStreamRequest 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.admin.v1beta.GetDataStreamRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.GetDataStreamRequest 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.admin.v1beta.GetDataStreamRequest 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; + } + /** + * + * + *
+   * Request message for GetDataStream RPC.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.GetDataStreamRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.GetDataStreamRequest) + com.google.analytics.admin.v1beta.GetDataStreamRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_GetDataStreamRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_GetDataStreamRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.GetDataStreamRequest.class, + com.google.analytics.admin.v1beta.GetDataStreamRequest.Builder.class); + } + + // Construct using com.google.analytics.admin.v1beta.GetDataStreamRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_GetDataStreamRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.GetDataStreamRequest getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.GetDataStreamRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.GetDataStreamRequest build() { + com.google.analytics.admin.v1beta.GetDataStreamRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.GetDataStreamRequest buildPartial() { + com.google.analytics.admin.v1beta.GetDataStreamRequest result = + new com.google.analytics.admin.v1beta.GetDataStreamRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @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.admin.v1beta.GetDataStreamRequest) { + return mergeFrom((com.google.analytics.admin.v1beta.GetDataStreamRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1beta.GetDataStreamRequest other) { + if (other == com.google.analytics.admin.v1beta.GetDataStreamRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.GetDataStreamRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.GetDataStreamRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the DataStream to get.
+     * Example format: properties/1234/dataStreams/5678
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the DataStream to get.
+     * Example format: properties/1234/dataStreams/5678
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the DataStream to get.
+     * Example format: properties/1234/dataStreams/5678
+     * 
+ * + * + * 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; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the DataStream to get.
+     * Example format: properties/1234/dataStreams/5678
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the DataStream to get.
+     * Example format: properties/1234/dataStreams/5678
+     * 
+ * + * + * 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; + 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.admin.v1beta.GetDataStreamRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.GetDataStreamRequest) + private static final com.google.analytics.admin.v1beta.GetDataStreamRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.GetDataStreamRequest(); + } + + public static com.google.analytics.admin.v1beta.GetDataStreamRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetDataStreamRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetDataStreamRequest(input, extensionRegistry); + } + }; + + 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.admin.v1beta.GetDataStreamRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetDataStreamRequestOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetDataStreamRequestOrBuilder.java new file mode 100644 index 000000000000..52da04b187c6 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetDataStreamRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +public interface GetDataStreamRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.GetDataStreamRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the DataStream to get.
+   * Example format: properties/1234/dataStreams/5678
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the DataStream to get.
+   * Example format: properties/1234/dataStreams/5678
+   * 
+ * + * + * 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-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetMeasurementProtocolSecretRequest.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetMeasurementProtocolSecretRequest.java new file mode 100644 index 000000000000..4aa2009f01ca --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetMeasurementProtocolSecretRequest.java @@ -0,0 +1,680 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * Request message for GetMeasurementProtocolSecret RPC.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest} + */ +public final class GetMeasurementProtocolSecretRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest) + GetMeasurementProtocolSecretRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetMeasurementProtocolSecretRequest.newBuilder() to construct. + private GetMeasurementProtocolSecretRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetMeasurementProtocolSecretRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetMeasurementProtocolSecretRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetMeasurementProtocolSecretRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_GetMeasurementProtocolSecretRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_GetMeasurementProtocolSecretRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest.class, + com.google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the measurement protocol secret to lookup.
+   * Format:
+   * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the measurement protocol secret to lookup.
+   * Format:
+   * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret}
+   * 
+ * + * + * 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_); + } + unknownFields.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 += unknownFields.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.admin.v1beta.GetMeasurementProtocolSecretRequest)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest other = + (com.google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest 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.admin.v1beta.GetMeasurementProtocolSecretRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest 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.admin.v1beta.GetMeasurementProtocolSecretRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest 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.admin.v1beta.GetMeasurementProtocolSecretRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest + 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.admin.v1beta.GetMeasurementProtocolSecretRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest 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.admin.v1beta.GetMeasurementProtocolSecretRequest 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; + } + /** + * + * + *
+   * Request message for GetMeasurementProtocolSecret RPC.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest) + com.google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_GetMeasurementProtocolSecretRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_GetMeasurementProtocolSecretRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest.class, + com.google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest.Builder.class); + } + + // Construct using + // com.google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_GetMeasurementProtocolSecretRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest + getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest build() { + com.google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest buildPartial() { + com.google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest result = + new com.google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @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.admin.v1beta.GetMeasurementProtocolSecretRequest) { + return mergeFrom( + (com.google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest other) { + if (other + == com.google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the measurement protocol secret to lookup.
+     * Format:
+     * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the measurement protocol secret to lookup.
+     * Format:
+     * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the measurement protocol secret to lookup.
+     * Format:
+     * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret}
+     * 
+ * + * + * 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; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the measurement protocol secret to lookup.
+     * Format:
+     * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the measurement protocol secret to lookup.
+     * Format:
+     * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret}
+     * 
+ * + * + * 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; + 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.admin.v1beta.GetMeasurementProtocolSecretRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest) + private static final com.google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest(); + } + + public static com.google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetMeasurementProtocolSecretRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetMeasurementProtocolSecretRequest(input, extensionRegistry); + } + }; + + 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.admin.v1beta.GetMeasurementProtocolSecretRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetMeasurementProtocolSecretRequestOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetMeasurementProtocolSecretRequestOrBuilder.java new file mode 100644 index 000000000000..a80e77914981 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetMeasurementProtocolSecretRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +public interface GetMeasurementProtocolSecretRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the measurement protocol secret to lookup.
+   * Format:
+   * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the measurement protocol secret to lookup.
+   * Format:
+   * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret}
+   * 
+ * + * + * 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-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetPropertyRequest.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetPropertyRequest.java new file mode 100644 index 000000000000..46e8cac36fcf --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetPropertyRequest.java @@ -0,0 +1,666 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * Request message for GetProperty RPC.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.GetPropertyRequest} + */ +public final class GetPropertyRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.GetPropertyRequest) + GetPropertyRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetPropertyRequest.newBuilder() to construct. + private GetPropertyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetPropertyRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetPropertyRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetPropertyRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_GetPropertyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_GetPropertyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.GetPropertyRequest.class, + com.google.analytics.admin.v1beta.GetPropertyRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the property to lookup.
+   * Format: properties/{property_id}
+   * Example: "properties/1000"
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the property to lookup.
+   * Format: properties/{property_id}
+   * Example: "properties/1000"
+   * 
+ * + * + * 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_); + } + unknownFields.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 += unknownFields.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.admin.v1beta.GetPropertyRequest)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.GetPropertyRequest other = + (com.google.analytics.admin.v1beta.GetPropertyRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.GetPropertyRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.GetPropertyRequest 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.admin.v1beta.GetPropertyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.GetPropertyRequest 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.admin.v1beta.GetPropertyRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.GetPropertyRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.GetPropertyRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.GetPropertyRequest 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.admin.v1beta.GetPropertyRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.GetPropertyRequest 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.admin.v1beta.GetPropertyRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.GetPropertyRequest 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.admin.v1beta.GetPropertyRequest 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; + } + /** + * + * + *
+   * Request message for GetProperty RPC.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.GetPropertyRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.GetPropertyRequest) + com.google.analytics.admin.v1beta.GetPropertyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_GetPropertyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_GetPropertyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.GetPropertyRequest.class, + com.google.analytics.admin.v1beta.GetPropertyRequest.Builder.class); + } + + // Construct using com.google.analytics.admin.v1beta.GetPropertyRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_GetPropertyRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.GetPropertyRequest getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.GetPropertyRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.GetPropertyRequest build() { + com.google.analytics.admin.v1beta.GetPropertyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.GetPropertyRequest buildPartial() { + com.google.analytics.admin.v1beta.GetPropertyRequest result = + new com.google.analytics.admin.v1beta.GetPropertyRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @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.admin.v1beta.GetPropertyRequest) { + return mergeFrom((com.google.analytics.admin.v1beta.GetPropertyRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1beta.GetPropertyRequest other) { + if (other == com.google.analytics.admin.v1beta.GetPropertyRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.GetPropertyRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.GetPropertyRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the property to lookup.
+     * Format: properties/{property_id}
+     * Example: "properties/1000"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the property to lookup.
+     * Format: properties/{property_id}
+     * Example: "properties/1000"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the property to lookup.
+     * Format: properties/{property_id}
+     * Example: "properties/1000"
+     * 
+ * + * + * 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; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the property to lookup.
+     * Format: properties/{property_id}
+     * Example: "properties/1000"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the property to lookup.
+     * Format: properties/{property_id}
+     * Example: "properties/1000"
+     * 
+ * + * + * 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; + 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.admin.v1beta.GetPropertyRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.GetPropertyRequest) + private static final com.google.analytics.admin.v1beta.GetPropertyRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.GetPropertyRequest(); + } + + public static com.google.analytics.admin.v1beta.GetPropertyRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetPropertyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetPropertyRequest(input, extensionRegistry); + } + }; + + 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.admin.v1beta.GetPropertyRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetPropertyRequestOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetPropertyRequestOrBuilder.java new file mode 100644 index 000000000000..4b2fd57e6660 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GetPropertyRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +public interface GetPropertyRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.GetPropertyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the property to lookup.
+   * Format: properties/{property_id}
+   * Example: "properties/1000"
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the property to lookup.
+   * Format: properties/{property_id}
+   * Example: "properties/1000"
+   * 
+ * + * + * 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-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GoogleAdsLink.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GoogleAdsLink.java new file mode 100644 index 000000000000..8d415a09dcdc --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GoogleAdsLink.java @@ -0,0 +1,2001 @@ +/* + * Copyright 2020 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/admin/v1beta/resources.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * A link between a GA4 property and a Google Ads account.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.GoogleAdsLink} + */ +public final class GoogleAdsLink extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.GoogleAdsLink) + GoogleAdsLinkOrBuilder { + private static final long serialVersionUID = 0L; + // Use GoogleAdsLink.newBuilder() to construct. + private GoogleAdsLink(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GoogleAdsLink() { + name_ = ""; + customerId_ = ""; + creatorEmailAddress_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GoogleAdsLink(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GoogleAdsLink( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + customerId_ = s; + break; + } + case 32: + { + canManageClients_ = input.readBool(); + break; + } + case 42: + { + com.google.protobuf.BoolValue.Builder subBuilder = null; + if (adsPersonalizationEnabled_ != null) { + subBuilder = adsPersonalizationEnabled_.toBuilder(); + } + adsPersonalizationEnabled_ = + input.readMessage(com.google.protobuf.BoolValue.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(adsPersonalizationEnabled_); + adsPersonalizationEnabled_ = subBuilder.buildPartial(); + } + + break; + } + case 58: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 66: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 74: + { + java.lang.String s = input.readStringRequireUtf8(); + + creatorEmailAddress_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_GoogleAdsLink_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_GoogleAdsLink_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.GoogleAdsLink.class, + com.google.analytics.admin.v1beta.GoogleAdsLink.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Output only. Format: properties/{propertyId}/googleAdsLinks/{googleAdsLinkId}
+   * Note: googleAdsLinkId is not the Google Ads customer ID.
+   * 
+ * + * string name = 1 [(.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. Format: properties/{propertyId}/googleAdsLinks/{googleAdsLinkId}
+   * Note: googleAdsLinkId is not the Google Ads customer ID.
+   * 
+ * + * string name = 1 [(.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 CUSTOMER_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object customerId_; + /** + * + * + *
+   * Immutable. Google Ads customer ID.
+   * 
+ * + * string customer_id = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The customerId. + */ + @java.lang.Override + public java.lang.String getCustomerId() { + java.lang.Object ref = customerId_; + 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(); + customerId_ = s; + return s; + } + } + /** + * + * + *
+   * Immutable. Google Ads customer ID.
+   * 
+ * + * string customer_id = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for customerId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCustomerIdBytes() { + java.lang.Object ref = customerId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + customerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CAN_MANAGE_CLIENTS_FIELD_NUMBER = 4; + private boolean canManageClients_; + /** + * + * + *
+   * Output only. If true, this link is for a Google Ads manager account.
+   * 
+ * + * bool can_manage_clients = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The canManageClients. + */ + @java.lang.Override + public boolean getCanManageClients() { + return canManageClients_; + } + + public static final int ADS_PERSONALIZATION_ENABLED_FIELD_NUMBER = 5; + private com.google.protobuf.BoolValue adsPersonalizationEnabled_; + /** + * + * + *
+   * Enable personalized advertising features with this integration.
+   * Automatically publish my Google Analytics audience lists and Google
+   * Analytics remarketing events/parameters to the linked Google Ads account.
+   * If this field is not set on create/update, it will be defaulted to true.
+   * 
+ * + * .google.protobuf.BoolValue ads_personalization_enabled = 5; + * + * @return Whether the adsPersonalizationEnabled field is set. + */ + @java.lang.Override + public boolean hasAdsPersonalizationEnabled() { + return adsPersonalizationEnabled_ != null; + } + /** + * + * + *
+   * Enable personalized advertising features with this integration.
+   * Automatically publish my Google Analytics audience lists and Google
+   * Analytics remarketing events/parameters to the linked Google Ads account.
+   * If this field is not set on create/update, it will be defaulted to true.
+   * 
+ * + * .google.protobuf.BoolValue ads_personalization_enabled = 5; + * + * @return The adsPersonalizationEnabled. + */ + @java.lang.Override + public com.google.protobuf.BoolValue getAdsPersonalizationEnabled() { + return adsPersonalizationEnabled_ == null + ? com.google.protobuf.BoolValue.getDefaultInstance() + : adsPersonalizationEnabled_; + } + /** + * + * + *
+   * Enable personalized advertising features with this integration.
+   * Automatically publish my Google Analytics audience lists and Google
+   * Analytics remarketing events/parameters to the linked Google Ads account.
+   * If this field is not set on create/update, it will be defaulted to true.
+   * 
+ * + * .google.protobuf.BoolValue ads_personalization_enabled = 5; + */ + @java.lang.Override + public com.google.protobuf.BoolValueOrBuilder getAdsPersonalizationEnabledOrBuilder() { + return getAdsPersonalizationEnabled(); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Time when this link was originally created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. Time when this link was originally created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Time when this link was originally created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 8; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. Time when this link was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. Time when this link was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. Time when this link was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + public static final int CREATOR_EMAIL_ADDRESS_FIELD_NUMBER = 9; + private volatile java.lang.Object creatorEmailAddress_; + /** + * + * + *
+   * Output only. Email address of the user that created the link.
+   * An empty string will be returned if the email address can't be retrieved.
+   * 
+ * + * string creator_email_address = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The creatorEmailAddress. + */ + @java.lang.Override + public java.lang.String getCreatorEmailAddress() { + java.lang.Object ref = creatorEmailAddress_; + 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(); + creatorEmailAddress_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Email address of the user that created the link.
+   * An empty string will be returned if the email address can't be retrieved.
+   * 
+ * + * string creator_email_address = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for creatorEmailAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCreatorEmailAddressBytes() { + java.lang.Object ref = creatorEmailAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + creatorEmailAddress_ = 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_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(customerId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, customerId_); + } + if (canManageClients_ != false) { + output.writeBool(4, canManageClients_); + } + if (adsPersonalizationEnabled_ != null) { + output.writeMessage(5, getAdsPersonalizationEnabled()); + } + if (createTime_ != null) { + output.writeMessage(7, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(8, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(creatorEmailAddress_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, creatorEmailAddress_); + } + unknownFields.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(customerId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, customerId_); + } + if (canManageClients_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, canManageClients_); + } + if (adsPersonalizationEnabled_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, getAdsPersonalizationEnabled()); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(creatorEmailAddress_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, creatorEmailAddress_); + } + size += unknownFields.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.admin.v1beta.GoogleAdsLink)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.GoogleAdsLink other = + (com.google.analytics.admin.v1beta.GoogleAdsLink) obj; + + if (!getName().equals(other.getName())) return false; + if (!getCustomerId().equals(other.getCustomerId())) return false; + if (getCanManageClients() != other.getCanManageClients()) return false; + if (hasAdsPersonalizationEnabled() != other.hasAdsPersonalizationEnabled()) return false; + if (hasAdsPersonalizationEnabled()) { + if (!getAdsPersonalizationEnabled().equals(other.getAdsPersonalizationEnabled())) + return false; + } + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getCreatorEmailAddress().equals(other.getCreatorEmailAddress())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + CUSTOMER_ID_FIELD_NUMBER; + hash = (53 * hash) + getCustomerId().hashCode(); + hash = (37 * hash) + CAN_MANAGE_CLIENTS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getCanManageClients()); + if (hasAdsPersonalizationEnabled()) { + hash = (37 * hash) + ADS_PERSONALIZATION_ENABLED_FIELD_NUMBER; + hash = (53 * hash) + getAdsPersonalizationEnabled().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + CREATOR_EMAIL_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getCreatorEmailAddress().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.GoogleAdsLink parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.GoogleAdsLink 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.admin.v1beta.GoogleAdsLink parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.GoogleAdsLink 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.admin.v1beta.GoogleAdsLink parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.GoogleAdsLink parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.GoogleAdsLink parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.GoogleAdsLink 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.admin.v1beta.GoogleAdsLink parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.GoogleAdsLink 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.admin.v1beta.GoogleAdsLink parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.GoogleAdsLink 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.admin.v1beta.GoogleAdsLink 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 link between a GA4 property and a Google Ads account.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.GoogleAdsLink} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.GoogleAdsLink) + com.google.analytics.admin.v1beta.GoogleAdsLinkOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_GoogleAdsLink_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_GoogleAdsLink_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.GoogleAdsLink.class, + com.google.analytics.admin.v1beta.GoogleAdsLink.Builder.class); + } + + // Construct using com.google.analytics.admin.v1beta.GoogleAdsLink.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + customerId_ = ""; + + canManageClients_ = false; + + if (adsPersonalizationEnabledBuilder_ == null) { + adsPersonalizationEnabled_ = null; + } else { + adsPersonalizationEnabled_ = null; + adsPersonalizationEnabledBuilder_ = null; + } + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + creatorEmailAddress_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_GoogleAdsLink_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.GoogleAdsLink getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.GoogleAdsLink.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.GoogleAdsLink build() { + com.google.analytics.admin.v1beta.GoogleAdsLink result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.GoogleAdsLink buildPartial() { + com.google.analytics.admin.v1beta.GoogleAdsLink result = + new com.google.analytics.admin.v1beta.GoogleAdsLink(this); + result.name_ = name_; + result.customerId_ = customerId_; + result.canManageClients_ = canManageClients_; + if (adsPersonalizationEnabledBuilder_ == null) { + result.adsPersonalizationEnabled_ = adsPersonalizationEnabled_; + } else { + result.adsPersonalizationEnabled_ = adsPersonalizationEnabledBuilder_.build(); + } + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + result.creatorEmailAddress_ = creatorEmailAddress_; + onBuilt(); + return result; + } + + @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.admin.v1beta.GoogleAdsLink) { + return mergeFrom((com.google.analytics.admin.v1beta.GoogleAdsLink) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1beta.GoogleAdsLink other) { + if (other == com.google.analytics.admin.v1beta.GoogleAdsLink.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getCustomerId().isEmpty()) { + customerId_ = other.customerId_; + onChanged(); + } + if (other.getCanManageClients() != false) { + setCanManageClients(other.getCanManageClients()); + } + if (other.hasAdsPersonalizationEnabled()) { + mergeAdsPersonalizationEnabled(other.getAdsPersonalizationEnabled()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (!other.getCreatorEmailAddress().isEmpty()) { + creatorEmailAddress_ = other.creatorEmailAddress_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.GoogleAdsLink parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.analytics.admin.v1beta.GoogleAdsLink) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. Format: properties/{propertyId}/googleAdsLinks/{googleAdsLinkId}
+     * Note: googleAdsLinkId is not the Google Ads customer ID.
+     * 
+ * + * string name = 1 [(.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. Format: properties/{propertyId}/googleAdsLinks/{googleAdsLinkId}
+     * Note: googleAdsLinkId is not the Google Ads customer ID.
+     * 
+ * + * string name = 1 [(.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. Format: properties/{propertyId}/googleAdsLinks/{googleAdsLinkId}
+     * Note: googleAdsLinkId is not the Google Ads customer ID.
+     * 
+ * + * string name = 1 [(.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; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Format: properties/{propertyId}/googleAdsLinks/{googleAdsLinkId}
+     * Note: googleAdsLinkId is not the Google Ads customer ID.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Format: properties/{propertyId}/googleAdsLinks/{googleAdsLinkId}
+     * Note: googleAdsLinkId is not the Google Ads customer ID.
+     * 
+ * + * string name = 1 [(.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; + onChanged(); + return this; + } + + private java.lang.Object customerId_ = ""; + /** + * + * + *
+     * Immutable. Google Ads customer ID.
+     * 
+ * + * string customer_id = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The customerId. + */ + public java.lang.String getCustomerId() { + java.lang.Object ref = customerId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + customerId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Immutable. Google Ads customer ID.
+     * 
+ * + * string customer_id = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for customerId. + */ + public com.google.protobuf.ByteString getCustomerIdBytes() { + java.lang.Object ref = customerId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + customerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Immutable. Google Ads customer ID.
+     * 
+ * + * string customer_id = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The customerId to set. + * @return This builder for chaining. + */ + public Builder setCustomerId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + customerId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. Google Ads customer ID.
+     * 
+ * + * string customer_id = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearCustomerId() { + + customerId_ = getDefaultInstance().getCustomerId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. Google Ads customer ID.
+     * 
+ * + * string customer_id = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The bytes for customerId to set. + * @return This builder for chaining. + */ + public Builder setCustomerIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + customerId_ = value; + onChanged(); + return this; + } + + private boolean canManageClients_; + /** + * + * + *
+     * Output only. If true, this link is for a Google Ads manager account.
+     * 
+ * + * bool can_manage_clients = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The canManageClients. + */ + @java.lang.Override + public boolean getCanManageClients() { + return canManageClients_; + } + /** + * + * + *
+     * Output only. If true, this link is for a Google Ads manager account.
+     * 
+ * + * bool can_manage_clients = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The canManageClients to set. + * @return This builder for chaining. + */ + public Builder setCanManageClients(boolean value) { + + canManageClients_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. If true, this link is for a Google Ads manager account.
+     * 
+ * + * bool can_manage_clients = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearCanManageClients() { + + canManageClients_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.BoolValue adsPersonalizationEnabled_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.BoolValue, + com.google.protobuf.BoolValue.Builder, + com.google.protobuf.BoolValueOrBuilder> + adsPersonalizationEnabledBuilder_; + /** + * + * + *
+     * Enable personalized advertising features with this integration.
+     * Automatically publish my Google Analytics audience lists and Google
+     * Analytics remarketing events/parameters to the linked Google Ads account.
+     * If this field is not set on create/update, it will be defaulted to true.
+     * 
+ * + * .google.protobuf.BoolValue ads_personalization_enabled = 5; + * + * @return Whether the adsPersonalizationEnabled field is set. + */ + public boolean hasAdsPersonalizationEnabled() { + return adsPersonalizationEnabledBuilder_ != null || adsPersonalizationEnabled_ != null; + } + /** + * + * + *
+     * Enable personalized advertising features with this integration.
+     * Automatically publish my Google Analytics audience lists and Google
+     * Analytics remarketing events/parameters to the linked Google Ads account.
+     * If this field is not set on create/update, it will be defaulted to true.
+     * 
+ * + * .google.protobuf.BoolValue ads_personalization_enabled = 5; + * + * @return The adsPersonalizationEnabled. + */ + public com.google.protobuf.BoolValue getAdsPersonalizationEnabled() { + if (adsPersonalizationEnabledBuilder_ == null) { + return adsPersonalizationEnabled_ == null + ? com.google.protobuf.BoolValue.getDefaultInstance() + : adsPersonalizationEnabled_; + } else { + return adsPersonalizationEnabledBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Enable personalized advertising features with this integration.
+     * Automatically publish my Google Analytics audience lists and Google
+     * Analytics remarketing events/parameters to the linked Google Ads account.
+     * If this field is not set on create/update, it will be defaulted to true.
+     * 
+ * + * .google.protobuf.BoolValue ads_personalization_enabled = 5; + */ + public Builder setAdsPersonalizationEnabled(com.google.protobuf.BoolValue value) { + if (adsPersonalizationEnabledBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + adsPersonalizationEnabled_ = value; + onChanged(); + } else { + adsPersonalizationEnabledBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Enable personalized advertising features with this integration.
+     * Automatically publish my Google Analytics audience lists and Google
+     * Analytics remarketing events/parameters to the linked Google Ads account.
+     * If this field is not set on create/update, it will be defaulted to true.
+     * 
+ * + * .google.protobuf.BoolValue ads_personalization_enabled = 5; + */ + public Builder setAdsPersonalizationEnabled( + com.google.protobuf.BoolValue.Builder builderForValue) { + if (adsPersonalizationEnabledBuilder_ == null) { + adsPersonalizationEnabled_ = builderForValue.build(); + onChanged(); + } else { + adsPersonalizationEnabledBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Enable personalized advertising features with this integration.
+     * Automatically publish my Google Analytics audience lists and Google
+     * Analytics remarketing events/parameters to the linked Google Ads account.
+     * If this field is not set on create/update, it will be defaulted to true.
+     * 
+ * + * .google.protobuf.BoolValue ads_personalization_enabled = 5; + */ + public Builder mergeAdsPersonalizationEnabled(com.google.protobuf.BoolValue value) { + if (adsPersonalizationEnabledBuilder_ == null) { + if (adsPersonalizationEnabled_ != null) { + adsPersonalizationEnabled_ = + com.google.protobuf.BoolValue.newBuilder(adsPersonalizationEnabled_) + .mergeFrom(value) + .buildPartial(); + } else { + adsPersonalizationEnabled_ = value; + } + onChanged(); + } else { + adsPersonalizationEnabledBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Enable personalized advertising features with this integration.
+     * Automatically publish my Google Analytics audience lists and Google
+     * Analytics remarketing events/parameters to the linked Google Ads account.
+     * If this field is not set on create/update, it will be defaulted to true.
+     * 
+ * + * .google.protobuf.BoolValue ads_personalization_enabled = 5; + */ + public Builder clearAdsPersonalizationEnabled() { + if (adsPersonalizationEnabledBuilder_ == null) { + adsPersonalizationEnabled_ = null; + onChanged(); + } else { + adsPersonalizationEnabled_ = null; + adsPersonalizationEnabledBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Enable personalized advertising features with this integration.
+     * Automatically publish my Google Analytics audience lists and Google
+     * Analytics remarketing events/parameters to the linked Google Ads account.
+     * If this field is not set on create/update, it will be defaulted to true.
+     * 
+ * + * .google.protobuf.BoolValue ads_personalization_enabled = 5; + */ + public com.google.protobuf.BoolValue.Builder getAdsPersonalizationEnabledBuilder() { + + onChanged(); + return getAdsPersonalizationEnabledFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Enable personalized advertising features with this integration.
+     * Automatically publish my Google Analytics audience lists and Google
+     * Analytics remarketing events/parameters to the linked Google Ads account.
+     * If this field is not set on create/update, it will be defaulted to true.
+     * 
+ * + * .google.protobuf.BoolValue ads_personalization_enabled = 5; + */ + public com.google.protobuf.BoolValueOrBuilder getAdsPersonalizationEnabledOrBuilder() { + if (adsPersonalizationEnabledBuilder_ != null) { + return adsPersonalizationEnabledBuilder_.getMessageOrBuilder(); + } else { + return adsPersonalizationEnabled_ == null + ? com.google.protobuf.BoolValue.getDefaultInstance() + : adsPersonalizationEnabled_; + } + } + /** + * + * + *
+     * Enable personalized advertising features with this integration.
+     * Automatically publish my Google Analytics audience lists and Google
+     * Analytics remarketing events/parameters to the linked Google Ads account.
+     * If this field is not set on create/update, it will be defaulted to true.
+     * 
+ * + * .google.protobuf.BoolValue ads_personalization_enabled = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.BoolValue, + com.google.protobuf.BoolValue.Builder, + com.google.protobuf.BoolValueOrBuilder> + getAdsPersonalizationEnabledFieldBuilder() { + if (adsPersonalizationEnabledBuilder_ == null) { + adsPersonalizationEnabledBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.BoolValue, + com.google.protobuf.BoolValue.Builder, + com.google.protobuf.BoolValueOrBuilder>( + getAdsPersonalizationEnabled(), getParentForChildren(), isClean()); + adsPersonalizationEnabled_ = null; + } + return adsPersonalizationEnabledBuilder_; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. Time when this link was originally created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. Time when this link was originally created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when this link was originally created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when this link was originally created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when this link was originally created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when this link was originally created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Time when this link was originally created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when this link was originally created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Time when this link was originally created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. Time when this link was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * Output only. Time when this link was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when this link was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when this link was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when this link was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when this link was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Time when this link was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when this link was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. Time when this link was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private java.lang.Object creatorEmailAddress_ = ""; + /** + * + * + *
+     * Output only. Email address of the user that created the link.
+     * An empty string will be returned if the email address can't be retrieved.
+     * 
+ * + * string creator_email_address = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The creatorEmailAddress. + */ + public java.lang.String getCreatorEmailAddress() { + java.lang.Object ref = creatorEmailAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + creatorEmailAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Email address of the user that created the link.
+     * An empty string will be returned if the email address can't be retrieved.
+     * 
+ * + * string creator_email_address = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for creatorEmailAddress. + */ + public com.google.protobuf.ByteString getCreatorEmailAddressBytes() { + java.lang.Object ref = creatorEmailAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + creatorEmailAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Email address of the user that created the link.
+     * An empty string will be returned if the email address can't be retrieved.
+     * 
+ * + * string creator_email_address = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The creatorEmailAddress to set. + * @return This builder for chaining. + */ + public Builder setCreatorEmailAddress(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + creatorEmailAddress_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Email address of the user that created the link.
+     * An empty string will be returned if the email address can't be retrieved.
+     * 
+ * + * string creator_email_address = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearCreatorEmailAddress() { + + creatorEmailAddress_ = getDefaultInstance().getCreatorEmailAddress(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Email address of the user that created the link.
+     * An empty string will be returned if the email address can't be retrieved.
+     * 
+ * + * string creator_email_address = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for creatorEmailAddress to set. + * @return This builder for chaining. + */ + public Builder setCreatorEmailAddressBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + creatorEmailAddress_ = value; + 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.admin.v1beta.GoogleAdsLink) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.GoogleAdsLink) + private static final com.google.analytics.admin.v1beta.GoogleAdsLink DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.GoogleAdsLink(); + } + + public static com.google.analytics.admin.v1beta.GoogleAdsLink getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GoogleAdsLink parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GoogleAdsLink(input, extensionRegistry); + } + }; + + 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.admin.v1beta.GoogleAdsLink getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GoogleAdsLinkName.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GoogleAdsLinkName.java new file mode 100644 index 000000000000..e583cdbadd0b --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GoogleAdsLinkName.java @@ -0,0 +1,194 @@ +/* + * Copyright 2022 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.admin.v1beta; + +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 GoogleAdsLinkName implements ResourceName { + private static final PathTemplate PROPERTY_GOOGLE_ADS_LINK = + PathTemplate.createWithoutUrlEncoding( + "properties/{property}/googleAdsLinks/{google_ads_link}"); + private volatile Map fieldValuesMap; + private final String property; + private final String googleAdsLink; + + @Deprecated + protected GoogleAdsLinkName() { + property = null; + googleAdsLink = null; + } + + private GoogleAdsLinkName(Builder builder) { + property = Preconditions.checkNotNull(builder.getProperty()); + googleAdsLink = Preconditions.checkNotNull(builder.getGoogleAdsLink()); + } + + public String getProperty() { + return property; + } + + public String getGoogleAdsLink() { + return googleAdsLink; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static GoogleAdsLinkName of(String property, String googleAdsLink) { + return newBuilder().setProperty(property).setGoogleAdsLink(googleAdsLink).build(); + } + + public static String format(String property, String googleAdsLink) { + return newBuilder().setProperty(property).setGoogleAdsLink(googleAdsLink).build().toString(); + } + + public static GoogleAdsLinkName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROPERTY_GOOGLE_ADS_LINK.validatedMatch( + formattedString, "GoogleAdsLinkName.parse: formattedString not in valid format"); + return of(matchMap.get("property"), matchMap.get("google_ads_link")); + } + + 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 (GoogleAdsLinkName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROPERTY_GOOGLE_ADS_LINK.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 (googleAdsLink != null) { + fieldMapBuilder.put("google_ads_link", googleAdsLink); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROPERTY_GOOGLE_ADS_LINK.instantiate( + "property", property, "google_ads_link", googleAdsLink); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + GoogleAdsLinkName that = ((GoogleAdsLinkName) o); + return Objects.equals(this.property, that.property) + && Objects.equals(this.googleAdsLink, that.googleAdsLink); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(property); + h *= 1000003; + h ^= Objects.hashCode(googleAdsLink); + return h; + } + + /** Builder for properties/{property}/googleAdsLinks/{google_ads_link}. */ + public static class Builder { + private String property; + private String googleAdsLink; + + protected Builder() {} + + public String getProperty() { + return property; + } + + public String getGoogleAdsLink() { + return googleAdsLink; + } + + public Builder setProperty(String property) { + this.property = property; + return this; + } + + public Builder setGoogleAdsLink(String googleAdsLink) { + this.googleAdsLink = googleAdsLink; + return this; + } + + private Builder(GoogleAdsLinkName googleAdsLinkName) { + this.property = googleAdsLinkName.property; + this.googleAdsLink = googleAdsLinkName.googleAdsLink; + } + + public GoogleAdsLinkName build() { + return new GoogleAdsLinkName(this); + } + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GoogleAdsLinkOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GoogleAdsLinkOrBuilder.java new file mode 100644 index 000000000000..f6a3bc59ecd3 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/GoogleAdsLinkOrBuilder.java @@ -0,0 +1,237 @@ +/* + * Copyright 2020 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/admin/v1beta/resources.proto + +package com.google.analytics.admin.v1beta; + +public interface GoogleAdsLinkOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.GoogleAdsLink) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Format: properties/{propertyId}/googleAdsLinks/{googleAdsLinkId}
+   * Note: googleAdsLinkId is not the Google Ads customer ID.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. Format: properties/{propertyId}/googleAdsLinks/{googleAdsLinkId}
+   * Note: googleAdsLinkId is not the Google Ads customer ID.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Immutable. Google Ads customer ID.
+   * 
+ * + * string customer_id = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The customerId. + */ + java.lang.String getCustomerId(); + /** + * + * + *
+   * Immutable. Google Ads customer ID.
+   * 
+ * + * string customer_id = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for customerId. + */ + com.google.protobuf.ByteString getCustomerIdBytes(); + + /** + * + * + *
+   * Output only. If true, this link is for a Google Ads manager account.
+   * 
+ * + * bool can_manage_clients = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The canManageClients. + */ + boolean getCanManageClients(); + + /** + * + * + *
+   * Enable personalized advertising features with this integration.
+   * Automatically publish my Google Analytics audience lists and Google
+   * Analytics remarketing events/parameters to the linked Google Ads account.
+   * If this field is not set on create/update, it will be defaulted to true.
+   * 
+ * + * .google.protobuf.BoolValue ads_personalization_enabled = 5; + * + * @return Whether the adsPersonalizationEnabled field is set. + */ + boolean hasAdsPersonalizationEnabled(); + /** + * + * + *
+   * Enable personalized advertising features with this integration.
+   * Automatically publish my Google Analytics audience lists and Google
+   * Analytics remarketing events/parameters to the linked Google Ads account.
+   * If this field is not set on create/update, it will be defaulted to true.
+   * 
+ * + * .google.protobuf.BoolValue ads_personalization_enabled = 5; + * + * @return The adsPersonalizationEnabled. + */ + com.google.protobuf.BoolValue getAdsPersonalizationEnabled(); + /** + * + * + *
+   * Enable personalized advertising features with this integration.
+   * Automatically publish my Google Analytics audience lists and Google
+   * Analytics remarketing events/parameters to the linked Google Ads account.
+   * If this field is not set on create/update, it will be defaulted to true.
+   * 
+ * + * .google.protobuf.BoolValue ads_personalization_enabled = 5; + */ + com.google.protobuf.BoolValueOrBuilder getAdsPersonalizationEnabledOrBuilder(); + + /** + * + * + *
+   * Output only. Time when this link was originally created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Time when this link was originally created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Time when this link was originally created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time when this link was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. Time when this link was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. Time when this link was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Email address of the user that created the link.
+   * An empty string will be returned if the email address can't be retrieved.
+   * 
+ * + * string creator_email_address = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The creatorEmailAddress. + */ + java.lang.String getCreatorEmailAddress(); + /** + * + * + *
+   * Output only. Email address of the user that created the link.
+   * An empty string will be returned if the email address can't be retrieved.
+   * 
+ * + * string creator_email_address = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for creatorEmailAddress. + */ + com.google.protobuf.ByteString getCreatorEmailAddressBytes(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/IndustryCategory.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/IndustryCategory.java new file mode 100644 index 000000000000..a20d0eb8b061 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/IndustryCategory.java @@ -0,0 +1,704 @@ +/* + * Copyright 2020 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/admin/v1beta/resources.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * The category selected for this property, used for industry benchmarking.
+ * 
+ * + * Protobuf enum {@code google.analytics.admin.v1beta.IndustryCategory} + */ +public enum IndustryCategory implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Industry category unspecified
+   * 
+ * + * INDUSTRY_CATEGORY_UNSPECIFIED = 0; + */ + INDUSTRY_CATEGORY_UNSPECIFIED(0), + /** + * + * + *
+   * Automotive
+   * 
+ * + * AUTOMOTIVE = 1; + */ + AUTOMOTIVE(1), + /** + * + * + *
+   * Business and industrial markets
+   * 
+ * + * BUSINESS_AND_INDUSTRIAL_MARKETS = 2; + */ + BUSINESS_AND_INDUSTRIAL_MARKETS(2), + /** + * + * + *
+   * Finance
+   * 
+ * + * FINANCE = 3; + */ + FINANCE(3), + /** + * + * + *
+   * Healthcare
+   * 
+ * + * HEALTHCARE = 4; + */ + HEALTHCARE(4), + /** + * + * + *
+   * Technology
+   * 
+ * + * TECHNOLOGY = 5; + */ + TECHNOLOGY(5), + /** + * + * + *
+   * Travel
+   * 
+ * + * TRAVEL = 6; + */ + TRAVEL(6), + /** + * + * + *
+   * Other
+   * 
+ * + * OTHER = 7; + */ + OTHER(7), + /** + * + * + *
+   * Arts and entertainment
+   * 
+ * + * ARTS_AND_ENTERTAINMENT = 8; + */ + ARTS_AND_ENTERTAINMENT(8), + /** + * + * + *
+   * Beauty and fitness
+   * 
+ * + * BEAUTY_AND_FITNESS = 9; + */ + BEAUTY_AND_FITNESS(9), + /** + * + * + *
+   * Books and literature
+   * 
+ * + * BOOKS_AND_LITERATURE = 10; + */ + BOOKS_AND_LITERATURE(10), + /** + * + * + *
+   * Food and drink
+   * 
+ * + * FOOD_AND_DRINK = 11; + */ + FOOD_AND_DRINK(11), + /** + * + * + *
+   * Games
+   * 
+ * + * GAMES = 12; + */ + GAMES(12), + /** + * + * + *
+   * Hobbies and leisure
+   * 
+ * + * HOBBIES_AND_LEISURE = 13; + */ + HOBBIES_AND_LEISURE(13), + /** + * + * + *
+   * Home and garden
+   * 
+ * + * HOME_AND_GARDEN = 14; + */ + HOME_AND_GARDEN(14), + /** + * + * + *
+   * Internet and telecom
+   * 
+ * + * INTERNET_AND_TELECOM = 15; + */ + INTERNET_AND_TELECOM(15), + /** + * + * + *
+   * Law and government
+   * 
+ * + * LAW_AND_GOVERNMENT = 16; + */ + LAW_AND_GOVERNMENT(16), + /** + * + * + *
+   * News
+   * 
+ * + * NEWS = 17; + */ + NEWS(17), + /** + * + * + *
+   * Online communities
+   * 
+ * + * ONLINE_COMMUNITIES = 18; + */ + ONLINE_COMMUNITIES(18), + /** + * + * + *
+   * People and society
+   * 
+ * + * PEOPLE_AND_SOCIETY = 19; + */ + PEOPLE_AND_SOCIETY(19), + /** + * + * + *
+   * Pets and animals
+   * 
+ * + * PETS_AND_ANIMALS = 20; + */ + PETS_AND_ANIMALS(20), + /** + * + * + *
+   * Real estate
+   * 
+ * + * REAL_ESTATE = 21; + */ + REAL_ESTATE(21), + /** + * + * + *
+   * Reference
+   * 
+ * + * REFERENCE = 22; + */ + REFERENCE(22), + /** + * + * + *
+   * Science
+   * 
+ * + * SCIENCE = 23; + */ + SCIENCE(23), + /** + * + * + *
+   * Sports
+   * 
+ * + * SPORTS = 24; + */ + SPORTS(24), + /** + * + * + *
+   * Jobs and education
+   * 
+ * + * JOBS_AND_EDUCATION = 25; + */ + JOBS_AND_EDUCATION(25), + /** + * + * + *
+   * Shopping
+   * 
+ * + * SHOPPING = 26; + */ + SHOPPING(26), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Industry category unspecified
+   * 
+ * + * INDUSTRY_CATEGORY_UNSPECIFIED = 0; + */ + public static final int INDUSTRY_CATEGORY_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Automotive
+   * 
+ * + * AUTOMOTIVE = 1; + */ + public static final int AUTOMOTIVE_VALUE = 1; + /** + * + * + *
+   * Business and industrial markets
+   * 
+ * + * BUSINESS_AND_INDUSTRIAL_MARKETS = 2; + */ + public static final int BUSINESS_AND_INDUSTRIAL_MARKETS_VALUE = 2; + /** + * + * + *
+   * Finance
+   * 
+ * + * FINANCE = 3; + */ + public static final int FINANCE_VALUE = 3; + /** + * + * + *
+   * Healthcare
+   * 
+ * + * HEALTHCARE = 4; + */ + public static final int HEALTHCARE_VALUE = 4; + /** + * + * + *
+   * Technology
+   * 
+ * + * TECHNOLOGY = 5; + */ + public static final int TECHNOLOGY_VALUE = 5; + /** + * + * + *
+   * Travel
+   * 
+ * + * TRAVEL = 6; + */ + public static final int TRAVEL_VALUE = 6; + /** + * + * + *
+   * Other
+   * 
+ * + * OTHER = 7; + */ + public static final int OTHER_VALUE = 7; + /** + * + * + *
+   * Arts and entertainment
+   * 
+ * + * ARTS_AND_ENTERTAINMENT = 8; + */ + public static final int ARTS_AND_ENTERTAINMENT_VALUE = 8; + /** + * + * + *
+   * Beauty and fitness
+   * 
+ * + * BEAUTY_AND_FITNESS = 9; + */ + public static final int BEAUTY_AND_FITNESS_VALUE = 9; + /** + * + * + *
+   * Books and literature
+   * 
+ * + * BOOKS_AND_LITERATURE = 10; + */ + public static final int BOOKS_AND_LITERATURE_VALUE = 10; + /** + * + * + *
+   * Food and drink
+   * 
+ * + * FOOD_AND_DRINK = 11; + */ + public static final int FOOD_AND_DRINK_VALUE = 11; + /** + * + * + *
+   * Games
+   * 
+ * + * GAMES = 12; + */ + public static final int GAMES_VALUE = 12; + /** + * + * + *
+   * Hobbies and leisure
+   * 
+ * + * HOBBIES_AND_LEISURE = 13; + */ + public static final int HOBBIES_AND_LEISURE_VALUE = 13; + /** + * + * + *
+   * Home and garden
+   * 
+ * + * HOME_AND_GARDEN = 14; + */ + public static final int HOME_AND_GARDEN_VALUE = 14; + /** + * + * + *
+   * Internet and telecom
+   * 
+ * + * INTERNET_AND_TELECOM = 15; + */ + public static final int INTERNET_AND_TELECOM_VALUE = 15; + /** + * + * + *
+   * Law and government
+   * 
+ * + * LAW_AND_GOVERNMENT = 16; + */ + public static final int LAW_AND_GOVERNMENT_VALUE = 16; + /** + * + * + *
+   * News
+   * 
+ * + * NEWS = 17; + */ + public static final int NEWS_VALUE = 17; + /** + * + * + *
+   * Online communities
+   * 
+ * + * ONLINE_COMMUNITIES = 18; + */ + public static final int ONLINE_COMMUNITIES_VALUE = 18; + /** + * + * + *
+   * People and society
+   * 
+ * + * PEOPLE_AND_SOCIETY = 19; + */ + public static final int PEOPLE_AND_SOCIETY_VALUE = 19; + /** + * + * + *
+   * Pets and animals
+   * 
+ * + * PETS_AND_ANIMALS = 20; + */ + public static final int PETS_AND_ANIMALS_VALUE = 20; + /** + * + * + *
+   * Real estate
+   * 
+ * + * REAL_ESTATE = 21; + */ + public static final int REAL_ESTATE_VALUE = 21; + /** + * + * + *
+   * Reference
+   * 
+ * + * REFERENCE = 22; + */ + public static final int REFERENCE_VALUE = 22; + /** + * + * + *
+   * Science
+   * 
+ * + * SCIENCE = 23; + */ + public static final int SCIENCE_VALUE = 23; + /** + * + * + *
+   * Sports
+   * 
+ * + * SPORTS = 24; + */ + public static final int SPORTS_VALUE = 24; + /** + * + * + *
+   * Jobs and education
+   * 
+ * + * JOBS_AND_EDUCATION = 25; + */ + public static final int JOBS_AND_EDUCATION_VALUE = 25; + /** + * + * + *
+   * Shopping
+   * 
+ * + * SHOPPING = 26; + */ + public static final int SHOPPING_VALUE = 26; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static IndustryCategory valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static IndustryCategory forNumber(int value) { + switch (value) { + case 0: + return INDUSTRY_CATEGORY_UNSPECIFIED; + case 1: + return AUTOMOTIVE; + case 2: + return BUSINESS_AND_INDUSTRIAL_MARKETS; + case 3: + return FINANCE; + case 4: + return HEALTHCARE; + case 5: + return TECHNOLOGY; + case 6: + return TRAVEL; + case 7: + return OTHER; + case 8: + return ARTS_AND_ENTERTAINMENT; + case 9: + return BEAUTY_AND_FITNESS; + case 10: + return BOOKS_AND_LITERATURE; + case 11: + return FOOD_AND_DRINK; + case 12: + return GAMES; + case 13: + return HOBBIES_AND_LEISURE; + case 14: + return HOME_AND_GARDEN; + case 15: + return INTERNET_AND_TELECOM; + case 16: + return LAW_AND_GOVERNMENT; + case 17: + return NEWS; + case 18: + return ONLINE_COMMUNITIES; + case 19: + return PEOPLE_AND_SOCIETY; + case 20: + return PETS_AND_ANIMALS; + case 21: + return REAL_ESTATE; + case 22: + return REFERENCE; + case 23: + return SCIENCE; + case 24: + return SPORTS; + case 25: + return JOBS_AND_EDUCATION; + case 26: + return SHOPPING; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public IndustryCategory findValueByNumber(int number) { + return IndustryCategory.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.analytics.admin.v1beta.ResourcesProto.getDescriptor().getEnumTypes().get(0); + } + + private static final IndustryCategory[] VALUES = values(); + + public static IndustryCategory valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private IndustryCategory(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.analytics.admin.v1beta.IndustryCategory) +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListAccountSummariesRequest.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListAccountSummariesRequest.java new file mode 100644 index 000000000000..e12cf83f3886 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListAccountSummariesRequest.java @@ -0,0 +1,766 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * Request message for ListAccountSummaries RPC.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.ListAccountSummariesRequest} + */ +public final class ListAccountSummariesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.ListAccountSummariesRequest) + ListAccountSummariesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListAccountSummariesRequest.newBuilder() to construct. + private ListAccountSummariesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListAccountSummariesRequest() { + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListAccountSummariesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListAccountSummariesRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + pageSize_ = input.readInt32(); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListAccountSummariesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListAccountSummariesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.ListAccountSummariesRequest.class, + com.google.analytics.admin.v1beta.ListAccountSummariesRequest.Builder.class); + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 1; + private int pageSize_; + /** + * + * + *
+   * The maximum number of AccountSummary resources to return. The service may
+   * return fewer than this value, even if there are additional pages.
+   * If unspecified, at most 50 resources will be returned.
+   * The maximum value is 200; (higher values will be coerced to the maximum)
+   * 
+ * + * int32 page_size = 1; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * A page token, received from a previous `ListAccountSummaries` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListAccountSummaries`
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 2; + * + * @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; + } + } + /** + * + * + *
+   * A page token, received from a previous `ListAccountSummaries` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListAccountSummaries`
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 2; + * + * @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 (pageSize_ != 0) { + output.writeInt32(1, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, pageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, pageToken_); + } + size += unknownFields.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.admin.v1beta.ListAccountSummariesRequest)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.ListAccountSummariesRequest other = + (com.google.analytics.admin.v1beta.ListAccountSummariesRequest) obj; + + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.ListAccountSummariesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ListAccountSummariesRequest 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.admin.v1beta.ListAccountSummariesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ListAccountSummariesRequest 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.admin.v1beta.ListAccountSummariesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ListAccountSummariesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.ListAccountSummariesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ListAccountSummariesRequest 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.admin.v1beta.ListAccountSummariesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ListAccountSummariesRequest 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.admin.v1beta.ListAccountSummariesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ListAccountSummariesRequest 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.admin.v1beta.ListAccountSummariesRequest 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; + } + /** + * + * + *
+   * Request message for ListAccountSummaries RPC.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.ListAccountSummariesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.ListAccountSummariesRequest) + com.google.analytics.admin.v1beta.ListAccountSummariesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListAccountSummariesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListAccountSummariesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.ListAccountSummariesRequest.class, + com.google.analytics.admin.v1beta.ListAccountSummariesRequest.Builder.class); + } + + // Construct using com.google.analytics.admin.v1beta.ListAccountSummariesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListAccountSummariesRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ListAccountSummariesRequest + getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.ListAccountSummariesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ListAccountSummariesRequest build() { + com.google.analytics.admin.v1beta.ListAccountSummariesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ListAccountSummariesRequest buildPartial() { + com.google.analytics.admin.v1beta.ListAccountSummariesRequest result = + new com.google.analytics.admin.v1beta.ListAccountSummariesRequest(this); + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + @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.admin.v1beta.ListAccountSummariesRequest) { + return mergeFrom((com.google.analytics.admin.v1beta.ListAccountSummariesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1beta.ListAccountSummariesRequest other) { + if (other + == com.google.analytics.admin.v1beta.ListAccountSummariesRequest.getDefaultInstance()) + return this; + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.ListAccountSummariesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.ListAccountSummariesRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of AccountSummary resources to return. The service may
+     * return fewer than this value, even if there are additional pages.
+     * If unspecified, at most 50 resources will be returned.
+     * The maximum value is 200; (higher values will be coerced to the maximum)
+     * 
+ * + * int32 page_size = 1; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of AccountSummary resources to return. The service may
+     * return fewer than this value, even if there are additional pages.
+     * If unspecified, at most 50 resources will be returned.
+     * The maximum value is 200; (higher values will be coerced to the maximum)
+     * 
+ * + * int32 page_size = 1; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The maximum number of AccountSummary resources to return. The service may
+     * return fewer than this value, even if there are additional pages.
+     * If unspecified, at most 50 resources will be returned.
+     * The maximum value is 200; (higher values will be coerced to the maximum)
+     * 
+ * + * int32 page_size = 1; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A page token, received from a previous `ListAccountSummaries` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListAccountSummaries`
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 2; + * + * @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; + } + } + /** + * + * + *
+     * A page token, received from a previous `ListAccountSummaries` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListAccountSummaries`
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 2; + * + * @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; + } + } + /** + * + * + *
+     * A page token, received from a previous `ListAccountSummaries` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListAccountSummaries`
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 2; + * + * @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; + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, received from a previous `ListAccountSummaries` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListAccountSummaries`
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, received from a previous `ListAccountSummaries` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListAccountSummaries`
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 2; + * + * @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; + 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.admin.v1beta.ListAccountSummariesRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.ListAccountSummariesRequest) + private static final com.google.analytics.admin.v1beta.ListAccountSummariesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.ListAccountSummariesRequest(); + } + + public static com.google.analytics.admin.v1beta.ListAccountSummariesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAccountSummariesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListAccountSummariesRequest(input, extensionRegistry); + } + }; + + 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.admin.v1beta.ListAccountSummariesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListAccountSummariesRequestOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListAccountSummariesRequestOrBuilder.java new file mode 100644 index 000000000000..ab103473b645 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListAccountSummariesRequestOrBuilder.java @@ -0,0 +1,72 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +public interface ListAccountSummariesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.ListAccountSummariesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The maximum number of AccountSummary resources to return. The service may
+   * return fewer than this value, even if there are additional pages.
+   * If unspecified, at most 50 resources will be returned.
+   * The maximum value is 200; (higher values will be coerced to the maximum)
+   * 
+ * + * int32 page_size = 1; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A page token, received from a previous `ListAccountSummaries` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListAccountSummaries`
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 2; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A page token, received from a previous `ListAccountSummaries` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListAccountSummaries`
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 2; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListAccountSummariesResponse.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListAccountSummariesResponse.java new file mode 100644 index 000000000000..ee37b519e366 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListAccountSummariesResponse.java @@ -0,0 +1,1160 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * Response message for ListAccountSummaries RPC.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.ListAccountSummariesResponse} + */ +public final class ListAccountSummariesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.ListAccountSummariesResponse) + ListAccountSummariesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListAccountSummariesResponse.newBuilder() to construct. + private ListAccountSummariesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListAccountSummariesResponse() { + accountSummaries_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListAccountSummariesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListAccountSummariesResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + accountSummaries_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + accountSummaries_.add( + input.readMessage( + com.google.analytics.admin.v1beta.AccountSummary.parser(), + extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + accountSummaries_ = java.util.Collections.unmodifiableList(accountSummaries_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListAccountSummariesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListAccountSummariesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.ListAccountSummariesResponse.class, + com.google.analytics.admin.v1beta.ListAccountSummariesResponse.Builder.class); + } + + public static final int ACCOUNT_SUMMARIES_FIELD_NUMBER = 1; + private java.util.List accountSummaries_; + /** + * + * + *
+   * Account summaries of all accounts the caller has access to.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.AccountSummary account_summaries = 1; + */ + @java.lang.Override + public java.util.List + getAccountSummariesList() { + return accountSummaries_; + } + /** + * + * + *
+   * Account summaries of all accounts the caller has access to.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.AccountSummary account_summaries = 1; + */ + @java.lang.Override + public java.util.List + getAccountSummariesOrBuilderList() { + return accountSummaries_; + } + /** + * + * + *
+   * Account summaries of all accounts the caller has access to.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.AccountSummary account_summaries = 1; + */ + @java.lang.Override + public int getAccountSummariesCount() { + return accountSummaries_.size(); + } + /** + * + * + *
+   * Account summaries of all accounts the caller has access to.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.AccountSummary account_summaries = 1; + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.AccountSummary getAccountSummaries(int index) { + return accountSummaries_.get(index); + } + /** + * + * + *
+   * Account summaries of all accounts the caller has access to.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.AccountSummary account_summaries = 1; + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.AccountSummaryOrBuilder getAccountSummariesOrBuilder( + int index) { + return accountSummaries_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < accountSummaries_.size(); i++) { + output.writeMessage(1, accountSummaries_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < accountSummaries_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, accountSummaries_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.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.admin.v1beta.ListAccountSummariesResponse)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.ListAccountSummariesResponse other = + (com.google.analytics.admin.v1beta.ListAccountSummariesResponse) obj; + + if (!getAccountSummariesList().equals(other.getAccountSummariesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getAccountSummariesCount() > 0) { + hash = (37 * hash) + ACCOUNT_SUMMARIES_FIELD_NUMBER; + hash = (53 * hash) + getAccountSummariesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.ListAccountSummariesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ListAccountSummariesResponse 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.admin.v1beta.ListAccountSummariesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ListAccountSummariesResponse 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.admin.v1beta.ListAccountSummariesResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ListAccountSummariesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.ListAccountSummariesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ListAccountSummariesResponse 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.admin.v1beta.ListAccountSummariesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ListAccountSummariesResponse 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.admin.v1beta.ListAccountSummariesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ListAccountSummariesResponse 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.admin.v1beta.ListAccountSummariesResponse 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; + } + /** + * + * + *
+   * Response message for ListAccountSummaries RPC.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.ListAccountSummariesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.ListAccountSummariesResponse) + com.google.analytics.admin.v1beta.ListAccountSummariesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListAccountSummariesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListAccountSummariesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.ListAccountSummariesResponse.class, + com.google.analytics.admin.v1beta.ListAccountSummariesResponse.Builder.class); + } + + // Construct using com.google.analytics.admin.v1beta.ListAccountSummariesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getAccountSummariesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (accountSummariesBuilder_ == null) { + accountSummaries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + accountSummariesBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListAccountSummariesResponse_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ListAccountSummariesResponse + getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.ListAccountSummariesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ListAccountSummariesResponse build() { + com.google.analytics.admin.v1beta.ListAccountSummariesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ListAccountSummariesResponse buildPartial() { + com.google.analytics.admin.v1beta.ListAccountSummariesResponse result = + new com.google.analytics.admin.v1beta.ListAccountSummariesResponse(this); + int from_bitField0_ = bitField0_; + if (accountSummariesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + accountSummaries_ = java.util.Collections.unmodifiableList(accountSummaries_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.accountSummaries_ = accountSummaries_; + } else { + result.accountSummaries_ = accountSummariesBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @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.admin.v1beta.ListAccountSummariesResponse) { + return mergeFrom((com.google.analytics.admin.v1beta.ListAccountSummariesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1beta.ListAccountSummariesResponse other) { + if (other + == com.google.analytics.admin.v1beta.ListAccountSummariesResponse.getDefaultInstance()) + return this; + if (accountSummariesBuilder_ == null) { + if (!other.accountSummaries_.isEmpty()) { + if (accountSummaries_.isEmpty()) { + accountSummaries_ = other.accountSummaries_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAccountSummariesIsMutable(); + accountSummaries_.addAll(other.accountSummaries_); + } + onChanged(); + } + } else { + if (!other.accountSummaries_.isEmpty()) { + if (accountSummariesBuilder_.isEmpty()) { + accountSummariesBuilder_.dispose(); + accountSummariesBuilder_ = null; + accountSummaries_ = other.accountSummaries_; + bitField0_ = (bitField0_ & ~0x00000001); + accountSummariesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAccountSummariesFieldBuilder() + : null; + } else { + accountSummariesBuilder_.addAllMessages(other.accountSummaries_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.ListAccountSummariesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.ListAccountSummariesResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List accountSummaries_ = + java.util.Collections.emptyList(); + + private void ensureAccountSummariesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + accountSummaries_ = + new java.util.ArrayList( + accountSummaries_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.admin.v1beta.AccountSummary, + com.google.analytics.admin.v1beta.AccountSummary.Builder, + com.google.analytics.admin.v1beta.AccountSummaryOrBuilder> + accountSummariesBuilder_; + + /** + * + * + *
+     * Account summaries of all accounts the caller has access to.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.AccountSummary account_summaries = 1; + */ + public java.util.List + getAccountSummariesList() { + if (accountSummariesBuilder_ == null) { + return java.util.Collections.unmodifiableList(accountSummaries_); + } else { + return accountSummariesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Account summaries of all accounts the caller has access to.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.AccountSummary account_summaries = 1; + */ + public int getAccountSummariesCount() { + if (accountSummariesBuilder_ == null) { + return accountSummaries_.size(); + } else { + return accountSummariesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Account summaries of all accounts the caller has access to.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.AccountSummary account_summaries = 1; + */ + public com.google.analytics.admin.v1beta.AccountSummary getAccountSummaries(int index) { + if (accountSummariesBuilder_ == null) { + return accountSummaries_.get(index); + } else { + return accountSummariesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Account summaries of all accounts the caller has access to.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.AccountSummary account_summaries = 1; + */ + public Builder setAccountSummaries( + int index, com.google.analytics.admin.v1beta.AccountSummary value) { + if (accountSummariesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAccountSummariesIsMutable(); + accountSummaries_.set(index, value); + onChanged(); + } else { + accountSummariesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Account summaries of all accounts the caller has access to.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.AccountSummary account_summaries = 1; + */ + public Builder setAccountSummaries( + int index, com.google.analytics.admin.v1beta.AccountSummary.Builder builderForValue) { + if (accountSummariesBuilder_ == null) { + ensureAccountSummariesIsMutable(); + accountSummaries_.set(index, builderForValue.build()); + onChanged(); + } else { + accountSummariesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Account summaries of all accounts the caller has access to.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.AccountSummary account_summaries = 1; + */ + public Builder addAccountSummaries(com.google.analytics.admin.v1beta.AccountSummary value) { + if (accountSummariesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAccountSummariesIsMutable(); + accountSummaries_.add(value); + onChanged(); + } else { + accountSummariesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Account summaries of all accounts the caller has access to.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.AccountSummary account_summaries = 1; + */ + public Builder addAccountSummaries( + int index, com.google.analytics.admin.v1beta.AccountSummary value) { + if (accountSummariesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAccountSummariesIsMutable(); + accountSummaries_.add(index, value); + onChanged(); + } else { + accountSummariesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Account summaries of all accounts the caller has access to.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.AccountSummary account_summaries = 1; + */ + public Builder addAccountSummaries( + com.google.analytics.admin.v1beta.AccountSummary.Builder builderForValue) { + if (accountSummariesBuilder_ == null) { + ensureAccountSummariesIsMutable(); + accountSummaries_.add(builderForValue.build()); + onChanged(); + } else { + accountSummariesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Account summaries of all accounts the caller has access to.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.AccountSummary account_summaries = 1; + */ + public Builder addAccountSummaries( + int index, com.google.analytics.admin.v1beta.AccountSummary.Builder builderForValue) { + if (accountSummariesBuilder_ == null) { + ensureAccountSummariesIsMutable(); + accountSummaries_.add(index, builderForValue.build()); + onChanged(); + } else { + accountSummariesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Account summaries of all accounts the caller has access to.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.AccountSummary account_summaries = 1; + */ + public Builder addAllAccountSummaries( + java.lang.Iterable values) { + if (accountSummariesBuilder_ == null) { + ensureAccountSummariesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, accountSummaries_); + onChanged(); + } else { + accountSummariesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Account summaries of all accounts the caller has access to.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.AccountSummary account_summaries = 1; + */ + public Builder clearAccountSummaries() { + if (accountSummariesBuilder_ == null) { + accountSummaries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + accountSummariesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Account summaries of all accounts the caller has access to.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.AccountSummary account_summaries = 1; + */ + public Builder removeAccountSummaries(int index) { + if (accountSummariesBuilder_ == null) { + ensureAccountSummariesIsMutable(); + accountSummaries_.remove(index); + onChanged(); + } else { + accountSummariesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Account summaries of all accounts the caller has access to.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.AccountSummary account_summaries = 1; + */ + public com.google.analytics.admin.v1beta.AccountSummary.Builder getAccountSummariesBuilder( + int index) { + return getAccountSummariesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Account summaries of all accounts the caller has access to.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.AccountSummary account_summaries = 1; + */ + public com.google.analytics.admin.v1beta.AccountSummaryOrBuilder getAccountSummariesOrBuilder( + int index) { + if (accountSummariesBuilder_ == null) { + return accountSummaries_.get(index); + } else { + return accountSummariesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Account summaries of all accounts the caller has access to.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.AccountSummary account_summaries = 1; + */ + public java.util.List + getAccountSummariesOrBuilderList() { + if (accountSummariesBuilder_ != null) { + return accountSummariesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(accountSummaries_); + } + } + /** + * + * + *
+     * Account summaries of all accounts the caller has access to.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.AccountSummary account_summaries = 1; + */ + public com.google.analytics.admin.v1beta.AccountSummary.Builder addAccountSummariesBuilder() { + return getAccountSummariesFieldBuilder() + .addBuilder(com.google.analytics.admin.v1beta.AccountSummary.getDefaultInstance()); + } + /** + * + * + *
+     * Account summaries of all accounts the caller has access to.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.AccountSummary account_summaries = 1; + */ + public com.google.analytics.admin.v1beta.AccountSummary.Builder addAccountSummariesBuilder( + int index) { + return getAccountSummariesFieldBuilder() + .addBuilder(index, com.google.analytics.admin.v1beta.AccountSummary.getDefaultInstance()); + } + /** + * + * + *
+     * Account summaries of all accounts the caller has access to.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.AccountSummary account_summaries = 1; + */ + public java.util.List + getAccountSummariesBuilderList() { + return getAccountSummariesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.admin.v1beta.AccountSummary, + com.google.analytics.admin.v1beta.AccountSummary.Builder, + com.google.analytics.admin.v1beta.AccountSummaryOrBuilder> + getAccountSummariesFieldBuilder() { + if (accountSummariesBuilder_ == null) { + accountSummariesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.admin.v1beta.AccountSummary, + com.google.analytics.admin.v1beta.AccountSummary.Builder, + com.google.analytics.admin.v1beta.AccountSummaryOrBuilder>( + accountSummaries_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + accountSummaries_ = null; + } + return accountSummariesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + 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.admin.v1beta.ListAccountSummariesResponse) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.ListAccountSummariesResponse) + private static final com.google.analytics.admin.v1beta.ListAccountSummariesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.ListAccountSummariesResponse(); + } + + public static com.google.analytics.admin.v1beta.ListAccountSummariesResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAccountSummariesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListAccountSummariesResponse(input, extensionRegistry); + } + }; + + 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.admin.v1beta.ListAccountSummariesResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListAccountSummariesResponseOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListAccountSummariesResponseOrBuilder.java new file mode 100644 index 000000000000..d5f1f9b6416e --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListAccountSummariesResponseOrBuilder.java @@ -0,0 +1,104 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +public interface ListAccountSummariesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.ListAccountSummariesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Account summaries of all accounts the caller has access to.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.AccountSummary account_summaries = 1; + */ + java.util.List getAccountSummariesList(); + /** + * + * + *
+   * Account summaries of all accounts the caller has access to.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.AccountSummary account_summaries = 1; + */ + com.google.analytics.admin.v1beta.AccountSummary getAccountSummaries(int index); + /** + * + * + *
+   * Account summaries of all accounts the caller has access to.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.AccountSummary account_summaries = 1; + */ + int getAccountSummariesCount(); + /** + * + * + *
+   * Account summaries of all accounts the caller has access to.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.AccountSummary account_summaries = 1; + */ + java.util.List + getAccountSummariesOrBuilderList(); + /** + * + * + *
+   * Account summaries of all accounts the caller has access to.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.AccountSummary account_summaries = 1; + */ + com.google.analytics.admin.v1beta.AccountSummaryOrBuilder getAccountSummariesOrBuilder(int index); + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListAccountsRequest.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListAccountsRequest.java new file mode 100644 index 000000000000..e1a938bea9e3 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListAccountsRequest.java @@ -0,0 +1,860 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * Request message for ListAccounts RPC.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.ListAccountsRequest} + */ +public final class ListAccountsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.ListAccountsRequest) + ListAccountsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListAccountsRequest.newBuilder() to construct. + private ListAccountsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListAccountsRequest() { + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListAccountsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListAccountsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + pageSize_ = input.readInt32(); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 24: + { + showDeleted_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListAccountsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListAccountsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.ListAccountsRequest.class, + com.google.analytics.admin.v1beta.ListAccountsRequest.Builder.class); + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 1; + private int pageSize_; + /** + * + * + *
+   * The maximum number of resources to return. The service may return
+   * fewer than this value, even if there are additional pages.
+   * If unspecified, at most 50 resources will be returned.
+   * The maximum value is 200; (higher values will be coerced to the maximum)
+   * 
+ * + * int32 page_size = 1; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * A page token, received from a previous `ListAccounts` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListAccounts` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 2; + * + * @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; + } + } + /** + * + * + *
+   * A page token, received from a previous `ListAccounts` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListAccounts` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 2; + * + * @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; + } + } + + public static final int SHOW_DELETED_FIELD_NUMBER = 3; + private boolean showDeleted_; + /** + * + * + *
+   * Whether to include soft-deleted (ie: "trashed") Accounts in the
+   * results. Accounts can be inspected to determine whether they are deleted or
+   * not.
+   * 
+ * + * bool show_deleted = 3; + * + * @return The showDeleted. + */ + @java.lang.Override + public boolean getShowDeleted() { + return showDeleted_; + } + + 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 (pageSize_ != 0) { + output.writeInt32(1, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, pageToken_); + } + if (showDeleted_ != false) { + output.writeBool(3, showDeleted_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, pageToken_); + } + if (showDeleted_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, showDeleted_); + } + size += unknownFields.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.admin.v1beta.ListAccountsRequest)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.ListAccountsRequest other = + (com.google.analytics.admin.v1beta.ListAccountsRequest) obj; + + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (getShowDeleted() != other.getShowDeleted()) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + SHOW_DELETED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getShowDeleted()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.ListAccountsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ListAccountsRequest 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.admin.v1beta.ListAccountsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ListAccountsRequest 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.admin.v1beta.ListAccountsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ListAccountsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.ListAccountsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ListAccountsRequest 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.admin.v1beta.ListAccountsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ListAccountsRequest 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.admin.v1beta.ListAccountsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ListAccountsRequest 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.admin.v1beta.ListAccountsRequest 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; + } + /** + * + * + *
+   * Request message for ListAccounts RPC.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.ListAccountsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.ListAccountsRequest) + com.google.analytics.admin.v1beta.ListAccountsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListAccountsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListAccountsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.ListAccountsRequest.class, + com.google.analytics.admin.v1beta.ListAccountsRequest.Builder.class); + } + + // Construct using com.google.analytics.admin.v1beta.ListAccountsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + pageSize_ = 0; + + pageToken_ = ""; + + showDeleted_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListAccountsRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ListAccountsRequest getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.ListAccountsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ListAccountsRequest build() { + com.google.analytics.admin.v1beta.ListAccountsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ListAccountsRequest buildPartial() { + com.google.analytics.admin.v1beta.ListAccountsRequest result = + new com.google.analytics.admin.v1beta.ListAccountsRequest(this); + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + result.showDeleted_ = showDeleted_; + onBuilt(); + return result; + } + + @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.admin.v1beta.ListAccountsRequest) { + return mergeFrom((com.google.analytics.admin.v1beta.ListAccountsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1beta.ListAccountsRequest other) { + if (other == com.google.analytics.admin.v1beta.ListAccountsRequest.getDefaultInstance()) + return this; + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (other.getShowDeleted() != false) { + setShowDeleted(other.getShowDeleted()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.ListAccountsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.ListAccountsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of resources to return. The service may return
+     * fewer than this value, even if there are additional pages.
+     * If unspecified, at most 50 resources will be returned.
+     * The maximum value is 200; (higher values will be coerced to the maximum)
+     * 
+ * + * int32 page_size = 1; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of resources to return. The service may return
+     * fewer than this value, even if there are additional pages.
+     * If unspecified, at most 50 resources will be returned.
+     * The maximum value is 200; (higher values will be coerced to the maximum)
+     * 
+ * + * int32 page_size = 1; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The maximum number of resources to return. The service may return
+     * fewer than this value, even if there are additional pages.
+     * If unspecified, at most 50 resources will be returned.
+     * The maximum value is 200; (higher values will be coerced to the maximum)
+     * 
+ * + * int32 page_size = 1; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A page token, received from a previous `ListAccounts` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListAccounts` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 2; + * + * @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; + } + } + /** + * + * + *
+     * A page token, received from a previous `ListAccounts` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListAccounts` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 2; + * + * @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; + } + } + /** + * + * + *
+     * A page token, received from a previous `ListAccounts` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListAccounts` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 2; + * + * @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; + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, received from a previous `ListAccounts` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListAccounts` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, received from a previous `ListAccounts` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListAccounts` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 2; + * + * @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; + onChanged(); + return this; + } + + private boolean showDeleted_; + /** + * + * + *
+     * Whether to include soft-deleted (ie: "trashed") Accounts in the
+     * results. Accounts can be inspected to determine whether they are deleted or
+     * not.
+     * 
+ * + * bool show_deleted = 3; + * + * @return The showDeleted. + */ + @java.lang.Override + public boolean getShowDeleted() { + return showDeleted_; + } + /** + * + * + *
+     * Whether to include soft-deleted (ie: "trashed") Accounts in the
+     * results. Accounts can be inspected to determine whether they are deleted or
+     * not.
+     * 
+ * + * bool show_deleted = 3; + * + * @param value The showDeleted to set. + * @return This builder for chaining. + */ + public Builder setShowDeleted(boolean value) { + + showDeleted_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether to include soft-deleted (ie: "trashed") Accounts in the
+     * results. Accounts can be inspected to determine whether they are deleted or
+     * not.
+     * 
+ * + * bool show_deleted = 3; + * + * @return This builder for chaining. + */ + public Builder clearShowDeleted() { + + showDeleted_ = false; + 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.admin.v1beta.ListAccountsRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.ListAccountsRequest) + private static final com.google.analytics.admin.v1beta.ListAccountsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.ListAccountsRequest(); + } + + public static com.google.analytics.admin.v1beta.ListAccountsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAccountsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListAccountsRequest(input, extensionRegistry); + } + }; + + 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.admin.v1beta.ListAccountsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListAccountsRequestOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListAccountsRequestOrBuilder.java new file mode 100644 index 000000000000..5e8c093c15f4 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListAccountsRequestOrBuilder.java @@ -0,0 +1,87 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +public interface ListAccountsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.ListAccountsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The maximum number of resources to return. The service may return
+   * fewer than this value, even if there are additional pages.
+   * If unspecified, at most 50 resources will be returned.
+   * The maximum value is 200; (higher values will be coerced to the maximum)
+   * 
+ * + * int32 page_size = 1; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A page token, received from a previous `ListAccounts` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListAccounts` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 2; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A page token, received from a previous `ListAccounts` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListAccounts` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 2; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Whether to include soft-deleted (ie: "trashed") Accounts in the
+   * results. Accounts can be inspected to determine whether they are deleted or
+   * not.
+   * 
+ * + * bool show_deleted = 3; + * + * @return The showDeleted. + */ + boolean getShowDeleted(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListAccountsResponse.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListAccountsResponse.java new file mode 100644 index 000000000000..4c09b06d6f74 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListAccountsResponse.java @@ -0,0 +1,1138 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * Request message for ListAccounts RPC.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.ListAccountsResponse} + */ +public final class ListAccountsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.ListAccountsResponse) + ListAccountsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListAccountsResponse.newBuilder() to construct. + private ListAccountsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListAccountsResponse() { + accounts_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListAccountsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListAccountsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + accounts_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + accounts_.add( + input.readMessage( + com.google.analytics.admin.v1beta.Account.parser(), extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + accounts_ = java.util.Collections.unmodifiableList(accounts_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListAccountsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListAccountsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.ListAccountsResponse.class, + com.google.analytics.admin.v1beta.ListAccountsResponse.Builder.class); + } + + public static final int ACCOUNTS_FIELD_NUMBER = 1; + private java.util.List accounts_; + /** + * + * + *
+   * Results that were accessible to the caller.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.Account accounts = 1; + */ + @java.lang.Override + public java.util.List getAccountsList() { + return accounts_; + } + /** + * + * + *
+   * Results that were accessible to the caller.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.Account accounts = 1; + */ + @java.lang.Override + public java.util.List + getAccountsOrBuilderList() { + return accounts_; + } + /** + * + * + *
+   * Results that were accessible to the caller.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.Account accounts = 1; + */ + @java.lang.Override + public int getAccountsCount() { + return accounts_.size(); + } + /** + * + * + *
+   * Results that were accessible to the caller.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.Account accounts = 1; + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.Account getAccounts(int index) { + return accounts_.get(index); + } + /** + * + * + *
+   * Results that were accessible to the caller.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.Account accounts = 1; + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.AccountOrBuilder getAccountsOrBuilder(int index) { + return accounts_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < accounts_.size(); i++) { + output.writeMessage(1, accounts_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < accounts_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, accounts_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.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.admin.v1beta.ListAccountsResponse)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.ListAccountsResponse other = + (com.google.analytics.admin.v1beta.ListAccountsResponse) obj; + + if (!getAccountsList().equals(other.getAccountsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getAccountsCount() > 0) { + hash = (37 * hash) + ACCOUNTS_FIELD_NUMBER; + hash = (53 * hash) + getAccountsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.ListAccountsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ListAccountsResponse 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.admin.v1beta.ListAccountsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ListAccountsResponse 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.admin.v1beta.ListAccountsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ListAccountsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.ListAccountsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ListAccountsResponse 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.admin.v1beta.ListAccountsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ListAccountsResponse 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.admin.v1beta.ListAccountsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ListAccountsResponse 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.admin.v1beta.ListAccountsResponse 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; + } + /** + * + * + *
+   * Request message for ListAccounts RPC.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.ListAccountsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.ListAccountsResponse) + com.google.analytics.admin.v1beta.ListAccountsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListAccountsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListAccountsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.ListAccountsResponse.class, + com.google.analytics.admin.v1beta.ListAccountsResponse.Builder.class); + } + + // Construct using com.google.analytics.admin.v1beta.ListAccountsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getAccountsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (accountsBuilder_ == null) { + accounts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + accountsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListAccountsResponse_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ListAccountsResponse getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.ListAccountsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ListAccountsResponse build() { + com.google.analytics.admin.v1beta.ListAccountsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ListAccountsResponse buildPartial() { + com.google.analytics.admin.v1beta.ListAccountsResponse result = + new com.google.analytics.admin.v1beta.ListAccountsResponse(this); + int from_bitField0_ = bitField0_; + if (accountsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + accounts_ = java.util.Collections.unmodifiableList(accounts_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.accounts_ = accounts_; + } else { + result.accounts_ = accountsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @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.admin.v1beta.ListAccountsResponse) { + return mergeFrom((com.google.analytics.admin.v1beta.ListAccountsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1beta.ListAccountsResponse other) { + if (other == com.google.analytics.admin.v1beta.ListAccountsResponse.getDefaultInstance()) + return this; + if (accountsBuilder_ == null) { + if (!other.accounts_.isEmpty()) { + if (accounts_.isEmpty()) { + accounts_ = other.accounts_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAccountsIsMutable(); + accounts_.addAll(other.accounts_); + } + onChanged(); + } + } else { + if (!other.accounts_.isEmpty()) { + if (accountsBuilder_.isEmpty()) { + accountsBuilder_.dispose(); + accountsBuilder_ = null; + accounts_ = other.accounts_; + bitField0_ = (bitField0_ & ~0x00000001); + accountsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAccountsFieldBuilder() + : null; + } else { + accountsBuilder_.addAllMessages(other.accounts_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.ListAccountsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.ListAccountsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List accounts_ = + java.util.Collections.emptyList(); + + private void ensureAccountsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + accounts_ = new java.util.ArrayList(accounts_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.admin.v1beta.Account, + com.google.analytics.admin.v1beta.Account.Builder, + com.google.analytics.admin.v1beta.AccountOrBuilder> + accountsBuilder_; + + /** + * + * + *
+     * Results that were accessible to the caller.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.Account accounts = 1; + */ + public java.util.List getAccountsList() { + if (accountsBuilder_ == null) { + return java.util.Collections.unmodifiableList(accounts_); + } else { + return accountsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Results that were accessible to the caller.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.Account accounts = 1; + */ + public int getAccountsCount() { + if (accountsBuilder_ == null) { + return accounts_.size(); + } else { + return accountsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Results that were accessible to the caller.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.Account accounts = 1; + */ + public com.google.analytics.admin.v1beta.Account getAccounts(int index) { + if (accountsBuilder_ == null) { + return accounts_.get(index); + } else { + return accountsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Results that were accessible to the caller.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.Account accounts = 1; + */ + public Builder setAccounts(int index, com.google.analytics.admin.v1beta.Account value) { + if (accountsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAccountsIsMutable(); + accounts_.set(index, value); + onChanged(); + } else { + accountsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Results that were accessible to the caller.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.Account accounts = 1; + */ + public Builder setAccounts( + int index, com.google.analytics.admin.v1beta.Account.Builder builderForValue) { + if (accountsBuilder_ == null) { + ensureAccountsIsMutable(); + accounts_.set(index, builderForValue.build()); + onChanged(); + } else { + accountsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Results that were accessible to the caller.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.Account accounts = 1; + */ + public Builder addAccounts(com.google.analytics.admin.v1beta.Account value) { + if (accountsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAccountsIsMutable(); + accounts_.add(value); + onChanged(); + } else { + accountsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Results that were accessible to the caller.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.Account accounts = 1; + */ + public Builder addAccounts(int index, com.google.analytics.admin.v1beta.Account value) { + if (accountsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAccountsIsMutable(); + accounts_.add(index, value); + onChanged(); + } else { + accountsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Results that were accessible to the caller.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.Account accounts = 1; + */ + public Builder addAccounts(com.google.analytics.admin.v1beta.Account.Builder builderForValue) { + if (accountsBuilder_ == null) { + ensureAccountsIsMutable(); + accounts_.add(builderForValue.build()); + onChanged(); + } else { + accountsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Results that were accessible to the caller.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.Account accounts = 1; + */ + public Builder addAccounts( + int index, com.google.analytics.admin.v1beta.Account.Builder builderForValue) { + if (accountsBuilder_ == null) { + ensureAccountsIsMutable(); + accounts_.add(index, builderForValue.build()); + onChanged(); + } else { + accountsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Results that were accessible to the caller.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.Account accounts = 1; + */ + public Builder addAllAccounts( + java.lang.Iterable values) { + if (accountsBuilder_ == null) { + ensureAccountsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, accounts_); + onChanged(); + } else { + accountsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Results that were accessible to the caller.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.Account accounts = 1; + */ + public Builder clearAccounts() { + if (accountsBuilder_ == null) { + accounts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + accountsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Results that were accessible to the caller.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.Account accounts = 1; + */ + public Builder removeAccounts(int index) { + if (accountsBuilder_ == null) { + ensureAccountsIsMutable(); + accounts_.remove(index); + onChanged(); + } else { + accountsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Results that were accessible to the caller.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.Account accounts = 1; + */ + public com.google.analytics.admin.v1beta.Account.Builder getAccountsBuilder(int index) { + return getAccountsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Results that were accessible to the caller.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.Account accounts = 1; + */ + public com.google.analytics.admin.v1beta.AccountOrBuilder getAccountsOrBuilder(int index) { + if (accountsBuilder_ == null) { + return accounts_.get(index); + } else { + return accountsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Results that were accessible to the caller.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.Account accounts = 1; + */ + public java.util.List + getAccountsOrBuilderList() { + if (accountsBuilder_ != null) { + return accountsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(accounts_); + } + } + /** + * + * + *
+     * Results that were accessible to the caller.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.Account accounts = 1; + */ + public com.google.analytics.admin.v1beta.Account.Builder addAccountsBuilder() { + return getAccountsFieldBuilder() + .addBuilder(com.google.analytics.admin.v1beta.Account.getDefaultInstance()); + } + /** + * + * + *
+     * Results that were accessible to the caller.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.Account accounts = 1; + */ + public com.google.analytics.admin.v1beta.Account.Builder addAccountsBuilder(int index) { + return getAccountsFieldBuilder() + .addBuilder(index, com.google.analytics.admin.v1beta.Account.getDefaultInstance()); + } + /** + * + * + *
+     * Results that were accessible to the caller.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.Account accounts = 1; + */ + public java.util.List + getAccountsBuilderList() { + return getAccountsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.admin.v1beta.Account, + com.google.analytics.admin.v1beta.Account.Builder, + com.google.analytics.admin.v1beta.AccountOrBuilder> + getAccountsFieldBuilder() { + if (accountsBuilder_ == null) { + accountsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.admin.v1beta.Account, + com.google.analytics.admin.v1beta.Account.Builder, + com.google.analytics.admin.v1beta.AccountOrBuilder>( + accounts_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + accounts_ = null; + } + return accountsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + 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.admin.v1beta.ListAccountsResponse) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.ListAccountsResponse) + private static final com.google.analytics.admin.v1beta.ListAccountsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.ListAccountsResponse(); + } + + public static com.google.analytics.admin.v1beta.ListAccountsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAccountsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListAccountsResponse(input, extensionRegistry); + } + }; + + 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.admin.v1beta.ListAccountsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListAccountsResponseOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListAccountsResponseOrBuilder.java new file mode 100644 index 000000000000..dcfa3cf7002f --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListAccountsResponseOrBuilder.java @@ -0,0 +1,104 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +public interface ListAccountsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.ListAccountsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Results that were accessible to the caller.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.Account accounts = 1; + */ + java.util.List getAccountsList(); + /** + * + * + *
+   * Results that were accessible to the caller.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.Account accounts = 1; + */ + com.google.analytics.admin.v1beta.Account getAccounts(int index); + /** + * + * + *
+   * Results that were accessible to the caller.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.Account accounts = 1; + */ + int getAccountsCount(); + /** + * + * + *
+   * Results that were accessible to the caller.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.Account accounts = 1; + */ + java.util.List + getAccountsOrBuilderList(); + /** + * + * + *
+   * Results that were accessible to the caller.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.Account accounts = 1; + */ + com.google.analytics.admin.v1beta.AccountOrBuilder getAccountsOrBuilder(int index); + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListConversionEventsRequest.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListConversionEventsRequest.java new file mode 100644 index 000000000000..4d414d636447 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListConversionEventsRequest.java @@ -0,0 +1,962 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * Request message for ListConversionEvents RPC
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.ListConversionEventsRequest} + */ +public final class ListConversionEventsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.ListConversionEventsRequest) + ListConversionEventsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListConversionEventsRequest.newBuilder() to construct. + private ListConversionEventsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListConversionEventsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListConversionEventsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListConversionEventsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 16: + { + pageSize_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListConversionEventsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListConversionEventsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.ListConversionEventsRequest.class, + com.google.analytics.admin.v1beta.ListConversionEventsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The resource name of the parent property.
+   * Example: 'properties/123'
+   * 
+ * + * + * 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 resource name of the parent property.
+   * Example: 'properties/123'
+   * 
+ * + * + * 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_; + /** + * + * + *
+   * The maximum number of resources to return.
+   * If unspecified, at most 50 resources will be returned.
+   * The maximum value is 200; (higher values will be coerced to the maximum)
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * A page token, received from a previous `ListConversionEvents` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListConversionEvents`
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @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; + } + } + /** + * + * + *
+   * A page token, received from a previous `ListConversionEvents` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListConversionEvents`
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @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_); + } + unknownFields.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 += unknownFields.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.admin.v1beta.ListConversionEventsRequest)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.ListConversionEventsRequest other = + (com.google.analytics.admin.v1beta.ListConversionEventsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.ListConversionEventsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ListConversionEventsRequest 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.admin.v1beta.ListConversionEventsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ListConversionEventsRequest 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.admin.v1beta.ListConversionEventsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ListConversionEventsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.ListConversionEventsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ListConversionEventsRequest 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.admin.v1beta.ListConversionEventsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ListConversionEventsRequest 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.admin.v1beta.ListConversionEventsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ListConversionEventsRequest 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.admin.v1beta.ListConversionEventsRequest 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; + } + /** + * + * + *
+   * Request message for ListConversionEvents RPC
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.ListConversionEventsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.ListConversionEventsRequest) + com.google.analytics.admin.v1beta.ListConversionEventsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListConversionEventsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListConversionEventsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.ListConversionEventsRequest.class, + com.google.analytics.admin.v1beta.ListConversionEventsRequest.Builder.class); + } + + // Construct using com.google.analytics.admin.v1beta.ListConversionEventsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListConversionEventsRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ListConversionEventsRequest + getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.ListConversionEventsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ListConversionEventsRequest build() { + com.google.analytics.admin.v1beta.ListConversionEventsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ListConversionEventsRequest buildPartial() { + com.google.analytics.admin.v1beta.ListConversionEventsRequest result = + new com.google.analytics.admin.v1beta.ListConversionEventsRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + @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.admin.v1beta.ListConversionEventsRequest) { + return mergeFrom((com.google.analytics.admin.v1beta.ListConversionEventsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1beta.ListConversionEventsRequest other) { + if (other + == com.google.analytics.admin.v1beta.ListConversionEventsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.ListConversionEventsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.ListConversionEventsRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the parent property.
+     * Example: 'properties/123'
+     * 
+ * + * + * 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 resource name of the parent property.
+     * Example: 'properties/123'
+     * 
+ * + * + * 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 resource name of the parent property.
+     * Example: 'properties/123'
+     * 
+ * + * + * 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; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the parent property.
+     * Example: 'properties/123'
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the parent property.
+     * Example: 'properties/123'
+     * 
+ * + * + * 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; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of resources to return.
+     * If unspecified, at most 50 resources will be returned.
+     * The maximum value is 200; (higher values will be coerced to the maximum)
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of resources to return.
+     * If unspecified, at most 50 resources will be returned.
+     * The maximum value is 200; (higher values will be coerced to the maximum)
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The maximum number of resources to return.
+     * If unspecified, at most 50 resources will be returned.
+     * The maximum value is 200; (higher values will be coerced to the maximum)
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A page token, received from a previous `ListConversionEvents` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListConversionEvents`
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @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; + } + } + /** + * + * + *
+     * A page token, received from a previous `ListConversionEvents` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListConversionEvents`
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @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; + } + } + /** + * + * + *
+     * A page token, received from a previous `ListConversionEvents` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListConversionEvents`
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @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; + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, received from a previous `ListConversionEvents` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListConversionEvents`
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, received from a previous `ListConversionEvents` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListConversionEvents`
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @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; + 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.admin.v1beta.ListConversionEventsRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.ListConversionEventsRequest) + private static final com.google.analytics.admin.v1beta.ListConversionEventsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.ListConversionEventsRequest(); + } + + public static com.google.analytics.admin.v1beta.ListConversionEventsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListConversionEventsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListConversionEventsRequest(input, extensionRegistry); + } + }; + + 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.admin.v1beta.ListConversionEventsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListConversionEventsRequestOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListConversionEventsRequestOrBuilder.java new file mode 100644 index 000000000000..3a4645c33869 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListConversionEventsRequestOrBuilder.java @@ -0,0 +1,102 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +public interface ListConversionEventsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.ListConversionEventsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the parent property.
+   * Example: 'properties/123'
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the parent property.
+   * Example: 'properties/123'
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The maximum number of resources to return.
+   * If unspecified, at most 50 resources will be returned.
+   * The maximum value is 200; (higher values will be coerced to the maximum)
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A page token, received from a previous `ListConversionEvents` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListConversionEvents`
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A page token, received from a previous `ListConversionEvents` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListConversionEvents`
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListConversionEventsResponse.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListConversionEventsResponse.java new file mode 100644 index 000000000000..b87f4ca8b15f --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListConversionEventsResponse.java @@ -0,0 +1,1161 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * Response message for ListConversionEvents RPC.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.ListConversionEventsResponse} + */ +public final class ListConversionEventsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.ListConversionEventsResponse) + ListConversionEventsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListConversionEventsResponse.newBuilder() to construct. + private ListConversionEventsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListConversionEventsResponse() { + conversionEvents_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListConversionEventsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListConversionEventsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + conversionEvents_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + conversionEvents_.add( + input.readMessage( + com.google.analytics.admin.v1beta.ConversionEvent.parser(), + extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + conversionEvents_ = java.util.Collections.unmodifiableList(conversionEvents_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListConversionEventsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListConversionEventsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.ListConversionEventsResponse.class, + com.google.analytics.admin.v1beta.ListConversionEventsResponse.Builder.class); + } + + public static final int CONVERSION_EVENTS_FIELD_NUMBER = 1; + private java.util.List conversionEvents_; + /** + * + * + *
+   * The requested conversion events
+   * 
+ * + * repeated .google.analytics.admin.v1beta.ConversionEvent conversion_events = 1; + */ + @java.lang.Override + public java.util.List + getConversionEventsList() { + return conversionEvents_; + } + /** + * + * + *
+   * The requested conversion events
+   * 
+ * + * repeated .google.analytics.admin.v1beta.ConversionEvent conversion_events = 1; + */ + @java.lang.Override + public java.util.List + getConversionEventsOrBuilderList() { + return conversionEvents_; + } + /** + * + * + *
+   * The requested conversion events
+   * 
+ * + * repeated .google.analytics.admin.v1beta.ConversionEvent conversion_events = 1; + */ + @java.lang.Override + public int getConversionEventsCount() { + return conversionEvents_.size(); + } + /** + * + * + *
+   * The requested conversion events
+   * 
+ * + * repeated .google.analytics.admin.v1beta.ConversionEvent conversion_events = 1; + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.ConversionEvent getConversionEvents(int index) { + return conversionEvents_.get(index); + } + /** + * + * + *
+   * The requested conversion events
+   * 
+ * + * repeated .google.analytics.admin.v1beta.ConversionEvent conversion_events = 1; + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.ConversionEventOrBuilder getConversionEventsOrBuilder( + int index) { + return conversionEvents_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < conversionEvents_.size(); i++) { + output.writeMessage(1, conversionEvents_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < conversionEvents_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, conversionEvents_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.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.admin.v1beta.ListConversionEventsResponse)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.ListConversionEventsResponse other = + (com.google.analytics.admin.v1beta.ListConversionEventsResponse) obj; + + if (!getConversionEventsList().equals(other.getConversionEventsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getConversionEventsCount() > 0) { + hash = (37 * hash) + CONVERSION_EVENTS_FIELD_NUMBER; + hash = (53 * hash) + getConversionEventsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.ListConversionEventsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ListConversionEventsResponse 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.admin.v1beta.ListConversionEventsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ListConversionEventsResponse 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.admin.v1beta.ListConversionEventsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ListConversionEventsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.ListConversionEventsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ListConversionEventsResponse 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.admin.v1beta.ListConversionEventsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ListConversionEventsResponse 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.admin.v1beta.ListConversionEventsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ListConversionEventsResponse 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.admin.v1beta.ListConversionEventsResponse 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; + } + /** + * + * + *
+   * Response message for ListConversionEvents RPC.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.ListConversionEventsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.ListConversionEventsResponse) + com.google.analytics.admin.v1beta.ListConversionEventsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListConversionEventsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListConversionEventsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.ListConversionEventsResponse.class, + com.google.analytics.admin.v1beta.ListConversionEventsResponse.Builder.class); + } + + // Construct using com.google.analytics.admin.v1beta.ListConversionEventsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getConversionEventsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (conversionEventsBuilder_ == null) { + conversionEvents_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + conversionEventsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListConversionEventsResponse_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ListConversionEventsResponse + getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.ListConversionEventsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ListConversionEventsResponse build() { + com.google.analytics.admin.v1beta.ListConversionEventsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ListConversionEventsResponse buildPartial() { + com.google.analytics.admin.v1beta.ListConversionEventsResponse result = + new com.google.analytics.admin.v1beta.ListConversionEventsResponse(this); + int from_bitField0_ = bitField0_; + if (conversionEventsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + conversionEvents_ = java.util.Collections.unmodifiableList(conversionEvents_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.conversionEvents_ = conversionEvents_; + } else { + result.conversionEvents_ = conversionEventsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @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.admin.v1beta.ListConversionEventsResponse) { + return mergeFrom((com.google.analytics.admin.v1beta.ListConversionEventsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1beta.ListConversionEventsResponse other) { + if (other + == com.google.analytics.admin.v1beta.ListConversionEventsResponse.getDefaultInstance()) + return this; + if (conversionEventsBuilder_ == null) { + if (!other.conversionEvents_.isEmpty()) { + if (conversionEvents_.isEmpty()) { + conversionEvents_ = other.conversionEvents_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureConversionEventsIsMutable(); + conversionEvents_.addAll(other.conversionEvents_); + } + onChanged(); + } + } else { + if (!other.conversionEvents_.isEmpty()) { + if (conversionEventsBuilder_.isEmpty()) { + conversionEventsBuilder_.dispose(); + conversionEventsBuilder_ = null; + conversionEvents_ = other.conversionEvents_; + bitField0_ = (bitField0_ & ~0x00000001); + conversionEventsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getConversionEventsFieldBuilder() + : null; + } else { + conversionEventsBuilder_.addAllMessages(other.conversionEvents_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.ListConversionEventsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.ListConversionEventsResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List conversionEvents_ = + java.util.Collections.emptyList(); + + private void ensureConversionEventsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + conversionEvents_ = + new java.util.ArrayList( + conversionEvents_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.admin.v1beta.ConversionEvent, + com.google.analytics.admin.v1beta.ConversionEvent.Builder, + com.google.analytics.admin.v1beta.ConversionEventOrBuilder> + conversionEventsBuilder_; + + /** + * + * + *
+     * The requested conversion events
+     * 
+ * + * repeated .google.analytics.admin.v1beta.ConversionEvent conversion_events = 1; + */ + public java.util.List + getConversionEventsList() { + if (conversionEventsBuilder_ == null) { + return java.util.Collections.unmodifiableList(conversionEvents_); + } else { + return conversionEventsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The requested conversion events
+     * 
+ * + * repeated .google.analytics.admin.v1beta.ConversionEvent conversion_events = 1; + */ + public int getConversionEventsCount() { + if (conversionEventsBuilder_ == null) { + return conversionEvents_.size(); + } else { + return conversionEventsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The requested conversion events
+     * 
+ * + * repeated .google.analytics.admin.v1beta.ConversionEvent conversion_events = 1; + */ + public com.google.analytics.admin.v1beta.ConversionEvent getConversionEvents(int index) { + if (conversionEventsBuilder_ == null) { + return conversionEvents_.get(index); + } else { + return conversionEventsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The requested conversion events
+     * 
+ * + * repeated .google.analytics.admin.v1beta.ConversionEvent conversion_events = 1; + */ + public Builder setConversionEvents( + int index, com.google.analytics.admin.v1beta.ConversionEvent value) { + if (conversionEventsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConversionEventsIsMutable(); + conversionEvents_.set(index, value); + onChanged(); + } else { + conversionEventsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The requested conversion events
+     * 
+ * + * repeated .google.analytics.admin.v1beta.ConversionEvent conversion_events = 1; + */ + public Builder setConversionEvents( + int index, com.google.analytics.admin.v1beta.ConversionEvent.Builder builderForValue) { + if (conversionEventsBuilder_ == null) { + ensureConversionEventsIsMutable(); + conversionEvents_.set(index, builderForValue.build()); + onChanged(); + } else { + conversionEventsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The requested conversion events
+     * 
+ * + * repeated .google.analytics.admin.v1beta.ConversionEvent conversion_events = 1; + */ + public Builder addConversionEvents(com.google.analytics.admin.v1beta.ConversionEvent value) { + if (conversionEventsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConversionEventsIsMutable(); + conversionEvents_.add(value); + onChanged(); + } else { + conversionEventsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The requested conversion events
+     * 
+ * + * repeated .google.analytics.admin.v1beta.ConversionEvent conversion_events = 1; + */ + public Builder addConversionEvents( + int index, com.google.analytics.admin.v1beta.ConversionEvent value) { + if (conversionEventsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConversionEventsIsMutable(); + conversionEvents_.add(index, value); + onChanged(); + } else { + conversionEventsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The requested conversion events
+     * 
+ * + * repeated .google.analytics.admin.v1beta.ConversionEvent conversion_events = 1; + */ + public Builder addConversionEvents( + com.google.analytics.admin.v1beta.ConversionEvent.Builder builderForValue) { + if (conversionEventsBuilder_ == null) { + ensureConversionEventsIsMutable(); + conversionEvents_.add(builderForValue.build()); + onChanged(); + } else { + conversionEventsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The requested conversion events
+     * 
+ * + * repeated .google.analytics.admin.v1beta.ConversionEvent conversion_events = 1; + */ + public Builder addConversionEvents( + int index, com.google.analytics.admin.v1beta.ConversionEvent.Builder builderForValue) { + if (conversionEventsBuilder_ == null) { + ensureConversionEventsIsMutable(); + conversionEvents_.add(index, builderForValue.build()); + onChanged(); + } else { + conversionEventsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The requested conversion events
+     * 
+ * + * repeated .google.analytics.admin.v1beta.ConversionEvent conversion_events = 1; + */ + public Builder addAllConversionEvents( + java.lang.Iterable values) { + if (conversionEventsBuilder_ == null) { + ensureConversionEventsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, conversionEvents_); + onChanged(); + } else { + conversionEventsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The requested conversion events
+     * 
+ * + * repeated .google.analytics.admin.v1beta.ConversionEvent conversion_events = 1; + */ + public Builder clearConversionEvents() { + if (conversionEventsBuilder_ == null) { + conversionEvents_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + conversionEventsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The requested conversion events
+     * 
+ * + * repeated .google.analytics.admin.v1beta.ConversionEvent conversion_events = 1; + */ + public Builder removeConversionEvents(int index) { + if (conversionEventsBuilder_ == null) { + ensureConversionEventsIsMutable(); + conversionEvents_.remove(index); + onChanged(); + } else { + conversionEventsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The requested conversion events
+     * 
+ * + * repeated .google.analytics.admin.v1beta.ConversionEvent conversion_events = 1; + */ + public com.google.analytics.admin.v1beta.ConversionEvent.Builder getConversionEventsBuilder( + int index) { + return getConversionEventsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The requested conversion events
+     * 
+ * + * repeated .google.analytics.admin.v1beta.ConversionEvent conversion_events = 1; + */ + public com.google.analytics.admin.v1beta.ConversionEventOrBuilder getConversionEventsOrBuilder( + int index) { + if (conversionEventsBuilder_ == null) { + return conversionEvents_.get(index); + } else { + return conversionEventsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The requested conversion events
+     * 
+ * + * repeated .google.analytics.admin.v1beta.ConversionEvent conversion_events = 1; + */ + public java.util.List + getConversionEventsOrBuilderList() { + if (conversionEventsBuilder_ != null) { + return conversionEventsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(conversionEvents_); + } + } + /** + * + * + *
+     * The requested conversion events
+     * 
+ * + * repeated .google.analytics.admin.v1beta.ConversionEvent conversion_events = 1; + */ + public com.google.analytics.admin.v1beta.ConversionEvent.Builder addConversionEventsBuilder() { + return getConversionEventsFieldBuilder() + .addBuilder(com.google.analytics.admin.v1beta.ConversionEvent.getDefaultInstance()); + } + /** + * + * + *
+     * The requested conversion events
+     * 
+ * + * repeated .google.analytics.admin.v1beta.ConversionEvent conversion_events = 1; + */ + public com.google.analytics.admin.v1beta.ConversionEvent.Builder addConversionEventsBuilder( + int index) { + return getConversionEventsFieldBuilder() + .addBuilder( + index, com.google.analytics.admin.v1beta.ConversionEvent.getDefaultInstance()); + } + /** + * + * + *
+     * The requested conversion events
+     * 
+ * + * repeated .google.analytics.admin.v1beta.ConversionEvent conversion_events = 1; + */ + public java.util.List + getConversionEventsBuilderList() { + return getConversionEventsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.admin.v1beta.ConversionEvent, + com.google.analytics.admin.v1beta.ConversionEvent.Builder, + com.google.analytics.admin.v1beta.ConversionEventOrBuilder> + getConversionEventsFieldBuilder() { + if (conversionEventsBuilder_ == null) { + conversionEventsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.admin.v1beta.ConversionEvent, + com.google.analytics.admin.v1beta.ConversionEvent.Builder, + com.google.analytics.admin.v1beta.ConversionEventOrBuilder>( + conversionEvents_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + conversionEvents_ = null; + } + return conversionEventsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + 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.admin.v1beta.ListConversionEventsResponse) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.ListConversionEventsResponse) + private static final com.google.analytics.admin.v1beta.ListConversionEventsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.ListConversionEventsResponse(); + } + + public static com.google.analytics.admin.v1beta.ListConversionEventsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListConversionEventsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListConversionEventsResponse(input, extensionRegistry); + } + }; + + 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.admin.v1beta.ListConversionEventsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListConversionEventsResponseOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListConversionEventsResponseOrBuilder.java new file mode 100644 index 000000000000..a12e3dd8684d --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListConversionEventsResponseOrBuilder.java @@ -0,0 +1,105 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +public interface ListConversionEventsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.ListConversionEventsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The requested conversion events
+   * 
+ * + * repeated .google.analytics.admin.v1beta.ConversionEvent conversion_events = 1; + */ + java.util.List getConversionEventsList(); + /** + * + * + *
+   * The requested conversion events
+   * 
+ * + * repeated .google.analytics.admin.v1beta.ConversionEvent conversion_events = 1; + */ + com.google.analytics.admin.v1beta.ConversionEvent getConversionEvents(int index); + /** + * + * + *
+   * The requested conversion events
+   * 
+ * + * repeated .google.analytics.admin.v1beta.ConversionEvent conversion_events = 1; + */ + int getConversionEventsCount(); + /** + * + * + *
+   * The requested conversion events
+   * 
+ * + * repeated .google.analytics.admin.v1beta.ConversionEvent conversion_events = 1; + */ + java.util.List + getConversionEventsOrBuilderList(); + /** + * + * + *
+   * The requested conversion events
+   * 
+ * + * repeated .google.analytics.admin.v1beta.ConversionEvent conversion_events = 1; + */ + com.google.analytics.admin.v1beta.ConversionEventOrBuilder getConversionEventsOrBuilder( + int index); + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListCustomDimensionsRequest.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListCustomDimensionsRequest.java new file mode 100644 index 000000000000..b993f51fd617 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListCustomDimensionsRequest.java @@ -0,0 +1,955 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * Request message for ListCustomDimensions RPC.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.ListCustomDimensionsRequest} + */ +public final class ListCustomDimensionsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.ListCustomDimensionsRequest) + ListCustomDimensionsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListCustomDimensionsRequest.newBuilder() to construct. + private ListCustomDimensionsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListCustomDimensionsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListCustomDimensionsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListCustomDimensionsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 16: + { + pageSize_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListCustomDimensionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListCustomDimensionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.ListCustomDimensionsRequest.class, + com.google.analytics.admin.v1beta.ListCustomDimensionsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. Example format: properties/1234
+   * 
+ * + * + * 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. Example format: properties/1234
+   * 
+ * + * + * 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_; + /** + * + * + *
+   * The maximum number of resources to return.
+   * If unspecified, at most 50 resources will be returned.
+   * The maximum value is 200 (higher values will be coerced to the maximum).
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * A page token, received from a previous `ListCustomDimensions` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListCustomDimensions`
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @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; + } + } + /** + * + * + *
+   * A page token, received from a previous `ListCustomDimensions` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListCustomDimensions`
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @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_); + } + unknownFields.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 += unknownFields.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.admin.v1beta.ListCustomDimensionsRequest)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.ListCustomDimensionsRequest other = + (com.google.analytics.admin.v1beta.ListCustomDimensionsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.ListCustomDimensionsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ListCustomDimensionsRequest 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.admin.v1beta.ListCustomDimensionsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ListCustomDimensionsRequest 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.admin.v1beta.ListCustomDimensionsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ListCustomDimensionsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.ListCustomDimensionsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ListCustomDimensionsRequest 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.admin.v1beta.ListCustomDimensionsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ListCustomDimensionsRequest 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.admin.v1beta.ListCustomDimensionsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ListCustomDimensionsRequest 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.admin.v1beta.ListCustomDimensionsRequest 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; + } + /** + * + * + *
+   * Request message for ListCustomDimensions RPC.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.ListCustomDimensionsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.ListCustomDimensionsRequest) + com.google.analytics.admin.v1beta.ListCustomDimensionsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListCustomDimensionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListCustomDimensionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.ListCustomDimensionsRequest.class, + com.google.analytics.admin.v1beta.ListCustomDimensionsRequest.Builder.class); + } + + // Construct using com.google.analytics.admin.v1beta.ListCustomDimensionsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListCustomDimensionsRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ListCustomDimensionsRequest + getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.ListCustomDimensionsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ListCustomDimensionsRequest build() { + com.google.analytics.admin.v1beta.ListCustomDimensionsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ListCustomDimensionsRequest buildPartial() { + com.google.analytics.admin.v1beta.ListCustomDimensionsRequest result = + new com.google.analytics.admin.v1beta.ListCustomDimensionsRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + @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.admin.v1beta.ListCustomDimensionsRequest) { + return mergeFrom((com.google.analytics.admin.v1beta.ListCustomDimensionsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1beta.ListCustomDimensionsRequest other) { + if (other + == com.google.analytics.admin.v1beta.ListCustomDimensionsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.ListCustomDimensionsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.ListCustomDimensionsRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Example format: properties/1234
+     * 
+ * + * + * 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. Example format: properties/1234
+     * 
+ * + * + * 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. Example format: properties/1234
+     * 
+ * + * + * 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; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Example format: properties/1234
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Example format: properties/1234
+     * 
+ * + * + * 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; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of resources to return.
+     * If unspecified, at most 50 resources will be returned.
+     * The maximum value is 200 (higher values will be coerced to the maximum).
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of resources to return.
+     * If unspecified, at most 50 resources will be returned.
+     * The maximum value is 200 (higher values will be coerced to the maximum).
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The maximum number of resources to return.
+     * If unspecified, at most 50 resources will be returned.
+     * The maximum value is 200 (higher values will be coerced to the maximum).
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A page token, received from a previous `ListCustomDimensions` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListCustomDimensions`
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @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; + } + } + /** + * + * + *
+     * A page token, received from a previous `ListCustomDimensions` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListCustomDimensions`
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @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; + } + } + /** + * + * + *
+     * A page token, received from a previous `ListCustomDimensions` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListCustomDimensions`
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @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; + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, received from a previous `ListCustomDimensions` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListCustomDimensions`
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, received from a previous `ListCustomDimensions` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListCustomDimensions`
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @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; + 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.admin.v1beta.ListCustomDimensionsRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.ListCustomDimensionsRequest) + private static final com.google.analytics.admin.v1beta.ListCustomDimensionsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.ListCustomDimensionsRequest(); + } + + public static com.google.analytics.admin.v1beta.ListCustomDimensionsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListCustomDimensionsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListCustomDimensionsRequest(input, extensionRegistry); + } + }; + + 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.admin.v1beta.ListCustomDimensionsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListCustomDimensionsRequestOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListCustomDimensionsRequestOrBuilder.java new file mode 100644 index 000000000000..db1639581a01 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListCustomDimensionsRequestOrBuilder.java @@ -0,0 +1,100 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +public interface ListCustomDimensionsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.ListCustomDimensionsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Example format: properties/1234
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Example format: properties/1234
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The maximum number of resources to return.
+   * If unspecified, at most 50 resources will be returned.
+   * The maximum value is 200 (higher values will be coerced to the maximum).
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A page token, received from a previous `ListCustomDimensions` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListCustomDimensions`
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A page token, received from a previous `ListCustomDimensions` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListCustomDimensions`
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListCustomDimensionsResponse.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListCustomDimensionsResponse.java new file mode 100644 index 000000000000..f9bacbaac59f --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListCustomDimensionsResponse.java @@ -0,0 +1,1161 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * Response message for ListCustomDimensions RPC.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.ListCustomDimensionsResponse} + */ +public final class ListCustomDimensionsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.ListCustomDimensionsResponse) + ListCustomDimensionsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListCustomDimensionsResponse.newBuilder() to construct. + private ListCustomDimensionsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListCustomDimensionsResponse() { + customDimensions_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListCustomDimensionsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListCustomDimensionsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + customDimensions_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + customDimensions_.add( + input.readMessage( + com.google.analytics.admin.v1beta.CustomDimension.parser(), + extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + customDimensions_ = java.util.Collections.unmodifiableList(customDimensions_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListCustomDimensionsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListCustomDimensionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.ListCustomDimensionsResponse.class, + com.google.analytics.admin.v1beta.ListCustomDimensionsResponse.Builder.class); + } + + public static final int CUSTOM_DIMENSIONS_FIELD_NUMBER = 1; + private java.util.List customDimensions_; + /** + * + * + *
+   * List of CustomDimensions.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.CustomDimension custom_dimensions = 1; + */ + @java.lang.Override + public java.util.List + getCustomDimensionsList() { + return customDimensions_; + } + /** + * + * + *
+   * List of CustomDimensions.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.CustomDimension custom_dimensions = 1; + */ + @java.lang.Override + public java.util.List + getCustomDimensionsOrBuilderList() { + return customDimensions_; + } + /** + * + * + *
+   * List of CustomDimensions.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.CustomDimension custom_dimensions = 1; + */ + @java.lang.Override + public int getCustomDimensionsCount() { + return customDimensions_.size(); + } + /** + * + * + *
+   * List of CustomDimensions.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.CustomDimension custom_dimensions = 1; + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.CustomDimension getCustomDimensions(int index) { + return customDimensions_.get(index); + } + /** + * + * + *
+   * List of CustomDimensions.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.CustomDimension custom_dimensions = 1; + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.CustomDimensionOrBuilder getCustomDimensionsOrBuilder( + int index) { + return customDimensions_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < customDimensions_.size(); i++) { + output.writeMessage(1, customDimensions_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < customDimensions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, customDimensions_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.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.admin.v1beta.ListCustomDimensionsResponse)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.ListCustomDimensionsResponse other = + (com.google.analytics.admin.v1beta.ListCustomDimensionsResponse) obj; + + if (!getCustomDimensionsList().equals(other.getCustomDimensionsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getCustomDimensionsCount() > 0) { + hash = (37 * hash) + CUSTOM_DIMENSIONS_FIELD_NUMBER; + hash = (53 * hash) + getCustomDimensionsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.ListCustomDimensionsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ListCustomDimensionsResponse 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.admin.v1beta.ListCustomDimensionsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ListCustomDimensionsResponse 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.admin.v1beta.ListCustomDimensionsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ListCustomDimensionsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.ListCustomDimensionsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ListCustomDimensionsResponse 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.admin.v1beta.ListCustomDimensionsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ListCustomDimensionsResponse 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.admin.v1beta.ListCustomDimensionsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ListCustomDimensionsResponse 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.admin.v1beta.ListCustomDimensionsResponse 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; + } + /** + * + * + *
+   * Response message for ListCustomDimensions RPC.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.ListCustomDimensionsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.ListCustomDimensionsResponse) + com.google.analytics.admin.v1beta.ListCustomDimensionsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListCustomDimensionsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListCustomDimensionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.ListCustomDimensionsResponse.class, + com.google.analytics.admin.v1beta.ListCustomDimensionsResponse.Builder.class); + } + + // Construct using com.google.analytics.admin.v1beta.ListCustomDimensionsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCustomDimensionsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (customDimensionsBuilder_ == null) { + customDimensions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + customDimensionsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListCustomDimensionsResponse_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ListCustomDimensionsResponse + getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.ListCustomDimensionsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ListCustomDimensionsResponse build() { + com.google.analytics.admin.v1beta.ListCustomDimensionsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ListCustomDimensionsResponse buildPartial() { + com.google.analytics.admin.v1beta.ListCustomDimensionsResponse result = + new com.google.analytics.admin.v1beta.ListCustomDimensionsResponse(this); + int from_bitField0_ = bitField0_; + if (customDimensionsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + customDimensions_ = java.util.Collections.unmodifiableList(customDimensions_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.customDimensions_ = customDimensions_; + } else { + result.customDimensions_ = customDimensionsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @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.admin.v1beta.ListCustomDimensionsResponse) { + return mergeFrom((com.google.analytics.admin.v1beta.ListCustomDimensionsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1beta.ListCustomDimensionsResponse other) { + if (other + == com.google.analytics.admin.v1beta.ListCustomDimensionsResponse.getDefaultInstance()) + return this; + if (customDimensionsBuilder_ == null) { + if (!other.customDimensions_.isEmpty()) { + if (customDimensions_.isEmpty()) { + customDimensions_ = other.customDimensions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureCustomDimensionsIsMutable(); + customDimensions_.addAll(other.customDimensions_); + } + onChanged(); + } + } else { + if (!other.customDimensions_.isEmpty()) { + if (customDimensionsBuilder_.isEmpty()) { + customDimensionsBuilder_.dispose(); + customDimensionsBuilder_ = null; + customDimensions_ = other.customDimensions_; + bitField0_ = (bitField0_ & ~0x00000001); + customDimensionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getCustomDimensionsFieldBuilder() + : null; + } else { + customDimensionsBuilder_.addAllMessages(other.customDimensions_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.ListCustomDimensionsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.ListCustomDimensionsResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List customDimensions_ = + java.util.Collections.emptyList(); + + private void ensureCustomDimensionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + customDimensions_ = + new java.util.ArrayList( + customDimensions_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.admin.v1beta.CustomDimension, + com.google.analytics.admin.v1beta.CustomDimension.Builder, + com.google.analytics.admin.v1beta.CustomDimensionOrBuilder> + customDimensionsBuilder_; + + /** + * + * + *
+     * List of CustomDimensions.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.CustomDimension custom_dimensions = 1; + */ + public java.util.List + getCustomDimensionsList() { + if (customDimensionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(customDimensions_); + } else { + return customDimensionsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of CustomDimensions.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.CustomDimension custom_dimensions = 1; + */ + public int getCustomDimensionsCount() { + if (customDimensionsBuilder_ == null) { + return customDimensions_.size(); + } else { + return customDimensionsBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of CustomDimensions.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.CustomDimension custom_dimensions = 1; + */ + public com.google.analytics.admin.v1beta.CustomDimension getCustomDimensions(int index) { + if (customDimensionsBuilder_ == null) { + return customDimensions_.get(index); + } else { + return customDimensionsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of CustomDimensions.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.CustomDimension custom_dimensions = 1; + */ + public Builder setCustomDimensions( + int index, com.google.analytics.admin.v1beta.CustomDimension value) { + if (customDimensionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCustomDimensionsIsMutable(); + customDimensions_.set(index, value); + onChanged(); + } else { + customDimensionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of CustomDimensions.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.CustomDimension custom_dimensions = 1; + */ + public Builder setCustomDimensions( + int index, com.google.analytics.admin.v1beta.CustomDimension.Builder builderForValue) { + if (customDimensionsBuilder_ == null) { + ensureCustomDimensionsIsMutable(); + customDimensions_.set(index, builderForValue.build()); + onChanged(); + } else { + customDimensionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of CustomDimensions.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.CustomDimension custom_dimensions = 1; + */ + public Builder addCustomDimensions(com.google.analytics.admin.v1beta.CustomDimension value) { + if (customDimensionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCustomDimensionsIsMutable(); + customDimensions_.add(value); + onChanged(); + } else { + customDimensionsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of CustomDimensions.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.CustomDimension custom_dimensions = 1; + */ + public Builder addCustomDimensions( + int index, com.google.analytics.admin.v1beta.CustomDimension value) { + if (customDimensionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCustomDimensionsIsMutable(); + customDimensions_.add(index, value); + onChanged(); + } else { + customDimensionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of CustomDimensions.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.CustomDimension custom_dimensions = 1; + */ + public Builder addCustomDimensions( + com.google.analytics.admin.v1beta.CustomDimension.Builder builderForValue) { + if (customDimensionsBuilder_ == null) { + ensureCustomDimensionsIsMutable(); + customDimensions_.add(builderForValue.build()); + onChanged(); + } else { + customDimensionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of CustomDimensions.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.CustomDimension custom_dimensions = 1; + */ + public Builder addCustomDimensions( + int index, com.google.analytics.admin.v1beta.CustomDimension.Builder builderForValue) { + if (customDimensionsBuilder_ == null) { + ensureCustomDimensionsIsMutable(); + customDimensions_.add(index, builderForValue.build()); + onChanged(); + } else { + customDimensionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of CustomDimensions.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.CustomDimension custom_dimensions = 1; + */ + public Builder addAllCustomDimensions( + java.lang.Iterable values) { + if (customDimensionsBuilder_ == null) { + ensureCustomDimensionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, customDimensions_); + onChanged(); + } else { + customDimensionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of CustomDimensions.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.CustomDimension custom_dimensions = 1; + */ + public Builder clearCustomDimensions() { + if (customDimensionsBuilder_ == null) { + customDimensions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + customDimensionsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of CustomDimensions.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.CustomDimension custom_dimensions = 1; + */ + public Builder removeCustomDimensions(int index) { + if (customDimensionsBuilder_ == null) { + ensureCustomDimensionsIsMutable(); + customDimensions_.remove(index); + onChanged(); + } else { + customDimensionsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of CustomDimensions.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.CustomDimension custom_dimensions = 1; + */ + public com.google.analytics.admin.v1beta.CustomDimension.Builder getCustomDimensionsBuilder( + int index) { + return getCustomDimensionsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of CustomDimensions.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.CustomDimension custom_dimensions = 1; + */ + public com.google.analytics.admin.v1beta.CustomDimensionOrBuilder getCustomDimensionsOrBuilder( + int index) { + if (customDimensionsBuilder_ == null) { + return customDimensions_.get(index); + } else { + return customDimensionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of CustomDimensions.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.CustomDimension custom_dimensions = 1; + */ + public java.util.List + getCustomDimensionsOrBuilderList() { + if (customDimensionsBuilder_ != null) { + return customDimensionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(customDimensions_); + } + } + /** + * + * + *
+     * List of CustomDimensions.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.CustomDimension custom_dimensions = 1; + */ + public com.google.analytics.admin.v1beta.CustomDimension.Builder addCustomDimensionsBuilder() { + return getCustomDimensionsFieldBuilder() + .addBuilder(com.google.analytics.admin.v1beta.CustomDimension.getDefaultInstance()); + } + /** + * + * + *
+     * List of CustomDimensions.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.CustomDimension custom_dimensions = 1; + */ + public com.google.analytics.admin.v1beta.CustomDimension.Builder addCustomDimensionsBuilder( + int index) { + return getCustomDimensionsFieldBuilder() + .addBuilder( + index, com.google.analytics.admin.v1beta.CustomDimension.getDefaultInstance()); + } + /** + * + * + *
+     * List of CustomDimensions.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.CustomDimension custom_dimensions = 1; + */ + public java.util.List + getCustomDimensionsBuilderList() { + return getCustomDimensionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.admin.v1beta.CustomDimension, + com.google.analytics.admin.v1beta.CustomDimension.Builder, + com.google.analytics.admin.v1beta.CustomDimensionOrBuilder> + getCustomDimensionsFieldBuilder() { + if (customDimensionsBuilder_ == null) { + customDimensionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.admin.v1beta.CustomDimension, + com.google.analytics.admin.v1beta.CustomDimension.Builder, + com.google.analytics.admin.v1beta.CustomDimensionOrBuilder>( + customDimensions_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + customDimensions_ = null; + } + return customDimensionsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + 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.admin.v1beta.ListCustomDimensionsResponse) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.ListCustomDimensionsResponse) + private static final com.google.analytics.admin.v1beta.ListCustomDimensionsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.ListCustomDimensionsResponse(); + } + + public static com.google.analytics.admin.v1beta.ListCustomDimensionsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListCustomDimensionsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListCustomDimensionsResponse(input, extensionRegistry); + } + }; + + 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.admin.v1beta.ListCustomDimensionsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListCustomDimensionsResponseOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListCustomDimensionsResponseOrBuilder.java new file mode 100644 index 000000000000..4af913b009fd --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListCustomDimensionsResponseOrBuilder.java @@ -0,0 +1,105 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +public interface ListCustomDimensionsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.ListCustomDimensionsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List of CustomDimensions.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.CustomDimension custom_dimensions = 1; + */ + java.util.List getCustomDimensionsList(); + /** + * + * + *
+   * List of CustomDimensions.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.CustomDimension custom_dimensions = 1; + */ + com.google.analytics.admin.v1beta.CustomDimension getCustomDimensions(int index); + /** + * + * + *
+   * List of CustomDimensions.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.CustomDimension custom_dimensions = 1; + */ + int getCustomDimensionsCount(); + /** + * + * + *
+   * List of CustomDimensions.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.CustomDimension custom_dimensions = 1; + */ + java.util.List + getCustomDimensionsOrBuilderList(); + /** + * + * + *
+   * List of CustomDimensions.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.CustomDimension custom_dimensions = 1; + */ + com.google.analytics.admin.v1beta.CustomDimensionOrBuilder getCustomDimensionsOrBuilder( + int index); + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListCustomMetricsRequest.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListCustomMetricsRequest.java new file mode 100644 index 000000000000..0959ff9336ba --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListCustomMetricsRequest.java @@ -0,0 +1,951 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * Request message for ListCustomMetrics RPC.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.ListCustomMetricsRequest} + */ +public final class ListCustomMetricsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.ListCustomMetricsRequest) + ListCustomMetricsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListCustomMetricsRequest.newBuilder() to construct. + private ListCustomMetricsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListCustomMetricsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListCustomMetricsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListCustomMetricsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 16: + { + pageSize_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListCustomMetricsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListCustomMetricsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.ListCustomMetricsRequest.class, + com.google.analytics.admin.v1beta.ListCustomMetricsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. Example format: properties/1234
+   * 
+ * + * + * 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. Example format: properties/1234
+   * 
+ * + * + * 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_; + /** + * + * + *
+   * The maximum number of resources to return.
+   * If unspecified, at most 50 resources will be returned.
+   * The maximum value is 200 (higher values will be coerced to the maximum).
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * A page token, received from a previous `ListCustomMetrics` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListCustomMetrics` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @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; + } + } + /** + * + * + *
+   * A page token, received from a previous `ListCustomMetrics` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListCustomMetrics` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @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_); + } + unknownFields.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 += unknownFields.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.admin.v1beta.ListCustomMetricsRequest)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.ListCustomMetricsRequest other = + (com.google.analytics.admin.v1beta.ListCustomMetricsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.ListCustomMetricsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ListCustomMetricsRequest 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.admin.v1beta.ListCustomMetricsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ListCustomMetricsRequest 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.admin.v1beta.ListCustomMetricsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ListCustomMetricsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.ListCustomMetricsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ListCustomMetricsRequest 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.admin.v1beta.ListCustomMetricsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ListCustomMetricsRequest 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.admin.v1beta.ListCustomMetricsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ListCustomMetricsRequest 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.admin.v1beta.ListCustomMetricsRequest 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; + } + /** + * + * + *
+   * Request message for ListCustomMetrics RPC.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.ListCustomMetricsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.ListCustomMetricsRequest) + com.google.analytics.admin.v1beta.ListCustomMetricsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListCustomMetricsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListCustomMetricsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.ListCustomMetricsRequest.class, + com.google.analytics.admin.v1beta.ListCustomMetricsRequest.Builder.class); + } + + // Construct using com.google.analytics.admin.v1beta.ListCustomMetricsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListCustomMetricsRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ListCustomMetricsRequest getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.ListCustomMetricsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ListCustomMetricsRequest build() { + com.google.analytics.admin.v1beta.ListCustomMetricsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ListCustomMetricsRequest buildPartial() { + com.google.analytics.admin.v1beta.ListCustomMetricsRequest result = + new com.google.analytics.admin.v1beta.ListCustomMetricsRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + @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.admin.v1beta.ListCustomMetricsRequest) { + return mergeFrom((com.google.analytics.admin.v1beta.ListCustomMetricsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1beta.ListCustomMetricsRequest other) { + if (other == com.google.analytics.admin.v1beta.ListCustomMetricsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.ListCustomMetricsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.ListCustomMetricsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Example format: properties/1234
+     * 
+ * + * + * 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. Example format: properties/1234
+     * 
+ * + * + * 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. Example format: properties/1234
+     * 
+ * + * + * 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; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Example format: properties/1234
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Example format: properties/1234
+     * 
+ * + * + * 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; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of resources to return.
+     * If unspecified, at most 50 resources will be returned.
+     * The maximum value is 200 (higher values will be coerced to the maximum).
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of resources to return.
+     * If unspecified, at most 50 resources will be returned.
+     * The maximum value is 200 (higher values will be coerced to the maximum).
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The maximum number of resources to return.
+     * If unspecified, at most 50 resources will be returned.
+     * The maximum value is 200 (higher values will be coerced to the maximum).
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A page token, received from a previous `ListCustomMetrics` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListCustomMetrics` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @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; + } + } + /** + * + * + *
+     * A page token, received from a previous `ListCustomMetrics` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListCustomMetrics` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @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; + } + } + /** + * + * + *
+     * A page token, received from a previous `ListCustomMetrics` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListCustomMetrics` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @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; + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, received from a previous `ListCustomMetrics` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListCustomMetrics` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, received from a previous `ListCustomMetrics` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListCustomMetrics` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @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; + 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.admin.v1beta.ListCustomMetricsRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.ListCustomMetricsRequest) + private static final com.google.analytics.admin.v1beta.ListCustomMetricsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.ListCustomMetricsRequest(); + } + + public static com.google.analytics.admin.v1beta.ListCustomMetricsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListCustomMetricsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListCustomMetricsRequest(input, extensionRegistry); + } + }; + + 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.admin.v1beta.ListCustomMetricsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListCustomMetricsRequestOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListCustomMetricsRequestOrBuilder.java new file mode 100644 index 000000000000..d1949dfdb637 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListCustomMetricsRequestOrBuilder.java @@ -0,0 +1,100 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +public interface ListCustomMetricsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.ListCustomMetricsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Example format: properties/1234
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Example format: properties/1234
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The maximum number of resources to return.
+   * If unspecified, at most 50 resources will be returned.
+   * The maximum value is 200 (higher values will be coerced to the maximum).
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A page token, received from a previous `ListCustomMetrics` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListCustomMetrics` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A page token, received from a previous `ListCustomMetrics` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListCustomMetrics` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListCustomMetricsResponse.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListCustomMetricsResponse.java new file mode 100644 index 000000000000..58119e589c80 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListCustomMetricsResponse.java @@ -0,0 +1,1150 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * Response message for ListCustomMetrics RPC.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.ListCustomMetricsResponse} + */ +public final class ListCustomMetricsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.ListCustomMetricsResponse) + ListCustomMetricsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListCustomMetricsResponse.newBuilder() to construct. + private ListCustomMetricsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListCustomMetricsResponse() { + customMetrics_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListCustomMetricsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListCustomMetricsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + customMetrics_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + customMetrics_.add( + input.readMessage( + com.google.analytics.admin.v1beta.CustomMetric.parser(), extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + customMetrics_ = java.util.Collections.unmodifiableList(customMetrics_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListCustomMetricsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListCustomMetricsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.ListCustomMetricsResponse.class, + com.google.analytics.admin.v1beta.ListCustomMetricsResponse.Builder.class); + } + + public static final int CUSTOM_METRICS_FIELD_NUMBER = 1; + private java.util.List customMetrics_; + /** + * + * + *
+   * List of CustomMetrics.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.CustomMetric custom_metrics = 1; + */ + @java.lang.Override + public java.util.List getCustomMetricsList() { + return customMetrics_; + } + /** + * + * + *
+   * List of CustomMetrics.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.CustomMetric custom_metrics = 1; + */ + @java.lang.Override + public java.util.List + getCustomMetricsOrBuilderList() { + return customMetrics_; + } + /** + * + * + *
+   * List of CustomMetrics.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.CustomMetric custom_metrics = 1; + */ + @java.lang.Override + public int getCustomMetricsCount() { + return customMetrics_.size(); + } + /** + * + * + *
+   * List of CustomMetrics.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.CustomMetric custom_metrics = 1; + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.CustomMetric getCustomMetrics(int index) { + return customMetrics_.get(index); + } + /** + * + * + *
+   * List of CustomMetrics.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.CustomMetric custom_metrics = 1; + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.CustomMetricOrBuilder getCustomMetricsOrBuilder( + int index) { + return customMetrics_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < customMetrics_.size(); i++) { + output.writeMessage(1, customMetrics_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < customMetrics_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, customMetrics_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.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.admin.v1beta.ListCustomMetricsResponse)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.ListCustomMetricsResponse other = + (com.google.analytics.admin.v1beta.ListCustomMetricsResponse) obj; + + if (!getCustomMetricsList().equals(other.getCustomMetricsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getCustomMetricsCount() > 0) { + hash = (37 * hash) + CUSTOM_METRICS_FIELD_NUMBER; + hash = (53 * hash) + getCustomMetricsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.ListCustomMetricsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ListCustomMetricsResponse 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.admin.v1beta.ListCustomMetricsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ListCustomMetricsResponse 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.admin.v1beta.ListCustomMetricsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ListCustomMetricsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.ListCustomMetricsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ListCustomMetricsResponse 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.admin.v1beta.ListCustomMetricsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ListCustomMetricsResponse 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.admin.v1beta.ListCustomMetricsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ListCustomMetricsResponse 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.admin.v1beta.ListCustomMetricsResponse 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; + } + /** + * + * + *
+   * Response message for ListCustomMetrics RPC.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.ListCustomMetricsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.ListCustomMetricsResponse) + com.google.analytics.admin.v1beta.ListCustomMetricsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListCustomMetricsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListCustomMetricsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.ListCustomMetricsResponse.class, + com.google.analytics.admin.v1beta.ListCustomMetricsResponse.Builder.class); + } + + // Construct using com.google.analytics.admin.v1beta.ListCustomMetricsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCustomMetricsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (customMetricsBuilder_ == null) { + customMetrics_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + customMetricsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListCustomMetricsResponse_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ListCustomMetricsResponse getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.ListCustomMetricsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ListCustomMetricsResponse build() { + com.google.analytics.admin.v1beta.ListCustomMetricsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ListCustomMetricsResponse buildPartial() { + com.google.analytics.admin.v1beta.ListCustomMetricsResponse result = + new com.google.analytics.admin.v1beta.ListCustomMetricsResponse(this); + int from_bitField0_ = bitField0_; + if (customMetricsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + customMetrics_ = java.util.Collections.unmodifiableList(customMetrics_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.customMetrics_ = customMetrics_; + } else { + result.customMetrics_ = customMetricsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @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.admin.v1beta.ListCustomMetricsResponse) { + return mergeFrom((com.google.analytics.admin.v1beta.ListCustomMetricsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1beta.ListCustomMetricsResponse other) { + if (other == com.google.analytics.admin.v1beta.ListCustomMetricsResponse.getDefaultInstance()) + return this; + if (customMetricsBuilder_ == null) { + if (!other.customMetrics_.isEmpty()) { + if (customMetrics_.isEmpty()) { + customMetrics_ = other.customMetrics_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureCustomMetricsIsMutable(); + customMetrics_.addAll(other.customMetrics_); + } + onChanged(); + } + } else { + if (!other.customMetrics_.isEmpty()) { + if (customMetricsBuilder_.isEmpty()) { + customMetricsBuilder_.dispose(); + customMetricsBuilder_ = null; + customMetrics_ = other.customMetrics_; + bitField0_ = (bitField0_ & ~0x00000001); + customMetricsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getCustomMetricsFieldBuilder() + : null; + } else { + customMetricsBuilder_.addAllMessages(other.customMetrics_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.ListCustomMetricsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.ListCustomMetricsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List customMetrics_ = + java.util.Collections.emptyList(); + + private void ensureCustomMetricsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + customMetrics_ = + new java.util.ArrayList(customMetrics_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.admin.v1beta.CustomMetric, + com.google.analytics.admin.v1beta.CustomMetric.Builder, + com.google.analytics.admin.v1beta.CustomMetricOrBuilder> + customMetricsBuilder_; + + /** + * + * + *
+     * List of CustomMetrics.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.CustomMetric custom_metrics = 1; + */ + public java.util.List getCustomMetricsList() { + if (customMetricsBuilder_ == null) { + return java.util.Collections.unmodifiableList(customMetrics_); + } else { + return customMetricsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of CustomMetrics.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.CustomMetric custom_metrics = 1; + */ + public int getCustomMetricsCount() { + if (customMetricsBuilder_ == null) { + return customMetrics_.size(); + } else { + return customMetricsBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of CustomMetrics.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.CustomMetric custom_metrics = 1; + */ + public com.google.analytics.admin.v1beta.CustomMetric getCustomMetrics(int index) { + if (customMetricsBuilder_ == null) { + return customMetrics_.get(index); + } else { + return customMetricsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of CustomMetrics.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.CustomMetric custom_metrics = 1; + */ + public Builder setCustomMetrics( + int index, com.google.analytics.admin.v1beta.CustomMetric value) { + if (customMetricsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCustomMetricsIsMutable(); + customMetrics_.set(index, value); + onChanged(); + } else { + customMetricsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of CustomMetrics.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.CustomMetric custom_metrics = 1; + */ + public Builder setCustomMetrics( + int index, com.google.analytics.admin.v1beta.CustomMetric.Builder builderForValue) { + if (customMetricsBuilder_ == null) { + ensureCustomMetricsIsMutable(); + customMetrics_.set(index, builderForValue.build()); + onChanged(); + } else { + customMetricsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of CustomMetrics.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.CustomMetric custom_metrics = 1; + */ + public Builder addCustomMetrics(com.google.analytics.admin.v1beta.CustomMetric value) { + if (customMetricsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCustomMetricsIsMutable(); + customMetrics_.add(value); + onChanged(); + } else { + customMetricsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of CustomMetrics.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.CustomMetric custom_metrics = 1; + */ + public Builder addCustomMetrics( + int index, com.google.analytics.admin.v1beta.CustomMetric value) { + if (customMetricsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCustomMetricsIsMutable(); + customMetrics_.add(index, value); + onChanged(); + } else { + customMetricsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of CustomMetrics.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.CustomMetric custom_metrics = 1; + */ + public Builder addCustomMetrics( + com.google.analytics.admin.v1beta.CustomMetric.Builder builderForValue) { + if (customMetricsBuilder_ == null) { + ensureCustomMetricsIsMutable(); + customMetrics_.add(builderForValue.build()); + onChanged(); + } else { + customMetricsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of CustomMetrics.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.CustomMetric custom_metrics = 1; + */ + public Builder addCustomMetrics( + int index, com.google.analytics.admin.v1beta.CustomMetric.Builder builderForValue) { + if (customMetricsBuilder_ == null) { + ensureCustomMetricsIsMutable(); + customMetrics_.add(index, builderForValue.build()); + onChanged(); + } else { + customMetricsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of CustomMetrics.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.CustomMetric custom_metrics = 1; + */ + public Builder addAllCustomMetrics( + java.lang.Iterable values) { + if (customMetricsBuilder_ == null) { + ensureCustomMetricsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, customMetrics_); + onChanged(); + } else { + customMetricsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of CustomMetrics.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.CustomMetric custom_metrics = 1; + */ + public Builder clearCustomMetrics() { + if (customMetricsBuilder_ == null) { + customMetrics_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + customMetricsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of CustomMetrics.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.CustomMetric custom_metrics = 1; + */ + public Builder removeCustomMetrics(int index) { + if (customMetricsBuilder_ == null) { + ensureCustomMetricsIsMutable(); + customMetrics_.remove(index); + onChanged(); + } else { + customMetricsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of CustomMetrics.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.CustomMetric custom_metrics = 1; + */ + public com.google.analytics.admin.v1beta.CustomMetric.Builder getCustomMetricsBuilder( + int index) { + return getCustomMetricsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of CustomMetrics.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.CustomMetric custom_metrics = 1; + */ + public com.google.analytics.admin.v1beta.CustomMetricOrBuilder getCustomMetricsOrBuilder( + int index) { + if (customMetricsBuilder_ == null) { + return customMetrics_.get(index); + } else { + return customMetricsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of CustomMetrics.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.CustomMetric custom_metrics = 1; + */ + public java.util.List + getCustomMetricsOrBuilderList() { + if (customMetricsBuilder_ != null) { + return customMetricsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(customMetrics_); + } + } + /** + * + * + *
+     * List of CustomMetrics.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.CustomMetric custom_metrics = 1; + */ + public com.google.analytics.admin.v1beta.CustomMetric.Builder addCustomMetricsBuilder() { + return getCustomMetricsFieldBuilder() + .addBuilder(com.google.analytics.admin.v1beta.CustomMetric.getDefaultInstance()); + } + /** + * + * + *
+     * List of CustomMetrics.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.CustomMetric custom_metrics = 1; + */ + public com.google.analytics.admin.v1beta.CustomMetric.Builder addCustomMetricsBuilder( + int index) { + return getCustomMetricsFieldBuilder() + .addBuilder(index, com.google.analytics.admin.v1beta.CustomMetric.getDefaultInstance()); + } + /** + * + * + *
+     * List of CustomMetrics.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.CustomMetric custom_metrics = 1; + */ + public java.util.List + getCustomMetricsBuilderList() { + return getCustomMetricsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.admin.v1beta.CustomMetric, + com.google.analytics.admin.v1beta.CustomMetric.Builder, + com.google.analytics.admin.v1beta.CustomMetricOrBuilder> + getCustomMetricsFieldBuilder() { + if (customMetricsBuilder_ == null) { + customMetricsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.admin.v1beta.CustomMetric, + com.google.analytics.admin.v1beta.CustomMetric.Builder, + com.google.analytics.admin.v1beta.CustomMetricOrBuilder>( + customMetrics_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + customMetrics_ = null; + } + return customMetricsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + 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.admin.v1beta.ListCustomMetricsResponse) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.ListCustomMetricsResponse) + private static final com.google.analytics.admin.v1beta.ListCustomMetricsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.ListCustomMetricsResponse(); + } + + public static com.google.analytics.admin.v1beta.ListCustomMetricsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListCustomMetricsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListCustomMetricsResponse(input, extensionRegistry); + } + }; + + 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.admin.v1beta.ListCustomMetricsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListCustomMetricsResponseOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListCustomMetricsResponseOrBuilder.java new file mode 100644 index 000000000000..f46ad12c9843 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListCustomMetricsResponseOrBuilder.java @@ -0,0 +1,104 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +public interface ListCustomMetricsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.ListCustomMetricsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List of CustomMetrics.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.CustomMetric custom_metrics = 1; + */ + java.util.List getCustomMetricsList(); + /** + * + * + *
+   * List of CustomMetrics.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.CustomMetric custom_metrics = 1; + */ + com.google.analytics.admin.v1beta.CustomMetric getCustomMetrics(int index); + /** + * + * + *
+   * List of CustomMetrics.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.CustomMetric custom_metrics = 1; + */ + int getCustomMetricsCount(); + /** + * + * + *
+   * List of CustomMetrics.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.CustomMetric custom_metrics = 1; + */ + java.util.List + getCustomMetricsOrBuilderList(); + /** + * + * + *
+   * List of CustomMetrics.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.CustomMetric custom_metrics = 1; + */ + com.google.analytics.admin.v1beta.CustomMetricOrBuilder getCustomMetricsOrBuilder(int index); + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListDataStreamsRequest.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListDataStreamsRequest.java new file mode 100644 index 000000000000..ef569f38ab5d --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListDataStreamsRequest.java @@ -0,0 +1,951 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * Request message for ListDataStreams RPC.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.ListDataStreamsRequest} + */ +public final class ListDataStreamsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.ListDataStreamsRequest) + ListDataStreamsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListDataStreamsRequest.newBuilder() to construct. + private ListDataStreamsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListDataStreamsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListDataStreamsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListDataStreamsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 16: + { + pageSize_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListDataStreamsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListDataStreamsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.ListDataStreamsRequest.class, + com.google.analytics.admin.v1beta.ListDataStreamsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. Example format: properties/1234
+   * 
+ * + * + * 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. Example format: properties/1234
+   * 
+ * + * + * 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_; + /** + * + * + *
+   * The maximum number of resources to return.
+   * If unspecified, at most 50 resources will be returned.
+   * The maximum value is 200 (higher values will be coerced to the maximum).
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * A page token, received from a previous `ListDataStreams` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListDataStreams` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @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; + } + } + /** + * + * + *
+   * A page token, received from a previous `ListDataStreams` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListDataStreams` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @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_); + } + unknownFields.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 += unknownFields.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.admin.v1beta.ListDataStreamsRequest)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.ListDataStreamsRequest other = + (com.google.analytics.admin.v1beta.ListDataStreamsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.ListDataStreamsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ListDataStreamsRequest 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.admin.v1beta.ListDataStreamsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ListDataStreamsRequest 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.admin.v1beta.ListDataStreamsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ListDataStreamsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.ListDataStreamsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ListDataStreamsRequest 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.admin.v1beta.ListDataStreamsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ListDataStreamsRequest 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.admin.v1beta.ListDataStreamsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ListDataStreamsRequest 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.admin.v1beta.ListDataStreamsRequest 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; + } + /** + * + * + *
+   * Request message for ListDataStreams RPC.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.ListDataStreamsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.ListDataStreamsRequest) + com.google.analytics.admin.v1beta.ListDataStreamsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListDataStreamsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListDataStreamsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.ListDataStreamsRequest.class, + com.google.analytics.admin.v1beta.ListDataStreamsRequest.Builder.class); + } + + // Construct using com.google.analytics.admin.v1beta.ListDataStreamsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListDataStreamsRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ListDataStreamsRequest getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.ListDataStreamsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ListDataStreamsRequest build() { + com.google.analytics.admin.v1beta.ListDataStreamsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ListDataStreamsRequest buildPartial() { + com.google.analytics.admin.v1beta.ListDataStreamsRequest result = + new com.google.analytics.admin.v1beta.ListDataStreamsRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + @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.admin.v1beta.ListDataStreamsRequest) { + return mergeFrom((com.google.analytics.admin.v1beta.ListDataStreamsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1beta.ListDataStreamsRequest other) { + if (other == com.google.analytics.admin.v1beta.ListDataStreamsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.ListDataStreamsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.ListDataStreamsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Example format: properties/1234
+     * 
+ * + * + * 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. Example format: properties/1234
+     * 
+ * + * + * 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. Example format: properties/1234
+     * 
+ * + * + * 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; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Example format: properties/1234
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Example format: properties/1234
+     * 
+ * + * + * 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; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of resources to return.
+     * If unspecified, at most 50 resources will be returned.
+     * The maximum value is 200 (higher values will be coerced to the maximum).
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of resources to return.
+     * If unspecified, at most 50 resources will be returned.
+     * The maximum value is 200 (higher values will be coerced to the maximum).
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The maximum number of resources to return.
+     * If unspecified, at most 50 resources will be returned.
+     * The maximum value is 200 (higher values will be coerced to the maximum).
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A page token, received from a previous `ListDataStreams` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListDataStreams` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @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; + } + } + /** + * + * + *
+     * A page token, received from a previous `ListDataStreams` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListDataStreams` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @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; + } + } + /** + * + * + *
+     * A page token, received from a previous `ListDataStreams` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListDataStreams` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @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; + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, received from a previous `ListDataStreams` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListDataStreams` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, received from a previous `ListDataStreams` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListDataStreams` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @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; + 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.admin.v1beta.ListDataStreamsRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.ListDataStreamsRequest) + private static final com.google.analytics.admin.v1beta.ListDataStreamsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.ListDataStreamsRequest(); + } + + public static com.google.analytics.admin.v1beta.ListDataStreamsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListDataStreamsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListDataStreamsRequest(input, extensionRegistry); + } + }; + + 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.admin.v1beta.ListDataStreamsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListDataStreamsRequestOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListDataStreamsRequestOrBuilder.java new file mode 100644 index 000000000000..a35523bb8aaf --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListDataStreamsRequestOrBuilder.java @@ -0,0 +1,100 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +public interface ListDataStreamsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.ListDataStreamsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Example format: properties/1234
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Example format: properties/1234
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The maximum number of resources to return.
+   * If unspecified, at most 50 resources will be returned.
+   * The maximum value is 200 (higher values will be coerced to the maximum).
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A page token, received from a previous `ListDataStreams` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListDataStreams` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A page token, received from a previous `ListDataStreams` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListDataStreams` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListDataStreamsResponse.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListDataStreamsResponse.java new file mode 100644 index 000000000000..46654207c407 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListDataStreamsResponse.java @@ -0,0 +1,1142 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * Response message for ListDataStreams RPC.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.ListDataStreamsResponse} + */ +public final class ListDataStreamsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.ListDataStreamsResponse) + ListDataStreamsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListDataStreamsResponse.newBuilder() to construct. + private ListDataStreamsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListDataStreamsResponse() { + dataStreams_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListDataStreamsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListDataStreamsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + dataStreams_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + dataStreams_.add( + input.readMessage( + com.google.analytics.admin.v1beta.DataStream.parser(), extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + dataStreams_ = java.util.Collections.unmodifiableList(dataStreams_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListDataStreamsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListDataStreamsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.ListDataStreamsResponse.class, + com.google.analytics.admin.v1beta.ListDataStreamsResponse.Builder.class); + } + + public static final int DATA_STREAMS_FIELD_NUMBER = 1; + private java.util.List dataStreams_; + /** + * + * + *
+   * List of DataStreams.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.DataStream data_streams = 1; + */ + @java.lang.Override + public java.util.List getDataStreamsList() { + return dataStreams_; + } + /** + * + * + *
+   * List of DataStreams.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.DataStream data_streams = 1; + */ + @java.lang.Override + public java.util.List + getDataStreamsOrBuilderList() { + return dataStreams_; + } + /** + * + * + *
+   * List of DataStreams.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.DataStream data_streams = 1; + */ + @java.lang.Override + public int getDataStreamsCount() { + return dataStreams_.size(); + } + /** + * + * + *
+   * List of DataStreams.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.DataStream data_streams = 1; + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.DataStream getDataStreams(int index) { + return dataStreams_.get(index); + } + /** + * + * + *
+   * List of DataStreams.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.DataStream data_streams = 1; + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.DataStreamOrBuilder getDataStreamsOrBuilder(int index) { + return dataStreams_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < dataStreams_.size(); i++) { + output.writeMessage(1, dataStreams_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < dataStreams_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, dataStreams_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.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.admin.v1beta.ListDataStreamsResponse)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.ListDataStreamsResponse other = + (com.google.analytics.admin.v1beta.ListDataStreamsResponse) obj; + + if (!getDataStreamsList().equals(other.getDataStreamsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getDataStreamsCount() > 0) { + hash = (37 * hash) + DATA_STREAMS_FIELD_NUMBER; + hash = (53 * hash) + getDataStreamsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.ListDataStreamsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ListDataStreamsResponse 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.admin.v1beta.ListDataStreamsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ListDataStreamsResponse 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.admin.v1beta.ListDataStreamsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ListDataStreamsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.ListDataStreamsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ListDataStreamsResponse 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.admin.v1beta.ListDataStreamsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ListDataStreamsResponse 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.admin.v1beta.ListDataStreamsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ListDataStreamsResponse 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.admin.v1beta.ListDataStreamsResponse 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; + } + /** + * + * + *
+   * Response message for ListDataStreams RPC.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.ListDataStreamsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.ListDataStreamsResponse) + com.google.analytics.admin.v1beta.ListDataStreamsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListDataStreamsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListDataStreamsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.ListDataStreamsResponse.class, + com.google.analytics.admin.v1beta.ListDataStreamsResponse.Builder.class); + } + + // Construct using com.google.analytics.admin.v1beta.ListDataStreamsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getDataStreamsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (dataStreamsBuilder_ == null) { + dataStreams_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + dataStreamsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListDataStreamsResponse_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ListDataStreamsResponse getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.ListDataStreamsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ListDataStreamsResponse build() { + com.google.analytics.admin.v1beta.ListDataStreamsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ListDataStreamsResponse buildPartial() { + com.google.analytics.admin.v1beta.ListDataStreamsResponse result = + new com.google.analytics.admin.v1beta.ListDataStreamsResponse(this); + int from_bitField0_ = bitField0_; + if (dataStreamsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + dataStreams_ = java.util.Collections.unmodifiableList(dataStreams_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.dataStreams_ = dataStreams_; + } else { + result.dataStreams_ = dataStreamsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @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.admin.v1beta.ListDataStreamsResponse) { + return mergeFrom((com.google.analytics.admin.v1beta.ListDataStreamsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1beta.ListDataStreamsResponse other) { + if (other == com.google.analytics.admin.v1beta.ListDataStreamsResponse.getDefaultInstance()) + return this; + if (dataStreamsBuilder_ == null) { + if (!other.dataStreams_.isEmpty()) { + if (dataStreams_.isEmpty()) { + dataStreams_ = other.dataStreams_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDataStreamsIsMutable(); + dataStreams_.addAll(other.dataStreams_); + } + onChanged(); + } + } else { + if (!other.dataStreams_.isEmpty()) { + if (dataStreamsBuilder_.isEmpty()) { + dataStreamsBuilder_.dispose(); + dataStreamsBuilder_ = null; + dataStreams_ = other.dataStreams_; + bitField0_ = (bitField0_ & ~0x00000001); + dataStreamsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDataStreamsFieldBuilder() + : null; + } else { + dataStreamsBuilder_.addAllMessages(other.dataStreams_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.ListDataStreamsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.ListDataStreamsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List dataStreams_ = + java.util.Collections.emptyList(); + + private void ensureDataStreamsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + dataStreams_ = + new java.util.ArrayList(dataStreams_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.admin.v1beta.DataStream, + com.google.analytics.admin.v1beta.DataStream.Builder, + com.google.analytics.admin.v1beta.DataStreamOrBuilder> + dataStreamsBuilder_; + + /** + * + * + *
+     * List of DataStreams.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.DataStream data_streams = 1; + */ + public java.util.List getDataStreamsList() { + if (dataStreamsBuilder_ == null) { + return java.util.Collections.unmodifiableList(dataStreams_); + } else { + return dataStreamsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of DataStreams.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.DataStream data_streams = 1; + */ + public int getDataStreamsCount() { + if (dataStreamsBuilder_ == null) { + return dataStreams_.size(); + } else { + return dataStreamsBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of DataStreams.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.DataStream data_streams = 1; + */ + public com.google.analytics.admin.v1beta.DataStream getDataStreams(int index) { + if (dataStreamsBuilder_ == null) { + return dataStreams_.get(index); + } else { + return dataStreamsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of DataStreams.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.DataStream data_streams = 1; + */ + public Builder setDataStreams(int index, com.google.analytics.admin.v1beta.DataStream value) { + if (dataStreamsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataStreamsIsMutable(); + dataStreams_.set(index, value); + onChanged(); + } else { + dataStreamsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of DataStreams.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.DataStream data_streams = 1; + */ + public Builder setDataStreams( + int index, com.google.analytics.admin.v1beta.DataStream.Builder builderForValue) { + if (dataStreamsBuilder_ == null) { + ensureDataStreamsIsMutable(); + dataStreams_.set(index, builderForValue.build()); + onChanged(); + } else { + dataStreamsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of DataStreams.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.DataStream data_streams = 1; + */ + public Builder addDataStreams(com.google.analytics.admin.v1beta.DataStream value) { + if (dataStreamsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataStreamsIsMutable(); + dataStreams_.add(value); + onChanged(); + } else { + dataStreamsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of DataStreams.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.DataStream data_streams = 1; + */ + public Builder addDataStreams(int index, com.google.analytics.admin.v1beta.DataStream value) { + if (dataStreamsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataStreamsIsMutable(); + dataStreams_.add(index, value); + onChanged(); + } else { + dataStreamsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of DataStreams.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.DataStream data_streams = 1; + */ + public Builder addDataStreams( + com.google.analytics.admin.v1beta.DataStream.Builder builderForValue) { + if (dataStreamsBuilder_ == null) { + ensureDataStreamsIsMutable(); + dataStreams_.add(builderForValue.build()); + onChanged(); + } else { + dataStreamsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of DataStreams.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.DataStream data_streams = 1; + */ + public Builder addDataStreams( + int index, com.google.analytics.admin.v1beta.DataStream.Builder builderForValue) { + if (dataStreamsBuilder_ == null) { + ensureDataStreamsIsMutable(); + dataStreams_.add(index, builderForValue.build()); + onChanged(); + } else { + dataStreamsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of DataStreams.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.DataStream data_streams = 1; + */ + public Builder addAllDataStreams( + java.lang.Iterable values) { + if (dataStreamsBuilder_ == null) { + ensureDataStreamsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dataStreams_); + onChanged(); + } else { + dataStreamsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of DataStreams.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.DataStream data_streams = 1; + */ + public Builder clearDataStreams() { + if (dataStreamsBuilder_ == null) { + dataStreams_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + dataStreamsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of DataStreams.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.DataStream data_streams = 1; + */ + public Builder removeDataStreams(int index) { + if (dataStreamsBuilder_ == null) { + ensureDataStreamsIsMutable(); + dataStreams_.remove(index); + onChanged(); + } else { + dataStreamsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of DataStreams.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.DataStream data_streams = 1; + */ + public com.google.analytics.admin.v1beta.DataStream.Builder getDataStreamsBuilder(int index) { + return getDataStreamsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of DataStreams.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.DataStream data_streams = 1; + */ + public com.google.analytics.admin.v1beta.DataStreamOrBuilder getDataStreamsOrBuilder( + int index) { + if (dataStreamsBuilder_ == null) { + return dataStreams_.get(index); + } else { + return dataStreamsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of DataStreams.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.DataStream data_streams = 1; + */ + public java.util.List + getDataStreamsOrBuilderList() { + if (dataStreamsBuilder_ != null) { + return dataStreamsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(dataStreams_); + } + } + /** + * + * + *
+     * List of DataStreams.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.DataStream data_streams = 1; + */ + public com.google.analytics.admin.v1beta.DataStream.Builder addDataStreamsBuilder() { + return getDataStreamsFieldBuilder() + .addBuilder(com.google.analytics.admin.v1beta.DataStream.getDefaultInstance()); + } + /** + * + * + *
+     * List of DataStreams.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.DataStream data_streams = 1; + */ + public com.google.analytics.admin.v1beta.DataStream.Builder addDataStreamsBuilder(int index) { + return getDataStreamsFieldBuilder() + .addBuilder(index, com.google.analytics.admin.v1beta.DataStream.getDefaultInstance()); + } + /** + * + * + *
+     * List of DataStreams.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.DataStream data_streams = 1; + */ + public java.util.List + getDataStreamsBuilderList() { + return getDataStreamsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.admin.v1beta.DataStream, + com.google.analytics.admin.v1beta.DataStream.Builder, + com.google.analytics.admin.v1beta.DataStreamOrBuilder> + getDataStreamsFieldBuilder() { + if (dataStreamsBuilder_ == null) { + dataStreamsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.admin.v1beta.DataStream, + com.google.analytics.admin.v1beta.DataStream.Builder, + com.google.analytics.admin.v1beta.DataStreamOrBuilder>( + dataStreams_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + dataStreams_ = null; + } + return dataStreamsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + 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.admin.v1beta.ListDataStreamsResponse) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.ListDataStreamsResponse) + private static final com.google.analytics.admin.v1beta.ListDataStreamsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.ListDataStreamsResponse(); + } + + public static com.google.analytics.admin.v1beta.ListDataStreamsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListDataStreamsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListDataStreamsResponse(input, extensionRegistry); + } + }; + + 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.admin.v1beta.ListDataStreamsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListDataStreamsResponseOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListDataStreamsResponseOrBuilder.java new file mode 100644 index 000000000000..ac945433b90c --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListDataStreamsResponseOrBuilder.java @@ -0,0 +1,104 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +public interface ListDataStreamsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.ListDataStreamsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List of DataStreams.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.DataStream data_streams = 1; + */ + java.util.List getDataStreamsList(); + /** + * + * + *
+   * List of DataStreams.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.DataStream data_streams = 1; + */ + com.google.analytics.admin.v1beta.DataStream getDataStreams(int index); + /** + * + * + *
+   * List of DataStreams.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.DataStream data_streams = 1; + */ + int getDataStreamsCount(); + /** + * + * + *
+   * List of DataStreams.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.DataStream data_streams = 1; + */ + java.util.List + getDataStreamsOrBuilderList(); + /** + * + * + *
+   * List of DataStreams.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.DataStream data_streams = 1; + */ + com.google.analytics.admin.v1beta.DataStreamOrBuilder getDataStreamsOrBuilder(int index); + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListFirebaseLinksRequest.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListFirebaseLinksRequest.java new file mode 100644 index 000000000000..f4b2ed2cd0c9 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListFirebaseLinksRequest.java @@ -0,0 +1,962 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * Request message for ListFirebaseLinks RPC
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.ListFirebaseLinksRequest} + */ +public final class ListFirebaseLinksRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.ListFirebaseLinksRequest) + ListFirebaseLinksRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListFirebaseLinksRequest.newBuilder() to construct. + private ListFirebaseLinksRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListFirebaseLinksRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListFirebaseLinksRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListFirebaseLinksRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 16: + { + pageSize_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListFirebaseLinksRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListFirebaseLinksRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.ListFirebaseLinksRequest.class, + com.google.analytics.admin.v1beta.ListFirebaseLinksRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. Format: properties/{property_id}
+   * Example: properties/1234
+   * 
+ * + * + * 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. Format: properties/{property_id}
+   * Example: properties/1234
+   * 
+ * + * + * 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_; + /** + * + * + *
+   * The maximum number of resources to return. The service may return
+   * fewer than this value, even if there are additional pages.
+   * If unspecified, at most 50 resources will be returned.
+   * The maximum value is 200; (higher values will be coerced to the maximum)
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * A page token, received from a previous `ListFirebaseLinks` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListProperties` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @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; + } + } + /** + * + * + *
+   * A page token, received from a previous `ListFirebaseLinks` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListProperties` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @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_); + } + unknownFields.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 += unknownFields.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.admin.v1beta.ListFirebaseLinksRequest)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.ListFirebaseLinksRequest other = + (com.google.analytics.admin.v1beta.ListFirebaseLinksRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.ListFirebaseLinksRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ListFirebaseLinksRequest 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.admin.v1beta.ListFirebaseLinksRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ListFirebaseLinksRequest 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.admin.v1beta.ListFirebaseLinksRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ListFirebaseLinksRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.ListFirebaseLinksRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ListFirebaseLinksRequest 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.admin.v1beta.ListFirebaseLinksRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ListFirebaseLinksRequest 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.admin.v1beta.ListFirebaseLinksRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ListFirebaseLinksRequest 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.admin.v1beta.ListFirebaseLinksRequest 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; + } + /** + * + * + *
+   * Request message for ListFirebaseLinks RPC
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.ListFirebaseLinksRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.ListFirebaseLinksRequest) + com.google.analytics.admin.v1beta.ListFirebaseLinksRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListFirebaseLinksRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListFirebaseLinksRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.ListFirebaseLinksRequest.class, + com.google.analytics.admin.v1beta.ListFirebaseLinksRequest.Builder.class); + } + + // Construct using com.google.analytics.admin.v1beta.ListFirebaseLinksRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListFirebaseLinksRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ListFirebaseLinksRequest getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.ListFirebaseLinksRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ListFirebaseLinksRequest build() { + com.google.analytics.admin.v1beta.ListFirebaseLinksRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ListFirebaseLinksRequest buildPartial() { + com.google.analytics.admin.v1beta.ListFirebaseLinksRequest result = + new com.google.analytics.admin.v1beta.ListFirebaseLinksRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + @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.admin.v1beta.ListFirebaseLinksRequest) { + return mergeFrom((com.google.analytics.admin.v1beta.ListFirebaseLinksRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1beta.ListFirebaseLinksRequest other) { + if (other == com.google.analytics.admin.v1beta.ListFirebaseLinksRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.ListFirebaseLinksRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.ListFirebaseLinksRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Format: properties/{property_id}
+     * Example: properties/1234
+     * 
+ * + * + * 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. Format: properties/{property_id}
+     * Example: properties/1234
+     * 
+ * + * + * 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. Format: properties/{property_id}
+     * Example: properties/1234
+     * 
+ * + * + * 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; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format: properties/{property_id}
+     * Example: properties/1234
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format: properties/{property_id}
+     * Example: properties/1234
+     * 
+ * + * + * 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; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of resources to return. The service may return
+     * fewer than this value, even if there are additional pages.
+     * If unspecified, at most 50 resources will be returned.
+     * The maximum value is 200; (higher values will be coerced to the maximum)
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of resources to return. The service may return
+     * fewer than this value, even if there are additional pages.
+     * If unspecified, at most 50 resources will be returned.
+     * The maximum value is 200; (higher values will be coerced to the maximum)
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The maximum number of resources to return. The service may return
+     * fewer than this value, even if there are additional pages.
+     * If unspecified, at most 50 resources will be returned.
+     * The maximum value is 200; (higher values will be coerced to the maximum)
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A page token, received from a previous `ListFirebaseLinks` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListProperties` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @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; + } + } + /** + * + * + *
+     * A page token, received from a previous `ListFirebaseLinks` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListProperties` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @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; + } + } + /** + * + * + *
+     * A page token, received from a previous `ListFirebaseLinks` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListProperties` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @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; + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, received from a previous `ListFirebaseLinks` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListProperties` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, received from a previous `ListFirebaseLinks` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListProperties` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @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; + 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.admin.v1beta.ListFirebaseLinksRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.ListFirebaseLinksRequest) + private static final com.google.analytics.admin.v1beta.ListFirebaseLinksRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.ListFirebaseLinksRequest(); + } + + public static com.google.analytics.admin.v1beta.ListFirebaseLinksRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListFirebaseLinksRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListFirebaseLinksRequest(input, extensionRegistry); + } + }; + + 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.admin.v1beta.ListFirebaseLinksRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListFirebaseLinksRequestOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListFirebaseLinksRequestOrBuilder.java new file mode 100644 index 000000000000..1ec86b501dd5 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListFirebaseLinksRequestOrBuilder.java @@ -0,0 +1,103 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +public interface ListFirebaseLinksRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.ListFirebaseLinksRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Format: properties/{property_id}
+   * Example: properties/1234
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Format: properties/{property_id}
+   * Example: properties/1234
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The maximum number of resources to return. The service may return
+   * fewer than this value, even if there are additional pages.
+   * If unspecified, at most 50 resources will be returned.
+   * The maximum value is 200; (higher values will be coerced to the maximum)
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A page token, received from a previous `ListFirebaseLinks` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListProperties` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A page token, received from a previous `ListFirebaseLinks` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListProperties` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListFirebaseLinksResponse.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListFirebaseLinksResponse.java new file mode 100644 index 000000000000..7f6e6f033682 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListFirebaseLinksResponse.java @@ -0,0 +1,1164 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * Response message for ListFirebaseLinks RPC
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.ListFirebaseLinksResponse} + */ +public final class ListFirebaseLinksResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.ListFirebaseLinksResponse) + ListFirebaseLinksResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListFirebaseLinksResponse.newBuilder() to construct. + private ListFirebaseLinksResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListFirebaseLinksResponse() { + firebaseLinks_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListFirebaseLinksResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListFirebaseLinksResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + firebaseLinks_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + firebaseLinks_.add( + input.readMessage( + com.google.analytics.admin.v1beta.FirebaseLink.parser(), extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + firebaseLinks_ = java.util.Collections.unmodifiableList(firebaseLinks_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListFirebaseLinksResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListFirebaseLinksResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.ListFirebaseLinksResponse.class, + com.google.analytics.admin.v1beta.ListFirebaseLinksResponse.Builder.class); + } + + public static final int FIREBASE_LINKS_FIELD_NUMBER = 1; + private java.util.List firebaseLinks_; + /** + * + * + *
+   * List of FirebaseLinks. This will have at most one value.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.FirebaseLink firebase_links = 1; + */ + @java.lang.Override + public java.util.List getFirebaseLinksList() { + return firebaseLinks_; + } + /** + * + * + *
+   * List of FirebaseLinks. This will have at most one value.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.FirebaseLink firebase_links = 1; + */ + @java.lang.Override + public java.util.List + getFirebaseLinksOrBuilderList() { + return firebaseLinks_; + } + /** + * + * + *
+   * List of FirebaseLinks. This will have at most one value.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.FirebaseLink firebase_links = 1; + */ + @java.lang.Override + public int getFirebaseLinksCount() { + return firebaseLinks_.size(); + } + /** + * + * + *
+   * List of FirebaseLinks. This will have at most one value.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.FirebaseLink firebase_links = 1; + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.FirebaseLink getFirebaseLinks(int index) { + return firebaseLinks_.get(index); + } + /** + * + * + *
+   * List of FirebaseLinks. This will have at most one value.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.FirebaseLink firebase_links = 1; + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.FirebaseLinkOrBuilder getFirebaseLinksOrBuilder( + int index) { + return firebaseLinks_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + 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.
+   * Currently, Google Analytics supports only one FirebaseLink per property,
+   * so this will never be populated.
+   * 
+ * + * 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.
+   * Currently, Google Analytics supports only one FirebaseLink per property,
+   * so this will never be populated.
+   * 
+ * + * 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 < firebaseLinks_.size(); i++) { + output.writeMessage(1, firebaseLinks_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < firebaseLinks_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, firebaseLinks_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.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.admin.v1beta.ListFirebaseLinksResponse)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.ListFirebaseLinksResponse other = + (com.google.analytics.admin.v1beta.ListFirebaseLinksResponse) obj; + + if (!getFirebaseLinksList().equals(other.getFirebaseLinksList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getFirebaseLinksCount() > 0) { + hash = (37 * hash) + FIREBASE_LINKS_FIELD_NUMBER; + hash = (53 * hash) + getFirebaseLinksList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.ListFirebaseLinksResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ListFirebaseLinksResponse 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.admin.v1beta.ListFirebaseLinksResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ListFirebaseLinksResponse 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.admin.v1beta.ListFirebaseLinksResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ListFirebaseLinksResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.ListFirebaseLinksResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ListFirebaseLinksResponse 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.admin.v1beta.ListFirebaseLinksResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ListFirebaseLinksResponse 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.admin.v1beta.ListFirebaseLinksResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ListFirebaseLinksResponse 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.admin.v1beta.ListFirebaseLinksResponse 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; + } + /** + * + * + *
+   * Response message for ListFirebaseLinks RPC
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.ListFirebaseLinksResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.ListFirebaseLinksResponse) + com.google.analytics.admin.v1beta.ListFirebaseLinksResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListFirebaseLinksResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListFirebaseLinksResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.ListFirebaseLinksResponse.class, + com.google.analytics.admin.v1beta.ListFirebaseLinksResponse.Builder.class); + } + + // Construct using com.google.analytics.admin.v1beta.ListFirebaseLinksResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getFirebaseLinksFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (firebaseLinksBuilder_ == null) { + firebaseLinks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + firebaseLinksBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListFirebaseLinksResponse_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ListFirebaseLinksResponse getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.ListFirebaseLinksResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ListFirebaseLinksResponse build() { + com.google.analytics.admin.v1beta.ListFirebaseLinksResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ListFirebaseLinksResponse buildPartial() { + com.google.analytics.admin.v1beta.ListFirebaseLinksResponse result = + new com.google.analytics.admin.v1beta.ListFirebaseLinksResponse(this); + int from_bitField0_ = bitField0_; + if (firebaseLinksBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + firebaseLinks_ = java.util.Collections.unmodifiableList(firebaseLinks_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.firebaseLinks_ = firebaseLinks_; + } else { + result.firebaseLinks_ = firebaseLinksBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @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.admin.v1beta.ListFirebaseLinksResponse) { + return mergeFrom((com.google.analytics.admin.v1beta.ListFirebaseLinksResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1beta.ListFirebaseLinksResponse other) { + if (other == com.google.analytics.admin.v1beta.ListFirebaseLinksResponse.getDefaultInstance()) + return this; + if (firebaseLinksBuilder_ == null) { + if (!other.firebaseLinks_.isEmpty()) { + if (firebaseLinks_.isEmpty()) { + firebaseLinks_ = other.firebaseLinks_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFirebaseLinksIsMutable(); + firebaseLinks_.addAll(other.firebaseLinks_); + } + onChanged(); + } + } else { + if (!other.firebaseLinks_.isEmpty()) { + if (firebaseLinksBuilder_.isEmpty()) { + firebaseLinksBuilder_.dispose(); + firebaseLinksBuilder_ = null; + firebaseLinks_ = other.firebaseLinks_; + bitField0_ = (bitField0_ & ~0x00000001); + firebaseLinksBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getFirebaseLinksFieldBuilder() + : null; + } else { + firebaseLinksBuilder_.addAllMessages(other.firebaseLinks_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.ListFirebaseLinksResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.ListFirebaseLinksResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List firebaseLinks_ = + java.util.Collections.emptyList(); + + private void ensureFirebaseLinksIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + firebaseLinks_ = + new java.util.ArrayList(firebaseLinks_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.admin.v1beta.FirebaseLink, + com.google.analytics.admin.v1beta.FirebaseLink.Builder, + com.google.analytics.admin.v1beta.FirebaseLinkOrBuilder> + firebaseLinksBuilder_; + + /** + * + * + *
+     * List of FirebaseLinks. This will have at most one value.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.FirebaseLink firebase_links = 1; + */ + public java.util.List getFirebaseLinksList() { + if (firebaseLinksBuilder_ == null) { + return java.util.Collections.unmodifiableList(firebaseLinks_); + } else { + return firebaseLinksBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of FirebaseLinks. This will have at most one value.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.FirebaseLink firebase_links = 1; + */ + public int getFirebaseLinksCount() { + if (firebaseLinksBuilder_ == null) { + return firebaseLinks_.size(); + } else { + return firebaseLinksBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of FirebaseLinks. This will have at most one value.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.FirebaseLink firebase_links = 1; + */ + public com.google.analytics.admin.v1beta.FirebaseLink getFirebaseLinks(int index) { + if (firebaseLinksBuilder_ == null) { + return firebaseLinks_.get(index); + } else { + return firebaseLinksBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of FirebaseLinks. This will have at most one value.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.FirebaseLink firebase_links = 1; + */ + public Builder setFirebaseLinks( + int index, com.google.analytics.admin.v1beta.FirebaseLink value) { + if (firebaseLinksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFirebaseLinksIsMutable(); + firebaseLinks_.set(index, value); + onChanged(); + } else { + firebaseLinksBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of FirebaseLinks. This will have at most one value.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.FirebaseLink firebase_links = 1; + */ + public Builder setFirebaseLinks( + int index, com.google.analytics.admin.v1beta.FirebaseLink.Builder builderForValue) { + if (firebaseLinksBuilder_ == null) { + ensureFirebaseLinksIsMutable(); + firebaseLinks_.set(index, builderForValue.build()); + onChanged(); + } else { + firebaseLinksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of FirebaseLinks. This will have at most one value.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.FirebaseLink firebase_links = 1; + */ + public Builder addFirebaseLinks(com.google.analytics.admin.v1beta.FirebaseLink value) { + if (firebaseLinksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFirebaseLinksIsMutable(); + firebaseLinks_.add(value); + onChanged(); + } else { + firebaseLinksBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of FirebaseLinks. This will have at most one value.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.FirebaseLink firebase_links = 1; + */ + public Builder addFirebaseLinks( + int index, com.google.analytics.admin.v1beta.FirebaseLink value) { + if (firebaseLinksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFirebaseLinksIsMutable(); + firebaseLinks_.add(index, value); + onChanged(); + } else { + firebaseLinksBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of FirebaseLinks. This will have at most one value.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.FirebaseLink firebase_links = 1; + */ + public Builder addFirebaseLinks( + com.google.analytics.admin.v1beta.FirebaseLink.Builder builderForValue) { + if (firebaseLinksBuilder_ == null) { + ensureFirebaseLinksIsMutable(); + firebaseLinks_.add(builderForValue.build()); + onChanged(); + } else { + firebaseLinksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of FirebaseLinks. This will have at most one value.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.FirebaseLink firebase_links = 1; + */ + public Builder addFirebaseLinks( + int index, com.google.analytics.admin.v1beta.FirebaseLink.Builder builderForValue) { + if (firebaseLinksBuilder_ == null) { + ensureFirebaseLinksIsMutable(); + firebaseLinks_.add(index, builderForValue.build()); + onChanged(); + } else { + firebaseLinksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of FirebaseLinks. This will have at most one value.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.FirebaseLink firebase_links = 1; + */ + public Builder addAllFirebaseLinks( + java.lang.Iterable values) { + if (firebaseLinksBuilder_ == null) { + ensureFirebaseLinksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, firebaseLinks_); + onChanged(); + } else { + firebaseLinksBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of FirebaseLinks. This will have at most one value.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.FirebaseLink firebase_links = 1; + */ + public Builder clearFirebaseLinks() { + if (firebaseLinksBuilder_ == null) { + firebaseLinks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + firebaseLinksBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of FirebaseLinks. This will have at most one value.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.FirebaseLink firebase_links = 1; + */ + public Builder removeFirebaseLinks(int index) { + if (firebaseLinksBuilder_ == null) { + ensureFirebaseLinksIsMutable(); + firebaseLinks_.remove(index); + onChanged(); + } else { + firebaseLinksBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of FirebaseLinks. This will have at most one value.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.FirebaseLink firebase_links = 1; + */ + public com.google.analytics.admin.v1beta.FirebaseLink.Builder getFirebaseLinksBuilder( + int index) { + return getFirebaseLinksFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of FirebaseLinks. This will have at most one value.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.FirebaseLink firebase_links = 1; + */ + public com.google.analytics.admin.v1beta.FirebaseLinkOrBuilder getFirebaseLinksOrBuilder( + int index) { + if (firebaseLinksBuilder_ == null) { + return firebaseLinks_.get(index); + } else { + return firebaseLinksBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of FirebaseLinks. This will have at most one value.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.FirebaseLink firebase_links = 1; + */ + public java.util.List + getFirebaseLinksOrBuilderList() { + if (firebaseLinksBuilder_ != null) { + return firebaseLinksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(firebaseLinks_); + } + } + /** + * + * + *
+     * List of FirebaseLinks. This will have at most one value.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.FirebaseLink firebase_links = 1; + */ + public com.google.analytics.admin.v1beta.FirebaseLink.Builder addFirebaseLinksBuilder() { + return getFirebaseLinksFieldBuilder() + .addBuilder(com.google.analytics.admin.v1beta.FirebaseLink.getDefaultInstance()); + } + /** + * + * + *
+     * List of FirebaseLinks. This will have at most one value.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.FirebaseLink firebase_links = 1; + */ + public com.google.analytics.admin.v1beta.FirebaseLink.Builder addFirebaseLinksBuilder( + int index) { + return getFirebaseLinksFieldBuilder() + .addBuilder(index, com.google.analytics.admin.v1beta.FirebaseLink.getDefaultInstance()); + } + /** + * + * + *
+     * List of FirebaseLinks. This will have at most one value.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.FirebaseLink firebase_links = 1; + */ + public java.util.List + getFirebaseLinksBuilderList() { + return getFirebaseLinksFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.admin.v1beta.FirebaseLink, + com.google.analytics.admin.v1beta.FirebaseLink.Builder, + com.google.analytics.admin.v1beta.FirebaseLinkOrBuilder> + getFirebaseLinksFieldBuilder() { + if (firebaseLinksBuilder_ == null) { + firebaseLinksBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.admin.v1beta.FirebaseLink, + com.google.analytics.admin.v1beta.FirebaseLink.Builder, + com.google.analytics.admin.v1beta.FirebaseLinkOrBuilder>( + firebaseLinks_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + firebaseLinks_ = null; + } + return firebaseLinksBuilder_; + } + + 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.
+     * Currently, Google Analytics supports only one FirebaseLink per property,
+     * so this will never be populated.
+     * 
+ * + * 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.
+     * Currently, Google Analytics supports only one FirebaseLink per property,
+     * so this will never be populated.
+     * 
+ * + * 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.
+     * Currently, Google Analytics supports only one FirebaseLink per property,
+     * so this will never be populated.
+     * 
+ * + * 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; + 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.
+     * Currently, Google Analytics supports only one FirebaseLink per property,
+     * so this will never be populated.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + 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.
+     * Currently, Google Analytics supports only one FirebaseLink per property,
+     * so this will never be populated.
+     * 
+ * + * 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; + 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.admin.v1beta.ListFirebaseLinksResponse) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.ListFirebaseLinksResponse) + private static final com.google.analytics.admin.v1beta.ListFirebaseLinksResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.ListFirebaseLinksResponse(); + } + + public static com.google.analytics.admin.v1beta.ListFirebaseLinksResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListFirebaseLinksResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListFirebaseLinksResponse(input, extensionRegistry); + } + }; + + 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.admin.v1beta.ListFirebaseLinksResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListFirebaseLinksResponseOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListFirebaseLinksResponseOrBuilder.java new file mode 100644 index 000000000000..6a331f619f12 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListFirebaseLinksResponseOrBuilder.java @@ -0,0 +1,108 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +public interface ListFirebaseLinksResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.ListFirebaseLinksResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List of FirebaseLinks. This will have at most one value.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.FirebaseLink firebase_links = 1; + */ + java.util.List getFirebaseLinksList(); + /** + * + * + *
+   * List of FirebaseLinks. This will have at most one value.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.FirebaseLink firebase_links = 1; + */ + com.google.analytics.admin.v1beta.FirebaseLink getFirebaseLinks(int index); + /** + * + * + *
+   * List of FirebaseLinks. This will have at most one value.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.FirebaseLink firebase_links = 1; + */ + int getFirebaseLinksCount(); + /** + * + * + *
+   * List of FirebaseLinks. This will have at most one value.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.FirebaseLink firebase_links = 1; + */ + java.util.List + getFirebaseLinksOrBuilderList(); + /** + * + * + *
+   * List of FirebaseLinks. This will have at most one value.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.FirebaseLink firebase_links = 1; + */ + com.google.analytics.admin.v1beta.FirebaseLinkOrBuilder getFirebaseLinksOrBuilder(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.
+   * Currently, Google Analytics supports only one FirebaseLink per property,
+   * so this will never be populated.
+   * 
+ * + * 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.
+   * Currently, Google Analytics supports only one FirebaseLink per property,
+   * so this will never be populated.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListGoogleAdsLinksRequest.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListGoogleAdsLinksRequest.java new file mode 100644 index 000000000000..fb876dfd3e2a --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListGoogleAdsLinksRequest.java @@ -0,0 +1,951 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * Request message for ListGoogleAdsLinks RPC.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.ListGoogleAdsLinksRequest} + */ +public final class ListGoogleAdsLinksRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.ListGoogleAdsLinksRequest) + ListGoogleAdsLinksRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListGoogleAdsLinksRequest.newBuilder() to construct. + private ListGoogleAdsLinksRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListGoogleAdsLinksRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListGoogleAdsLinksRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListGoogleAdsLinksRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 16: + { + pageSize_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListGoogleAdsLinksRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListGoogleAdsLinksRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest.class, + com.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. Example format: properties/1234
+   * 
+ * + * + * 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. Example format: properties/1234
+   * 
+ * + * + * 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_; + /** + * + * + *
+   * The maximum number of resources to return.
+   * If unspecified, at most 50 resources will be returned.
+   * The maximum value is 200 (higher values will be coerced to the maximum).
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * A page token, received from a previous `ListGoogleAdsLinks` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListGoogleAdsLinks` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @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; + } + } + /** + * + * + *
+   * A page token, received from a previous `ListGoogleAdsLinks` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListGoogleAdsLinks` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @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_); + } + unknownFields.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 += unknownFields.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.admin.v1beta.ListGoogleAdsLinksRequest)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest other = + (com.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest 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.admin.v1beta.ListGoogleAdsLinksRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest 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.admin.v1beta.ListGoogleAdsLinksRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest 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.admin.v1beta.ListGoogleAdsLinksRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest 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.admin.v1beta.ListGoogleAdsLinksRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest 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.admin.v1beta.ListGoogleAdsLinksRequest 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; + } + /** + * + * + *
+   * Request message for ListGoogleAdsLinks RPC.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.ListGoogleAdsLinksRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.ListGoogleAdsLinksRequest) + com.google.analytics.admin.v1beta.ListGoogleAdsLinksRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListGoogleAdsLinksRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListGoogleAdsLinksRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest.class, + com.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest.Builder.class); + } + + // Construct using com.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListGoogleAdsLinksRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest build() { + com.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest buildPartial() { + com.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest result = + new com.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + @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.admin.v1beta.ListGoogleAdsLinksRequest) { + return mergeFrom((com.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest other) { + if (other == com.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Example format: properties/1234
+     * 
+ * + * + * 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. Example format: properties/1234
+     * 
+ * + * + * 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. Example format: properties/1234
+     * 
+ * + * + * 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; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Example format: properties/1234
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Example format: properties/1234
+     * 
+ * + * + * 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; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of resources to return.
+     * If unspecified, at most 50 resources will be returned.
+     * The maximum value is 200 (higher values will be coerced to the maximum).
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of resources to return.
+     * If unspecified, at most 50 resources will be returned.
+     * The maximum value is 200 (higher values will be coerced to the maximum).
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The maximum number of resources to return.
+     * If unspecified, at most 50 resources will be returned.
+     * The maximum value is 200 (higher values will be coerced to the maximum).
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A page token, received from a previous `ListGoogleAdsLinks` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListGoogleAdsLinks` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @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; + } + } + /** + * + * + *
+     * A page token, received from a previous `ListGoogleAdsLinks` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListGoogleAdsLinks` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @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; + } + } + /** + * + * + *
+     * A page token, received from a previous `ListGoogleAdsLinks` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListGoogleAdsLinks` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @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; + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, received from a previous `ListGoogleAdsLinks` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListGoogleAdsLinks` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, received from a previous `ListGoogleAdsLinks` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListGoogleAdsLinks` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @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; + 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.admin.v1beta.ListGoogleAdsLinksRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.ListGoogleAdsLinksRequest) + private static final com.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest(); + } + + public static com.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListGoogleAdsLinksRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListGoogleAdsLinksRequest(input, extensionRegistry); + } + }; + + 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.admin.v1beta.ListGoogleAdsLinksRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListGoogleAdsLinksRequestOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListGoogleAdsLinksRequestOrBuilder.java new file mode 100644 index 000000000000..5eb2f6f9ff18 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListGoogleAdsLinksRequestOrBuilder.java @@ -0,0 +1,100 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +public interface ListGoogleAdsLinksRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.ListGoogleAdsLinksRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Example format: properties/1234
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Example format: properties/1234
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The maximum number of resources to return.
+   * If unspecified, at most 50 resources will be returned.
+   * The maximum value is 200 (higher values will be coerced to the maximum).
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A page token, received from a previous `ListGoogleAdsLinks` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListGoogleAdsLinks` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A page token, received from a previous `ListGoogleAdsLinks` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListGoogleAdsLinks` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListGoogleAdsLinksResponse.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListGoogleAdsLinksResponse.java new file mode 100644 index 000000000000..a706101338fc --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListGoogleAdsLinksResponse.java @@ -0,0 +1,1154 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * Response message for ListGoogleAdsLinks RPC.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.ListGoogleAdsLinksResponse} + */ +public final class ListGoogleAdsLinksResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.ListGoogleAdsLinksResponse) + ListGoogleAdsLinksResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListGoogleAdsLinksResponse.newBuilder() to construct. + private ListGoogleAdsLinksResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListGoogleAdsLinksResponse() { + googleAdsLinks_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListGoogleAdsLinksResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListGoogleAdsLinksResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + googleAdsLinks_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + googleAdsLinks_.add( + input.readMessage( + com.google.analytics.admin.v1beta.GoogleAdsLink.parser(), extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + googleAdsLinks_ = java.util.Collections.unmodifiableList(googleAdsLinks_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListGoogleAdsLinksResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListGoogleAdsLinksResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.ListGoogleAdsLinksResponse.class, + com.google.analytics.admin.v1beta.ListGoogleAdsLinksResponse.Builder.class); + } + + public static final int GOOGLE_ADS_LINKS_FIELD_NUMBER = 1; + private java.util.List googleAdsLinks_; + /** + * + * + *
+   * List of GoogleAdsLinks.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.GoogleAdsLink google_ads_links = 1; + */ + @java.lang.Override + public java.util.List getGoogleAdsLinksList() { + return googleAdsLinks_; + } + /** + * + * + *
+   * List of GoogleAdsLinks.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.GoogleAdsLink google_ads_links = 1; + */ + @java.lang.Override + public java.util.List + getGoogleAdsLinksOrBuilderList() { + return googleAdsLinks_; + } + /** + * + * + *
+   * List of GoogleAdsLinks.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.GoogleAdsLink google_ads_links = 1; + */ + @java.lang.Override + public int getGoogleAdsLinksCount() { + return googleAdsLinks_.size(); + } + /** + * + * + *
+   * List of GoogleAdsLinks.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.GoogleAdsLink google_ads_links = 1; + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.GoogleAdsLink getGoogleAdsLinks(int index) { + return googleAdsLinks_.get(index); + } + /** + * + * + *
+   * List of GoogleAdsLinks.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.GoogleAdsLink google_ads_links = 1; + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.GoogleAdsLinkOrBuilder getGoogleAdsLinksOrBuilder( + int index) { + return googleAdsLinks_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < googleAdsLinks_.size(); i++) { + output.writeMessage(1, googleAdsLinks_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < googleAdsLinks_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, googleAdsLinks_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.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.admin.v1beta.ListGoogleAdsLinksResponse)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.ListGoogleAdsLinksResponse other = + (com.google.analytics.admin.v1beta.ListGoogleAdsLinksResponse) obj; + + if (!getGoogleAdsLinksList().equals(other.getGoogleAdsLinksList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getGoogleAdsLinksCount() > 0) { + hash = (37 * hash) + GOOGLE_ADS_LINKS_FIELD_NUMBER; + hash = (53 * hash) + getGoogleAdsLinksList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.ListGoogleAdsLinksResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ListGoogleAdsLinksResponse 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.admin.v1beta.ListGoogleAdsLinksResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ListGoogleAdsLinksResponse 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.admin.v1beta.ListGoogleAdsLinksResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ListGoogleAdsLinksResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.ListGoogleAdsLinksResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ListGoogleAdsLinksResponse 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.admin.v1beta.ListGoogleAdsLinksResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ListGoogleAdsLinksResponse 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.admin.v1beta.ListGoogleAdsLinksResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ListGoogleAdsLinksResponse 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.admin.v1beta.ListGoogleAdsLinksResponse 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; + } + /** + * + * + *
+   * Response message for ListGoogleAdsLinks RPC.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.ListGoogleAdsLinksResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.ListGoogleAdsLinksResponse) + com.google.analytics.admin.v1beta.ListGoogleAdsLinksResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListGoogleAdsLinksResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListGoogleAdsLinksResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.ListGoogleAdsLinksResponse.class, + com.google.analytics.admin.v1beta.ListGoogleAdsLinksResponse.Builder.class); + } + + // Construct using com.google.analytics.admin.v1beta.ListGoogleAdsLinksResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getGoogleAdsLinksFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (googleAdsLinksBuilder_ == null) { + googleAdsLinks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + googleAdsLinksBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListGoogleAdsLinksResponse_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ListGoogleAdsLinksResponse + getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.ListGoogleAdsLinksResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ListGoogleAdsLinksResponse build() { + com.google.analytics.admin.v1beta.ListGoogleAdsLinksResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ListGoogleAdsLinksResponse buildPartial() { + com.google.analytics.admin.v1beta.ListGoogleAdsLinksResponse result = + new com.google.analytics.admin.v1beta.ListGoogleAdsLinksResponse(this); + int from_bitField0_ = bitField0_; + if (googleAdsLinksBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + googleAdsLinks_ = java.util.Collections.unmodifiableList(googleAdsLinks_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.googleAdsLinks_ = googleAdsLinks_; + } else { + result.googleAdsLinks_ = googleAdsLinksBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @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.admin.v1beta.ListGoogleAdsLinksResponse) { + return mergeFrom((com.google.analytics.admin.v1beta.ListGoogleAdsLinksResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1beta.ListGoogleAdsLinksResponse other) { + if (other + == com.google.analytics.admin.v1beta.ListGoogleAdsLinksResponse.getDefaultInstance()) + return this; + if (googleAdsLinksBuilder_ == null) { + if (!other.googleAdsLinks_.isEmpty()) { + if (googleAdsLinks_.isEmpty()) { + googleAdsLinks_ = other.googleAdsLinks_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureGoogleAdsLinksIsMutable(); + googleAdsLinks_.addAll(other.googleAdsLinks_); + } + onChanged(); + } + } else { + if (!other.googleAdsLinks_.isEmpty()) { + if (googleAdsLinksBuilder_.isEmpty()) { + googleAdsLinksBuilder_.dispose(); + googleAdsLinksBuilder_ = null; + googleAdsLinks_ = other.googleAdsLinks_; + bitField0_ = (bitField0_ & ~0x00000001); + googleAdsLinksBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getGoogleAdsLinksFieldBuilder() + : null; + } else { + googleAdsLinksBuilder_.addAllMessages(other.googleAdsLinks_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.ListGoogleAdsLinksResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.ListGoogleAdsLinksResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List googleAdsLinks_ = + java.util.Collections.emptyList(); + + private void ensureGoogleAdsLinksIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + googleAdsLinks_ = + new java.util.ArrayList( + googleAdsLinks_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.admin.v1beta.GoogleAdsLink, + com.google.analytics.admin.v1beta.GoogleAdsLink.Builder, + com.google.analytics.admin.v1beta.GoogleAdsLinkOrBuilder> + googleAdsLinksBuilder_; + + /** + * + * + *
+     * List of GoogleAdsLinks.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.GoogleAdsLink google_ads_links = 1; + */ + public java.util.List getGoogleAdsLinksList() { + if (googleAdsLinksBuilder_ == null) { + return java.util.Collections.unmodifiableList(googleAdsLinks_); + } else { + return googleAdsLinksBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of GoogleAdsLinks.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.GoogleAdsLink google_ads_links = 1; + */ + public int getGoogleAdsLinksCount() { + if (googleAdsLinksBuilder_ == null) { + return googleAdsLinks_.size(); + } else { + return googleAdsLinksBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of GoogleAdsLinks.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.GoogleAdsLink google_ads_links = 1; + */ + public com.google.analytics.admin.v1beta.GoogleAdsLink getGoogleAdsLinks(int index) { + if (googleAdsLinksBuilder_ == null) { + return googleAdsLinks_.get(index); + } else { + return googleAdsLinksBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of GoogleAdsLinks.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.GoogleAdsLink google_ads_links = 1; + */ + public Builder setGoogleAdsLinks( + int index, com.google.analytics.admin.v1beta.GoogleAdsLink value) { + if (googleAdsLinksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGoogleAdsLinksIsMutable(); + googleAdsLinks_.set(index, value); + onChanged(); + } else { + googleAdsLinksBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of GoogleAdsLinks.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.GoogleAdsLink google_ads_links = 1; + */ + public Builder setGoogleAdsLinks( + int index, com.google.analytics.admin.v1beta.GoogleAdsLink.Builder builderForValue) { + if (googleAdsLinksBuilder_ == null) { + ensureGoogleAdsLinksIsMutable(); + googleAdsLinks_.set(index, builderForValue.build()); + onChanged(); + } else { + googleAdsLinksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of GoogleAdsLinks.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.GoogleAdsLink google_ads_links = 1; + */ + public Builder addGoogleAdsLinks(com.google.analytics.admin.v1beta.GoogleAdsLink value) { + if (googleAdsLinksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGoogleAdsLinksIsMutable(); + googleAdsLinks_.add(value); + onChanged(); + } else { + googleAdsLinksBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of GoogleAdsLinks.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.GoogleAdsLink google_ads_links = 1; + */ + public Builder addGoogleAdsLinks( + int index, com.google.analytics.admin.v1beta.GoogleAdsLink value) { + if (googleAdsLinksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGoogleAdsLinksIsMutable(); + googleAdsLinks_.add(index, value); + onChanged(); + } else { + googleAdsLinksBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of GoogleAdsLinks.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.GoogleAdsLink google_ads_links = 1; + */ + public Builder addGoogleAdsLinks( + com.google.analytics.admin.v1beta.GoogleAdsLink.Builder builderForValue) { + if (googleAdsLinksBuilder_ == null) { + ensureGoogleAdsLinksIsMutable(); + googleAdsLinks_.add(builderForValue.build()); + onChanged(); + } else { + googleAdsLinksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of GoogleAdsLinks.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.GoogleAdsLink google_ads_links = 1; + */ + public Builder addGoogleAdsLinks( + int index, com.google.analytics.admin.v1beta.GoogleAdsLink.Builder builderForValue) { + if (googleAdsLinksBuilder_ == null) { + ensureGoogleAdsLinksIsMutable(); + googleAdsLinks_.add(index, builderForValue.build()); + onChanged(); + } else { + googleAdsLinksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of GoogleAdsLinks.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.GoogleAdsLink google_ads_links = 1; + */ + public Builder addAllGoogleAdsLinks( + java.lang.Iterable values) { + if (googleAdsLinksBuilder_ == null) { + ensureGoogleAdsLinksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, googleAdsLinks_); + onChanged(); + } else { + googleAdsLinksBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of GoogleAdsLinks.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.GoogleAdsLink google_ads_links = 1; + */ + public Builder clearGoogleAdsLinks() { + if (googleAdsLinksBuilder_ == null) { + googleAdsLinks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + googleAdsLinksBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of GoogleAdsLinks.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.GoogleAdsLink google_ads_links = 1; + */ + public Builder removeGoogleAdsLinks(int index) { + if (googleAdsLinksBuilder_ == null) { + ensureGoogleAdsLinksIsMutable(); + googleAdsLinks_.remove(index); + onChanged(); + } else { + googleAdsLinksBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of GoogleAdsLinks.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.GoogleAdsLink google_ads_links = 1; + */ + public com.google.analytics.admin.v1beta.GoogleAdsLink.Builder getGoogleAdsLinksBuilder( + int index) { + return getGoogleAdsLinksFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of GoogleAdsLinks.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.GoogleAdsLink google_ads_links = 1; + */ + public com.google.analytics.admin.v1beta.GoogleAdsLinkOrBuilder getGoogleAdsLinksOrBuilder( + int index) { + if (googleAdsLinksBuilder_ == null) { + return googleAdsLinks_.get(index); + } else { + return googleAdsLinksBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of GoogleAdsLinks.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.GoogleAdsLink google_ads_links = 1; + */ + public java.util.List + getGoogleAdsLinksOrBuilderList() { + if (googleAdsLinksBuilder_ != null) { + return googleAdsLinksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(googleAdsLinks_); + } + } + /** + * + * + *
+     * List of GoogleAdsLinks.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.GoogleAdsLink google_ads_links = 1; + */ + public com.google.analytics.admin.v1beta.GoogleAdsLink.Builder addGoogleAdsLinksBuilder() { + return getGoogleAdsLinksFieldBuilder() + .addBuilder(com.google.analytics.admin.v1beta.GoogleAdsLink.getDefaultInstance()); + } + /** + * + * + *
+     * List of GoogleAdsLinks.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.GoogleAdsLink google_ads_links = 1; + */ + public com.google.analytics.admin.v1beta.GoogleAdsLink.Builder addGoogleAdsLinksBuilder( + int index) { + return getGoogleAdsLinksFieldBuilder() + .addBuilder(index, com.google.analytics.admin.v1beta.GoogleAdsLink.getDefaultInstance()); + } + /** + * + * + *
+     * List of GoogleAdsLinks.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.GoogleAdsLink google_ads_links = 1; + */ + public java.util.List + getGoogleAdsLinksBuilderList() { + return getGoogleAdsLinksFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.admin.v1beta.GoogleAdsLink, + com.google.analytics.admin.v1beta.GoogleAdsLink.Builder, + com.google.analytics.admin.v1beta.GoogleAdsLinkOrBuilder> + getGoogleAdsLinksFieldBuilder() { + if (googleAdsLinksBuilder_ == null) { + googleAdsLinksBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.admin.v1beta.GoogleAdsLink, + com.google.analytics.admin.v1beta.GoogleAdsLink.Builder, + com.google.analytics.admin.v1beta.GoogleAdsLinkOrBuilder>( + googleAdsLinks_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + googleAdsLinks_ = null; + } + return googleAdsLinksBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + 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.admin.v1beta.ListGoogleAdsLinksResponse) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.ListGoogleAdsLinksResponse) + private static final com.google.analytics.admin.v1beta.ListGoogleAdsLinksResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.ListGoogleAdsLinksResponse(); + } + + public static com.google.analytics.admin.v1beta.ListGoogleAdsLinksResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListGoogleAdsLinksResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListGoogleAdsLinksResponse(input, extensionRegistry); + } + }; + + 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.admin.v1beta.ListGoogleAdsLinksResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListGoogleAdsLinksResponseOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListGoogleAdsLinksResponseOrBuilder.java new file mode 100644 index 000000000000..1eefa5c0c0c5 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListGoogleAdsLinksResponseOrBuilder.java @@ -0,0 +1,104 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +public interface ListGoogleAdsLinksResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.ListGoogleAdsLinksResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List of GoogleAdsLinks.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.GoogleAdsLink google_ads_links = 1; + */ + java.util.List getGoogleAdsLinksList(); + /** + * + * + *
+   * List of GoogleAdsLinks.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.GoogleAdsLink google_ads_links = 1; + */ + com.google.analytics.admin.v1beta.GoogleAdsLink getGoogleAdsLinks(int index); + /** + * + * + *
+   * List of GoogleAdsLinks.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.GoogleAdsLink google_ads_links = 1; + */ + int getGoogleAdsLinksCount(); + /** + * + * + *
+   * List of GoogleAdsLinks.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.GoogleAdsLink google_ads_links = 1; + */ + java.util.List + getGoogleAdsLinksOrBuilderList(); + /** + * + * + *
+   * List of GoogleAdsLinks.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.GoogleAdsLink google_ads_links = 1; + */ + com.google.analytics.admin.v1beta.GoogleAdsLinkOrBuilder getGoogleAdsLinksOrBuilder(int index); + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListMeasurementProtocolSecretsRequest.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListMeasurementProtocolSecretsRequest.java new file mode 100644 index 000000000000..80bbf3d8f055 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListMeasurementProtocolSecretsRequest.java @@ -0,0 +1,982 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * Request message for ListMeasurementProtocolSecret RPC
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest} + */ +public final class ListMeasurementProtocolSecretsRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest) + ListMeasurementProtocolSecretsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListMeasurementProtocolSecretsRequest.newBuilder() to construct. + private ListMeasurementProtocolSecretsRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListMeasurementProtocolSecretsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListMeasurementProtocolSecretsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListMeasurementProtocolSecretsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 16: + { + pageSize_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListMeasurementProtocolSecretsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListMeasurementProtocolSecretsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest.class, + com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The resource name of the parent stream.
+   * Format:
+   * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets
+   * 
+ * + * + * 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 resource name of the parent stream.
+   * Format:
+   * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets
+   * 
+ * + * + * 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_; + /** + * + * + *
+   * The maximum number of resources to return.
+   * If unspecified, at most 10 resources will be returned.
+   * The maximum value is 10. Higher values will be coerced to the maximum.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * A page token, received from a previous `ListMeasurementProtocolSecrets`
+   * call. Provide this to retrieve the subsequent page. When paginating, all
+   * other parameters provided to `ListMeasurementProtocolSecrets` must match
+   * the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @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; + } + } + /** + * + * + *
+   * A page token, received from a previous `ListMeasurementProtocolSecrets`
+   * call. Provide this to retrieve the subsequent page. When paginating, all
+   * other parameters provided to `ListMeasurementProtocolSecrets` must match
+   * the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @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_); + } + unknownFields.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 += unknownFields.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.admin.v1beta.ListMeasurementProtocolSecretsRequest)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest other = + (com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest 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.admin.v1beta.ListMeasurementProtocolSecretsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest 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.admin.v1beta.ListMeasurementProtocolSecretsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest 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.admin.v1beta.ListMeasurementProtocolSecretsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest + 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.admin.v1beta.ListMeasurementProtocolSecretsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest 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.admin.v1beta.ListMeasurementProtocolSecretsRequest 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; + } + /** + * + * + *
+   * Request message for ListMeasurementProtocolSecret RPC
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest) + com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListMeasurementProtocolSecretsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListMeasurementProtocolSecretsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest.class, + com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest.Builder + .class); + } + + // Construct using + // com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListMeasurementProtocolSecretsRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest + getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest build() { + com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest buildPartial() { + com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest result = + new com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + @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.admin.v1beta.ListMeasurementProtocolSecretsRequest) { + return mergeFrom( + (com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest other) { + if (other + == com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the parent stream.
+     * Format:
+     * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets
+     * 
+ * + * + * 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 resource name of the parent stream.
+     * Format:
+     * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets
+     * 
+ * + * + * 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 resource name of the parent stream.
+     * Format:
+     * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets
+     * 
+ * + * + * 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; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the parent stream.
+     * Format:
+     * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the parent stream.
+     * Format:
+     * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets
+     * 
+ * + * + * 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; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of resources to return.
+     * If unspecified, at most 10 resources will be returned.
+     * The maximum value is 10. Higher values will be coerced to the maximum.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of resources to return.
+     * If unspecified, at most 10 resources will be returned.
+     * The maximum value is 10. Higher values will be coerced to the maximum.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The maximum number of resources to return.
+     * If unspecified, at most 10 resources will be returned.
+     * The maximum value is 10. Higher values will be coerced to the maximum.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A page token, received from a previous `ListMeasurementProtocolSecrets`
+     * call. Provide this to retrieve the subsequent page. When paginating, all
+     * other parameters provided to `ListMeasurementProtocolSecrets` must match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @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; + } + } + /** + * + * + *
+     * A page token, received from a previous `ListMeasurementProtocolSecrets`
+     * call. Provide this to retrieve the subsequent page. When paginating, all
+     * other parameters provided to `ListMeasurementProtocolSecrets` must match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @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; + } + } + /** + * + * + *
+     * A page token, received from a previous `ListMeasurementProtocolSecrets`
+     * call. Provide this to retrieve the subsequent page. When paginating, all
+     * other parameters provided to `ListMeasurementProtocolSecrets` must match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @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; + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, received from a previous `ListMeasurementProtocolSecrets`
+     * call. Provide this to retrieve the subsequent page. When paginating, all
+     * other parameters provided to `ListMeasurementProtocolSecrets` must match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, received from a previous `ListMeasurementProtocolSecrets`
+     * call. Provide this to retrieve the subsequent page. When paginating, all
+     * other parameters provided to `ListMeasurementProtocolSecrets` must match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @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; + 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.admin.v1beta.ListMeasurementProtocolSecretsRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest) + private static final com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest(); + } + + public static com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListMeasurementProtocolSecretsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListMeasurementProtocolSecretsRequest(input, extensionRegistry); + } + }; + + 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.admin.v1beta.ListMeasurementProtocolSecretsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListMeasurementProtocolSecretsRequestOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListMeasurementProtocolSecretsRequestOrBuilder.java new file mode 100644 index 000000000000..0a97ffe87c64 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListMeasurementProtocolSecretsRequestOrBuilder.java @@ -0,0 +1,104 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +public interface ListMeasurementProtocolSecretsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the parent stream.
+   * Format:
+   * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the parent stream.
+   * Format:
+   * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The maximum number of resources to return.
+   * If unspecified, at most 10 resources will be returned.
+   * The maximum value is 10. Higher values will be coerced to the maximum.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A page token, received from a previous `ListMeasurementProtocolSecrets`
+   * call. Provide this to retrieve the subsequent page. When paginating, all
+   * other parameters provided to `ListMeasurementProtocolSecrets` must match
+   * the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A page token, received from a previous `ListMeasurementProtocolSecrets`
+   * call. Provide this to retrieve the subsequent page. When paginating, all
+   * other parameters provided to `ListMeasurementProtocolSecrets` must match
+   * the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListMeasurementProtocolSecretsResponse.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListMeasurementProtocolSecretsResponse.java new file mode 100644 index 000000000000..c667ea14b94e --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListMeasurementProtocolSecretsResponse.java @@ -0,0 +1,1237 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * Response message for ListMeasurementProtocolSecret RPC
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse} + */ +public final class ListMeasurementProtocolSecretsResponse + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse) + ListMeasurementProtocolSecretsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListMeasurementProtocolSecretsResponse.newBuilder() to construct. + private ListMeasurementProtocolSecretsResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListMeasurementProtocolSecretsResponse() { + measurementProtocolSecrets_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListMeasurementProtocolSecretsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListMeasurementProtocolSecretsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + measurementProtocolSecrets_ = + new java.util.ArrayList< + com.google.analytics.admin.v1beta.MeasurementProtocolSecret>(); + mutable_bitField0_ |= 0x00000001; + } + measurementProtocolSecrets_.add( + input.readMessage( + com.google.analytics.admin.v1beta.MeasurementProtocolSecret.parser(), + extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + measurementProtocolSecrets_ = + java.util.Collections.unmodifiableList(measurementProtocolSecrets_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListMeasurementProtocolSecretsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListMeasurementProtocolSecretsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse.class, + com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse.Builder.class); + } + + public static final int MEASUREMENT_PROTOCOL_SECRETS_FIELD_NUMBER = 1; + private java.util.List + measurementProtocolSecrets_; + /** + * + * + *
+   * A list of secrets for the parent stream specified in the request.
+   * 
+ * + * + * repeated .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secrets = 1; + * + */ + @java.lang.Override + public java.util.List + getMeasurementProtocolSecretsList() { + return measurementProtocolSecrets_; + } + /** + * + * + *
+   * A list of secrets for the parent stream specified in the request.
+   * 
+ * + * + * repeated .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secrets = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.analytics.admin.v1beta.MeasurementProtocolSecretOrBuilder> + getMeasurementProtocolSecretsOrBuilderList() { + return measurementProtocolSecrets_; + } + /** + * + * + *
+   * A list of secrets for the parent stream specified in the request.
+   * 
+ * + * + * repeated .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secrets = 1; + * + */ + @java.lang.Override + public int getMeasurementProtocolSecretsCount() { + return measurementProtocolSecrets_.size(); + } + /** + * + * + *
+   * A list of secrets for the parent stream specified in the request.
+   * 
+ * + * + * repeated .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secrets = 1; + * + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.MeasurementProtocolSecret getMeasurementProtocolSecrets( + int index) { + return measurementProtocolSecrets_.get(index); + } + /** + * + * + *
+   * A list of secrets for the parent stream specified in the request.
+   * 
+ * + * + * repeated .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secrets = 1; + * + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.MeasurementProtocolSecretOrBuilder + getMeasurementProtocolSecretsOrBuilder(int index) { + return measurementProtocolSecrets_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < measurementProtocolSecrets_.size(); i++) { + output.writeMessage(1, measurementProtocolSecrets_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < measurementProtocolSecrets_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, measurementProtocolSecrets_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.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.admin.v1beta.ListMeasurementProtocolSecretsResponse)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse other = + (com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse) obj; + + if (!getMeasurementProtocolSecretsList().equals(other.getMeasurementProtocolSecretsList())) + return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getMeasurementProtocolSecretsCount() > 0) { + hash = (37 * hash) + MEASUREMENT_PROTOCOL_SECRETS_FIELD_NUMBER; + hash = (53 * hash) + getMeasurementProtocolSecretsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse 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.admin.v1beta.ListMeasurementProtocolSecretsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse 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.admin.v1beta.ListMeasurementProtocolSecretsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse 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.admin.v1beta.ListMeasurementProtocolSecretsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse + 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.admin.v1beta.ListMeasurementProtocolSecretsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse 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.admin.v1beta.ListMeasurementProtocolSecretsResponse 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; + } + /** + * + * + *
+   * Response message for ListMeasurementProtocolSecret RPC
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse) + com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListMeasurementProtocolSecretsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListMeasurementProtocolSecretsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse.class, + com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse.Builder + .class); + } + + // Construct using + // com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getMeasurementProtocolSecretsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (measurementProtocolSecretsBuilder_ == null) { + measurementProtocolSecrets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + measurementProtocolSecretsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListMeasurementProtocolSecretsResponse_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse + getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse build() { + com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse buildPartial() { + com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse result = + new com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse(this); + int from_bitField0_ = bitField0_; + if (measurementProtocolSecretsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + measurementProtocolSecrets_ = + java.util.Collections.unmodifiableList(measurementProtocolSecrets_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.measurementProtocolSecrets_ = measurementProtocolSecrets_; + } else { + result.measurementProtocolSecrets_ = measurementProtocolSecretsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @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.admin.v1beta.ListMeasurementProtocolSecretsResponse) { + return mergeFrom( + (com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse other) { + if (other + == com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse + .getDefaultInstance()) return this; + if (measurementProtocolSecretsBuilder_ == null) { + if (!other.measurementProtocolSecrets_.isEmpty()) { + if (measurementProtocolSecrets_.isEmpty()) { + measurementProtocolSecrets_ = other.measurementProtocolSecrets_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureMeasurementProtocolSecretsIsMutable(); + measurementProtocolSecrets_.addAll(other.measurementProtocolSecrets_); + } + onChanged(); + } + } else { + if (!other.measurementProtocolSecrets_.isEmpty()) { + if (measurementProtocolSecretsBuilder_.isEmpty()) { + measurementProtocolSecretsBuilder_.dispose(); + measurementProtocolSecretsBuilder_ = null; + measurementProtocolSecrets_ = other.measurementProtocolSecrets_; + bitField0_ = (bitField0_ & ~0x00000001); + measurementProtocolSecretsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getMeasurementProtocolSecretsFieldBuilder() + : null; + } else { + measurementProtocolSecretsBuilder_.addAllMessages(other.measurementProtocolSecrets_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List + measurementProtocolSecrets_ = java.util.Collections.emptyList(); + + private void ensureMeasurementProtocolSecretsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + measurementProtocolSecrets_ = + new java.util.ArrayList( + measurementProtocolSecrets_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.admin.v1beta.MeasurementProtocolSecret, + com.google.analytics.admin.v1beta.MeasurementProtocolSecret.Builder, + com.google.analytics.admin.v1beta.MeasurementProtocolSecretOrBuilder> + measurementProtocolSecretsBuilder_; + + /** + * + * + *
+     * A list of secrets for the parent stream specified in the request.
+     * 
+ * + * + * repeated .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secrets = 1; + * + */ + public java.util.List + getMeasurementProtocolSecretsList() { + if (measurementProtocolSecretsBuilder_ == null) { + return java.util.Collections.unmodifiableList(measurementProtocolSecrets_); + } else { + return measurementProtocolSecretsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of secrets for the parent stream specified in the request.
+     * 
+ * + * + * repeated .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secrets = 1; + * + */ + public int getMeasurementProtocolSecretsCount() { + if (measurementProtocolSecretsBuilder_ == null) { + return measurementProtocolSecrets_.size(); + } else { + return measurementProtocolSecretsBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of secrets for the parent stream specified in the request.
+     * 
+ * + * + * repeated .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secrets = 1; + * + */ + public com.google.analytics.admin.v1beta.MeasurementProtocolSecret + getMeasurementProtocolSecrets(int index) { + if (measurementProtocolSecretsBuilder_ == null) { + return measurementProtocolSecrets_.get(index); + } else { + return measurementProtocolSecretsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of secrets for the parent stream specified in the request.
+     * 
+ * + * + * repeated .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secrets = 1; + * + */ + public Builder setMeasurementProtocolSecrets( + int index, com.google.analytics.admin.v1beta.MeasurementProtocolSecret value) { + if (measurementProtocolSecretsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMeasurementProtocolSecretsIsMutable(); + measurementProtocolSecrets_.set(index, value); + onChanged(); + } else { + measurementProtocolSecretsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of secrets for the parent stream specified in the request.
+     * 
+ * + * + * repeated .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secrets = 1; + * + */ + public Builder setMeasurementProtocolSecrets( + int index, + com.google.analytics.admin.v1beta.MeasurementProtocolSecret.Builder builderForValue) { + if (measurementProtocolSecretsBuilder_ == null) { + ensureMeasurementProtocolSecretsIsMutable(); + measurementProtocolSecrets_.set(index, builderForValue.build()); + onChanged(); + } else { + measurementProtocolSecretsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of secrets for the parent stream specified in the request.
+     * 
+ * + * + * repeated .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secrets = 1; + * + */ + public Builder addMeasurementProtocolSecrets( + com.google.analytics.admin.v1beta.MeasurementProtocolSecret value) { + if (measurementProtocolSecretsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMeasurementProtocolSecretsIsMutable(); + measurementProtocolSecrets_.add(value); + onChanged(); + } else { + measurementProtocolSecretsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of secrets for the parent stream specified in the request.
+     * 
+ * + * + * repeated .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secrets = 1; + * + */ + public Builder addMeasurementProtocolSecrets( + int index, com.google.analytics.admin.v1beta.MeasurementProtocolSecret value) { + if (measurementProtocolSecretsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMeasurementProtocolSecretsIsMutable(); + measurementProtocolSecrets_.add(index, value); + onChanged(); + } else { + measurementProtocolSecretsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of secrets for the parent stream specified in the request.
+     * 
+ * + * + * repeated .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secrets = 1; + * + */ + public Builder addMeasurementProtocolSecrets( + com.google.analytics.admin.v1beta.MeasurementProtocolSecret.Builder builderForValue) { + if (measurementProtocolSecretsBuilder_ == null) { + ensureMeasurementProtocolSecretsIsMutable(); + measurementProtocolSecrets_.add(builderForValue.build()); + onChanged(); + } else { + measurementProtocolSecretsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of secrets for the parent stream specified in the request.
+     * 
+ * + * + * repeated .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secrets = 1; + * + */ + public Builder addMeasurementProtocolSecrets( + int index, + com.google.analytics.admin.v1beta.MeasurementProtocolSecret.Builder builderForValue) { + if (measurementProtocolSecretsBuilder_ == null) { + ensureMeasurementProtocolSecretsIsMutable(); + measurementProtocolSecrets_.add(index, builderForValue.build()); + onChanged(); + } else { + measurementProtocolSecretsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of secrets for the parent stream specified in the request.
+     * 
+ * + * + * repeated .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secrets = 1; + * + */ + public Builder addAllMeasurementProtocolSecrets( + java.lang.Iterable + values) { + if (measurementProtocolSecretsBuilder_ == null) { + ensureMeasurementProtocolSecretsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, measurementProtocolSecrets_); + onChanged(); + } else { + measurementProtocolSecretsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of secrets for the parent stream specified in the request.
+     * 
+ * + * + * repeated .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secrets = 1; + * + */ + public Builder clearMeasurementProtocolSecrets() { + if (measurementProtocolSecretsBuilder_ == null) { + measurementProtocolSecrets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + measurementProtocolSecretsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of secrets for the parent stream specified in the request.
+     * 
+ * + * + * repeated .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secrets = 1; + * + */ + public Builder removeMeasurementProtocolSecrets(int index) { + if (measurementProtocolSecretsBuilder_ == null) { + ensureMeasurementProtocolSecretsIsMutable(); + measurementProtocolSecrets_.remove(index); + onChanged(); + } else { + measurementProtocolSecretsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of secrets for the parent stream specified in the request.
+     * 
+ * + * + * repeated .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secrets = 1; + * + */ + public com.google.analytics.admin.v1beta.MeasurementProtocolSecret.Builder + getMeasurementProtocolSecretsBuilder(int index) { + return getMeasurementProtocolSecretsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of secrets for the parent stream specified in the request.
+     * 
+ * + * + * repeated .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secrets = 1; + * + */ + public com.google.analytics.admin.v1beta.MeasurementProtocolSecretOrBuilder + getMeasurementProtocolSecretsOrBuilder(int index) { + if (measurementProtocolSecretsBuilder_ == null) { + return measurementProtocolSecrets_.get(index); + } else { + return measurementProtocolSecretsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of secrets for the parent stream specified in the request.
+     * 
+ * + * + * repeated .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secrets = 1; + * + */ + public java.util.List< + ? extends com.google.analytics.admin.v1beta.MeasurementProtocolSecretOrBuilder> + getMeasurementProtocolSecretsOrBuilderList() { + if (measurementProtocolSecretsBuilder_ != null) { + return measurementProtocolSecretsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(measurementProtocolSecrets_); + } + } + /** + * + * + *
+     * A list of secrets for the parent stream specified in the request.
+     * 
+ * + * + * repeated .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secrets = 1; + * + */ + public com.google.analytics.admin.v1beta.MeasurementProtocolSecret.Builder + addMeasurementProtocolSecretsBuilder() { + return getMeasurementProtocolSecretsFieldBuilder() + .addBuilder( + com.google.analytics.admin.v1beta.MeasurementProtocolSecret.getDefaultInstance()); + } + /** + * + * + *
+     * A list of secrets for the parent stream specified in the request.
+     * 
+ * + * + * repeated .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secrets = 1; + * + */ + public com.google.analytics.admin.v1beta.MeasurementProtocolSecret.Builder + addMeasurementProtocolSecretsBuilder(int index) { + return getMeasurementProtocolSecretsFieldBuilder() + .addBuilder( + index, + com.google.analytics.admin.v1beta.MeasurementProtocolSecret.getDefaultInstance()); + } + /** + * + * + *
+     * A list of secrets for the parent stream specified in the request.
+     * 
+ * + * + * repeated .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secrets = 1; + * + */ + public java.util.List + getMeasurementProtocolSecretsBuilderList() { + return getMeasurementProtocolSecretsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.admin.v1beta.MeasurementProtocolSecret, + com.google.analytics.admin.v1beta.MeasurementProtocolSecret.Builder, + com.google.analytics.admin.v1beta.MeasurementProtocolSecretOrBuilder> + getMeasurementProtocolSecretsFieldBuilder() { + if (measurementProtocolSecretsBuilder_ == null) { + measurementProtocolSecretsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.admin.v1beta.MeasurementProtocolSecret, + com.google.analytics.admin.v1beta.MeasurementProtocolSecret.Builder, + com.google.analytics.admin.v1beta.MeasurementProtocolSecretOrBuilder>( + measurementProtocolSecrets_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + measurementProtocolSecrets_ = null; + } + return measurementProtocolSecretsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + 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.admin.v1beta.ListMeasurementProtocolSecretsResponse) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse) + private static final com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse(); + } + + public static com.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListMeasurementProtocolSecretsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListMeasurementProtocolSecretsResponse(input, extensionRegistry); + } + }; + + 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.admin.v1beta.ListMeasurementProtocolSecretsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListMeasurementProtocolSecretsResponseOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListMeasurementProtocolSecretsResponseOrBuilder.java new file mode 100644 index 000000000000..1679c5900951 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListMeasurementProtocolSecretsResponseOrBuilder.java @@ -0,0 +1,117 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +public interface ListMeasurementProtocolSecretsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A list of secrets for the parent stream specified in the request.
+   * 
+ * + * + * repeated .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secrets = 1; + * + */ + java.util.List + getMeasurementProtocolSecretsList(); + /** + * + * + *
+   * A list of secrets for the parent stream specified in the request.
+   * 
+ * + * + * repeated .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secrets = 1; + * + */ + com.google.analytics.admin.v1beta.MeasurementProtocolSecret getMeasurementProtocolSecrets( + int index); + /** + * + * + *
+   * A list of secrets for the parent stream specified in the request.
+   * 
+ * + * + * repeated .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secrets = 1; + * + */ + int getMeasurementProtocolSecretsCount(); + /** + * + * + *
+   * A list of secrets for the parent stream specified in the request.
+   * 
+ * + * + * repeated .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secrets = 1; + * + */ + java.util.List + getMeasurementProtocolSecretsOrBuilderList(); + /** + * + * + *
+   * A list of secrets for the parent stream specified in the request.
+   * 
+ * + * + * repeated .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secrets = 1; + * + */ + com.google.analytics.admin.v1beta.MeasurementProtocolSecretOrBuilder + getMeasurementProtocolSecretsOrBuilder(int index); + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListPropertiesRequest.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListPropertiesRequest.java new file mode 100644 index 000000000000..ed6298d4a16d --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListPropertiesRequest.java @@ -0,0 +1,1137 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * Request message for ListProperties RPC.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.ListPropertiesRequest} + */ +public final class ListPropertiesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.ListPropertiesRequest) + ListPropertiesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListPropertiesRequest.newBuilder() to construct. + private ListPropertiesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListPropertiesRequest() { + filter_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListPropertiesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListPropertiesRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } + case 16: + { + pageSize_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 32: + { + showDeleted_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListPropertiesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListPropertiesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.ListPropertiesRequest.class, + com.google.analytics.admin.v1beta.ListPropertiesRequest.Builder.class); + } + + public static final int FILTER_FIELD_NUMBER = 1; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * Required. An expression for filtering the results of the request.
+   * Fields eligible for filtering are:
+   * `parent:`(The resource name of the parent account/property) or
+   * `ancestor:`(The resource name of the parent account) or
+   * `firebase_project:`(The id or number of the linked firebase project).
+   * Some examples of filters:
+   * ```
+   * | Filter                      | Description                               |
+   * |-----------------------------|-------------------------------------------|
+   * | parent:accounts/123         | The account with account id: 123.       |
+   * | parent:properties/123       | The property with property id: 123.       |
+   * | ancestor:accounts/123       | The account with account id: 123.         |
+   * | firebase_project:project-id | The firebase project with id: project-id. |
+   * | firebase_project:123        | The firebase project with number: 123.    |
+   * ```
+   * 
+ * + * string filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + 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(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Required. An expression for filtering the results of the request.
+   * Fields eligible for filtering are:
+   * `parent:`(The resource name of the parent account/property) or
+   * `ancestor:`(The resource name of the parent account) or
+   * `firebase_project:`(The id or number of the linked firebase project).
+   * Some examples of filters:
+   * ```
+   * | Filter                      | Description                               |
+   * |-----------------------------|-------------------------------------------|
+   * | parent:accounts/123         | The account with account id: 123.       |
+   * | parent:properties/123       | The property with property id: 123.       |
+   * | ancestor:accounts/123       | The account with account id: 123.         |
+   * | firebase_project:project-id | The firebase project with id: project-id. |
+   * | firebase_project:123        | The firebase project with number: 123.    |
+   * ```
+   * 
+ * + * string filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+   * The maximum number of resources to return. The service may return
+   * fewer than this value, even if there are additional pages.
+   * If unspecified, at most 50 resources will be returned.
+   * The maximum value is 200; (higher values will be coerced to the maximum)
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * A page token, received from a previous `ListProperties` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListProperties` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @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; + } + } + /** + * + * + *
+   * A page token, received from a previous `ListProperties` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListProperties` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @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; + } + } + + public static final int SHOW_DELETED_FIELD_NUMBER = 4; + private boolean showDeleted_; + /** + * + * + *
+   * Whether to include soft-deleted (ie: "trashed") Properties in the
+   * results. Properties can be inspected to determine whether they are deleted
+   * or not.
+   * 
+ * + * bool show_deleted = 4; + * + * @return The showDeleted. + */ + @java.lang.Override + public boolean getShowDeleted() { + return showDeleted_; + } + + 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(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, filter_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (showDeleted_ != false) { + output.writeBool(4, showDeleted_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, filter_); + } + 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_); + } + if (showDeleted_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, showDeleted_); + } + size += unknownFields.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.admin.v1beta.ListPropertiesRequest)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.ListPropertiesRequest other = + (com.google.analytics.admin.v1beta.ListPropertiesRequest) obj; + + if (!getFilter().equals(other.getFilter())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (getShowDeleted() != other.getShowDeleted()) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().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 = (37 * hash) + SHOW_DELETED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getShowDeleted()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.ListPropertiesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ListPropertiesRequest 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.admin.v1beta.ListPropertiesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ListPropertiesRequest 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.admin.v1beta.ListPropertiesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ListPropertiesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.ListPropertiesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ListPropertiesRequest 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.admin.v1beta.ListPropertiesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ListPropertiesRequest 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.admin.v1beta.ListPropertiesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ListPropertiesRequest 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.admin.v1beta.ListPropertiesRequest 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; + } + /** + * + * + *
+   * Request message for ListProperties RPC.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.ListPropertiesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.ListPropertiesRequest) + com.google.analytics.admin.v1beta.ListPropertiesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListPropertiesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListPropertiesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.ListPropertiesRequest.class, + com.google.analytics.admin.v1beta.ListPropertiesRequest.Builder.class); + } + + // Construct using com.google.analytics.admin.v1beta.ListPropertiesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + filter_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + showDeleted_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListPropertiesRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ListPropertiesRequest getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.ListPropertiesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ListPropertiesRequest build() { + com.google.analytics.admin.v1beta.ListPropertiesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ListPropertiesRequest buildPartial() { + com.google.analytics.admin.v1beta.ListPropertiesRequest result = + new com.google.analytics.admin.v1beta.ListPropertiesRequest(this); + result.filter_ = filter_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + result.showDeleted_ = showDeleted_; + onBuilt(); + return result; + } + + @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.admin.v1beta.ListPropertiesRequest) { + return mergeFrom((com.google.analytics.admin.v1beta.ListPropertiesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1beta.ListPropertiesRequest other) { + if (other == com.google.analytics.admin.v1beta.ListPropertiesRequest.getDefaultInstance()) + return this; + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (other.getShowDeleted() != false) { + setShowDeleted(other.getShowDeleted()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.ListPropertiesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.ListPropertiesRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Required. An expression for filtering the results of the request.
+     * Fields eligible for filtering are:
+     * `parent:`(The resource name of the parent account/property) or
+     * `ancestor:`(The resource name of the parent account) or
+     * `firebase_project:`(The id or number of the linked firebase project).
+     * Some examples of filters:
+     * ```
+     * | Filter                      | Description                               |
+     * |-----------------------------|-------------------------------------------|
+     * | parent:accounts/123         | The account with account id: 123.       |
+     * | parent:properties/123       | The property with property id: 123.       |
+     * | ancestor:accounts/123       | The account with account id: 123.         |
+     * | firebase_project:project-id | The firebase project with id: project-id. |
+     * | firebase_project:123        | The firebase project with number: 123.    |
+     * ```
+     * 
+ * + * string filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. An expression for filtering the results of the request.
+     * Fields eligible for filtering are:
+     * `parent:`(The resource name of the parent account/property) or
+     * `ancestor:`(The resource name of the parent account) or
+     * `firebase_project:`(The id or number of the linked firebase project).
+     * Some examples of filters:
+     * ```
+     * | Filter                      | Description                               |
+     * |-----------------------------|-------------------------------------------|
+     * | parent:accounts/123         | The account with account id: 123.       |
+     * | parent:properties/123       | The property with property id: 123.       |
+     * | ancestor:accounts/123       | The account with account id: 123.         |
+     * | firebase_project:project-id | The firebase project with id: project-id. |
+     * | firebase_project:123        | The firebase project with number: 123.    |
+     * ```
+     * 
+ * + * string filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. An expression for filtering the results of the request.
+     * Fields eligible for filtering are:
+     * `parent:`(The resource name of the parent account/property) or
+     * `ancestor:`(The resource name of the parent account) or
+     * `firebase_project:`(The id or number of the linked firebase project).
+     * Some examples of filters:
+     * ```
+     * | Filter                      | Description                               |
+     * |-----------------------------|-------------------------------------------|
+     * | parent:accounts/123         | The account with account id: 123.       |
+     * | parent:properties/123       | The property with property id: 123.       |
+     * | ancestor:accounts/123       | The account with account id: 123.         |
+     * | firebase_project:project-id | The firebase project with id: project-id. |
+     * | firebase_project:123        | The firebase project with number: 123.    |
+     * ```
+     * 
+ * + * string filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. An expression for filtering the results of the request.
+     * Fields eligible for filtering are:
+     * `parent:`(The resource name of the parent account/property) or
+     * `ancestor:`(The resource name of the parent account) or
+     * `firebase_project:`(The id or number of the linked firebase project).
+     * Some examples of filters:
+     * ```
+     * | Filter                      | Description                               |
+     * |-----------------------------|-------------------------------------------|
+     * | parent:accounts/123         | The account with account id: 123.       |
+     * | parent:properties/123       | The property with property id: 123.       |
+     * | ancestor:accounts/123       | The account with account id: 123.         |
+     * | firebase_project:project-id | The firebase project with id: project-id. |
+     * | firebase_project:123        | The firebase project with number: 123.    |
+     * ```
+     * 
+ * + * string filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. An expression for filtering the results of the request.
+     * Fields eligible for filtering are:
+     * `parent:`(The resource name of the parent account/property) or
+     * `ancestor:`(The resource name of the parent account) or
+     * `firebase_project:`(The id or number of the linked firebase project).
+     * Some examples of filters:
+     * ```
+     * | Filter                      | Description                               |
+     * |-----------------------------|-------------------------------------------|
+     * | parent:accounts/123         | The account with account id: 123.       |
+     * | parent:properties/123       | The property with property id: 123.       |
+     * | ancestor:accounts/123       | The account with account id: 123.         |
+     * | firebase_project:project-id | The firebase project with id: project-id. |
+     * | firebase_project:123        | The firebase project with number: 123.    |
+     * ```
+     * 
+ * + * string filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of resources to return. The service may return
+     * fewer than this value, even if there are additional pages.
+     * If unspecified, at most 50 resources will be returned.
+     * The maximum value is 200; (higher values will be coerced to the maximum)
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of resources to return. The service may return
+     * fewer than this value, even if there are additional pages.
+     * If unspecified, at most 50 resources will be returned.
+     * The maximum value is 200; (higher values will be coerced to the maximum)
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The maximum number of resources to return. The service may return
+     * fewer than this value, even if there are additional pages.
+     * If unspecified, at most 50 resources will be returned.
+     * The maximum value is 200; (higher values will be coerced to the maximum)
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A page token, received from a previous `ListProperties` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListProperties` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @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; + } + } + /** + * + * + *
+     * A page token, received from a previous `ListProperties` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListProperties` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @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; + } + } + /** + * + * + *
+     * A page token, received from a previous `ListProperties` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListProperties` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @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; + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, received from a previous `ListProperties` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListProperties` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, received from a previous `ListProperties` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListProperties` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @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; + onChanged(); + return this; + } + + private boolean showDeleted_; + /** + * + * + *
+     * Whether to include soft-deleted (ie: "trashed") Properties in the
+     * results. Properties can be inspected to determine whether they are deleted
+     * or not.
+     * 
+ * + * bool show_deleted = 4; + * + * @return The showDeleted. + */ + @java.lang.Override + public boolean getShowDeleted() { + return showDeleted_; + } + /** + * + * + *
+     * Whether to include soft-deleted (ie: "trashed") Properties in the
+     * results. Properties can be inspected to determine whether they are deleted
+     * or not.
+     * 
+ * + * bool show_deleted = 4; + * + * @param value The showDeleted to set. + * @return This builder for chaining. + */ + public Builder setShowDeleted(boolean value) { + + showDeleted_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether to include soft-deleted (ie: "trashed") Properties in the
+     * results. Properties can be inspected to determine whether they are deleted
+     * or not.
+     * 
+ * + * bool show_deleted = 4; + * + * @return This builder for chaining. + */ + public Builder clearShowDeleted() { + + showDeleted_ = false; + 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.admin.v1beta.ListPropertiesRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.ListPropertiesRequest) + private static final com.google.analytics.admin.v1beta.ListPropertiesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.ListPropertiesRequest(); + } + + public static com.google.analytics.admin.v1beta.ListPropertiesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListPropertiesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListPropertiesRequest(input, extensionRegistry); + } + }; + + 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.admin.v1beta.ListPropertiesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListPropertiesRequestOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListPropertiesRequestOrBuilder.java new file mode 100644 index 000000000000..e1a21e48c56a --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListPropertiesRequestOrBuilder.java @@ -0,0 +1,140 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +public interface ListPropertiesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.ListPropertiesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. An expression for filtering the results of the request.
+   * Fields eligible for filtering are:
+   * `parent:`(The resource name of the parent account/property) or
+   * `ancestor:`(The resource name of the parent account) or
+   * `firebase_project:`(The id or number of the linked firebase project).
+   * Some examples of filters:
+   * ```
+   * | Filter                      | Description                               |
+   * |-----------------------------|-------------------------------------------|
+   * | parent:accounts/123         | The account with account id: 123.       |
+   * | parent:properties/123       | The property with property id: 123.       |
+   * | ancestor:accounts/123       | The account with account id: 123.         |
+   * | firebase_project:project-id | The firebase project with id: project-id. |
+   * | firebase_project:123        | The firebase project with number: 123.    |
+   * ```
+   * 
+ * + * string filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Required. An expression for filtering the results of the request.
+   * Fields eligible for filtering are:
+   * `parent:`(The resource name of the parent account/property) or
+   * `ancestor:`(The resource name of the parent account) or
+   * `firebase_project:`(The id or number of the linked firebase project).
+   * Some examples of filters:
+   * ```
+   * | Filter                      | Description                               |
+   * |-----------------------------|-------------------------------------------|
+   * | parent:accounts/123         | The account with account id: 123.       |
+   * | parent:properties/123       | The property with property id: 123.       |
+   * | ancestor:accounts/123       | The account with account id: 123.         |
+   * | firebase_project:project-id | The firebase project with id: project-id. |
+   * | firebase_project:123        | The firebase project with number: 123.    |
+   * ```
+   * 
+ * + * string filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * The maximum number of resources to return. The service may return
+   * fewer than this value, even if there are additional pages.
+   * If unspecified, at most 50 resources will be returned.
+   * The maximum value is 200; (higher values will be coerced to the maximum)
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A page token, received from a previous `ListProperties` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListProperties` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A page token, received from a previous `ListProperties` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListProperties` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Whether to include soft-deleted (ie: "trashed") Properties in the
+   * results. Properties can be inspected to determine whether they are deleted
+   * or not.
+   * 
+ * + * bool show_deleted = 4; + * + * @return The showDeleted. + */ + boolean getShowDeleted(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListPropertiesResponse.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListPropertiesResponse.java new file mode 100644 index 000000000000..40960de9cdb1 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListPropertiesResponse.java @@ -0,0 +1,1140 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * Response message for ListProperties RPC.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.ListPropertiesResponse} + */ +public final class ListPropertiesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.ListPropertiesResponse) + ListPropertiesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListPropertiesResponse.newBuilder() to construct. + private ListPropertiesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListPropertiesResponse() { + properties_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListPropertiesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListPropertiesResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + properties_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + properties_.add( + input.readMessage( + com.google.analytics.admin.v1beta.Property.parser(), extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + properties_ = java.util.Collections.unmodifiableList(properties_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListPropertiesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListPropertiesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.ListPropertiesResponse.class, + com.google.analytics.admin.v1beta.ListPropertiesResponse.Builder.class); + } + + public static final int PROPERTIES_FIELD_NUMBER = 1; + private java.util.List properties_; + /** + * + * + *
+   * Results that matched the filter criteria and were accessible to the caller.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.Property properties = 1; + */ + @java.lang.Override + public java.util.List getPropertiesList() { + return properties_; + } + /** + * + * + *
+   * Results that matched the filter criteria and were accessible to the caller.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.Property properties = 1; + */ + @java.lang.Override + public java.util.List + getPropertiesOrBuilderList() { + return properties_; + } + /** + * + * + *
+   * Results that matched the filter criteria and were accessible to the caller.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.Property properties = 1; + */ + @java.lang.Override + public int getPropertiesCount() { + return properties_.size(); + } + /** + * + * + *
+   * Results that matched the filter criteria and were accessible to the caller.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.Property properties = 1; + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.Property getProperties(int index) { + return properties_.get(index); + } + /** + * + * + *
+   * Results that matched the filter criteria and were accessible to the caller.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.Property properties = 1; + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.PropertyOrBuilder getPropertiesOrBuilder(int index) { + return properties_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < properties_.size(); i++) { + output.writeMessage(1, properties_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < properties_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, properties_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.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.admin.v1beta.ListPropertiesResponse)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.ListPropertiesResponse other = + (com.google.analytics.admin.v1beta.ListPropertiesResponse) obj; + + if (!getPropertiesList().equals(other.getPropertiesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getPropertiesCount() > 0) { + hash = (37 * hash) + PROPERTIES_FIELD_NUMBER; + hash = (53 * hash) + getPropertiesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.ListPropertiesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ListPropertiesResponse 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.admin.v1beta.ListPropertiesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ListPropertiesResponse 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.admin.v1beta.ListPropertiesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ListPropertiesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.ListPropertiesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ListPropertiesResponse 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.admin.v1beta.ListPropertiesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ListPropertiesResponse 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.admin.v1beta.ListPropertiesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ListPropertiesResponse 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.admin.v1beta.ListPropertiesResponse 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; + } + /** + * + * + *
+   * Response message for ListProperties RPC.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.ListPropertiesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.ListPropertiesResponse) + com.google.analytics.admin.v1beta.ListPropertiesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListPropertiesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListPropertiesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.ListPropertiesResponse.class, + com.google.analytics.admin.v1beta.ListPropertiesResponse.Builder.class); + } + + // Construct using com.google.analytics.admin.v1beta.ListPropertiesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPropertiesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (propertiesBuilder_ == null) { + properties_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + propertiesBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ListPropertiesResponse_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ListPropertiesResponse getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.ListPropertiesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ListPropertiesResponse build() { + com.google.analytics.admin.v1beta.ListPropertiesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ListPropertiesResponse buildPartial() { + com.google.analytics.admin.v1beta.ListPropertiesResponse result = + new com.google.analytics.admin.v1beta.ListPropertiesResponse(this); + int from_bitField0_ = bitField0_; + if (propertiesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + properties_ = java.util.Collections.unmodifiableList(properties_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.properties_ = properties_; + } else { + result.properties_ = propertiesBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @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.admin.v1beta.ListPropertiesResponse) { + return mergeFrom((com.google.analytics.admin.v1beta.ListPropertiesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1beta.ListPropertiesResponse other) { + if (other == com.google.analytics.admin.v1beta.ListPropertiesResponse.getDefaultInstance()) + return this; + if (propertiesBuilder_ == null) { + if (!other.properties_.isEmpty()) { + if (properties_.isEmpty()) { + properties_ = other.properties_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePropertiesIsMutable(); + properties_.addAll(other.properties_); + } + onChanged(); + } + } else { + if (!other.properties_.isEmpty()) { + if (propertiesBuilder_.isEmpty()) { + propertiesBuilder_.dispose(); + propertiesBuilder_ = null; + properties_ = other.properties_; + bitField0_ = (bitField0_ & ~0x00000001); + propertiesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPropertiesFieldBuilder() + : null; + } else { + propertiesBuilder_.addAllMessages(other.properties_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.ListPropertiesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.ListPropertiesResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List properties_ = + java.util.Collections.emptyList(); + + private void ensurePropertiesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + properties_ = + new java.util.ArrayList(properties_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.admin.v1beta.Property, + com.google.analytics.admin.v1beta.Property.Builder, + com.google.analytics.admin.v1beta.PropertyOrBuilder> + propertiesBuilder_; + + /** + * + * + *
+     * Results that matched the filter criteria and were accessible to the caller.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.Property properties = 1; + */ + public java.util.List getPropertiesList() { + if (propertiesBuilder_ == null) { + return java.util.Collections.unmodifiableList(properties_); + } else { + return propertiesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Results that matched the filter criteria and were accessible to the caller.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.Property properties = 1; + */ + public int getPropertiesCount() { + if (propertiesBuilder_ == null) { + return properties_.size(); + } else { + return propertiesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Results that matched the filter criteria and were accessible to the caller.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.Property properties = 1; + */ + public com.google.analytics.admin.v1beta.Property getProperties(int index) { + if (propertiesBuilder_ == null) { + return properties_.get(index); + } else { + return propertiesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Results that matched the filter criteria and were accessible to the caller.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.Property properties = 1; + */ + public Builder setProperties(int index, com.google.analytics.admin.v1beta.Property value) { + if (propertiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePropertiesIsMutable(); + properties_.set(index, value); + onChanged(); + } else { + propertiesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Results that matched the filter criteria and were accessible to the caller.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.Property properties = 1; + */ + public Builder setProperties( + int index, com.google.analytics.admin.v1beta.Property.Builder builderForValue) { + if (propertiesBuilder_ == null) { + ensurePropertiesIsMutable(); + properties_.set(index, builderForValue.build()); + onChanged(); + } else { + propertiesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Results that matched the filter criteria and were accessible to the caller.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.Property properties = 1; + */ + public Builder addProperties(com.google.analytics.admin.v1beta.Property value) { + if (propertiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePropertiesIsMutable(); + properties_.add(value); + onChanged(); + } else { + propertiesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Results that matched the filter criteria and were accessible to the caller.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.Property properties = 1; + */ + public Builder addProperties(int index, com.google.analytics.admin.v1beta.Property value) { + if (propertiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePropertiesIsMutable(); + properties_.add(index, value); + onChanged(); + } else { + propertiesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Results that matched the filter criteria and were accessible to the caller.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.Property properties = 1; + */ + public Builder addProperties( + com.google.analytics.admin.v1beta.Property.Builder builderForValue) { + if (propertiesBuilder_ == null) { + ensurePropertiesIsMutable(); + properties_.add(builderForValue.build()); + onChanged(); + } else { + propertiesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Results that matched the filter criteria and were accessible to the caller.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.Property properties = 1; + */ + public Builder addProperties( + int index, com.google.analytics.admin.v1beta.Property.Builder builderForValue) { + if (propertiesBuilder_ == null) { + ensurePropertiesIsMutable(); + properties_.add(index, builderForValue.build()); + onChanged(); + } else { + propertiesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Results that matched the filter criteria and were accessible to the caller.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.Property properties = 1; + */ + public Builder addAllProperties( + java.lang.Iterable values) { + if (propertiesBuilder_ == null) { + ensurePropertiesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, properties_); + onChanged(); + } else { + propertiesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Results that matched the filter criteria and were accessible to the caller.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.Property properties = 1; + */ + public Builder clearProperties() { + if (propertiesBuilder_ == null) { + properties_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + propertiesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Results that matched the filter criteria and were accessible to the caller.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.Property properties = 1; + */ + public Builder removeProperties(int index) { + if (propertiesBuilder_ == null) { + ensurePropertiesIsMutable(); + properties_.remove(index); + onChanged(); + } else { + propertiesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Results that matched the filter criteria and were accessible to the caller.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.Property properties = 1; + */ + public com.google.analytics.admin.v1beta.Property.Builder getPropertiesBuilder(int index) { + return getPropertiesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Results that matched the filter criteria and were accessible to the caller.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.Property properties = 1; + */ + public com.google.analytics.admin.v1beta.PropertyOrBuilder getPropertiesOrBuilder(int index) { + if (propertiesBuilder_ == null) { + return properties_.get(index); + } else { + return propertiesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Results that matched the filter criteria and were accessible to the caller.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.Property properties = 1; + */ + public java.util.List + getPropertiesOrBuilderList() { + if (propertiesBuilder_ != null) { + return propertiesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(properties_); + } + } + /** + * + * + *
+     * Results that matched the filter criteria and were accessible to the caller.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.Property properties = 1; + */ + public com.google.analytics.admin.v1beta.Property.Builder addPropertiesBuilder() { + return getPropertiesFieldBuilder() + .addBuilder(com.google.analytics.admin.v1beta.Property.getDefaultInstance()); + } + /** + * + * + *
+     * Results that matched the filter criteria and were accessible to the caller.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.Property properties = 1; + */ + public com.google.analytics.admin.v1beta.Property.Builder addPropertiesBuilder(int index) { + return getPropertiesFieldBuilder() + .addBuilder(index, com.google.analytics.admin.v1beta.Property.getDefaultInstance()); + } + /** + * + * + *
+     * Results that matched the filter criteria and were accessible to the caller.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.Property properties = 1; + */ + public java.util.List + getPropertiesBuilderList() { + return getPropertiesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.admin.v1beta.Property, + com.google.analytics.admin.v1beta.Property.Builder, + com.google.analytics.admin.v1beta.PropertyOrBuilder> + getPropertiesFieldBuilder() { + if (propertiesBuilder_ == null) { + propertiesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.admin.v1beta.Property, + com.google.analytics.admin.v1beta.Property.Builder, + com.google.analytics.admin.v1beta.PropertyOrBuilder>( + properties_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + properties_ = null; + } + return propertiesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + 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.admin.v1beta.ListPropertiesResponse) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.ListPropertiesResponse) + private static final com.google.analytics.admin.v1beta.ListPropertiesResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.ListPropertiesResponse(); + } + + public static com.google.analytics.admin.v1beta.ListPropertiesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListPropertiesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListPropertiesResponse(input, extensionRegistry); + } + }; + + 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.admin.v1beta.ListPropertiesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListPropertiesResponseOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListPropertiesResponseOrBuilder.java new file mode 100644 index 000000000000..b83b2c4620ac --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ListPropertiesResponseOrBuilder.java @@ -0,0 +1,104 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +public interface ListPropertiesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.ListPropertiesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Results that matched the filter criteria and were accessible to the caller.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.Property properties = 1; + */ + java.util.List getPropertiesList(); + /** + * + * + *
+   * Results that matched the filter criteria and were accessible to the caller.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.Property properties = 1; + */ + com.google.analytics.admin.v1beta.Property getProperties(int index); + /** + * + * + *
+   * Results that matched the filter criteria and were accessible to the caller.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.Property properties = 1; + */ + int getPropertiesCount(); + /** + * + * + *
+   * Results that matched the filter criteria and were accessible to the caller.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.Property properties = 1; + */ + java.util.List + getPropertiesOrBuilderList(); + /** + * + * + *
+   * Results that matched the filter criteria and were accessible to the caller.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.Property properties = 1; + */ + com.google.analytics.admin.v1beta.PropertyOrBuilder getPropertiesOrBuilder(int index); + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/MeasurementProtocolSecret.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/MeasurementProtocolSecret.java new file mode 100644 index 000000000000..5bb51e5a68a8 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/MeasurementProtocolSecret.java @@ -0,0 +1,1032 @@ +/* + * Copyright 2020 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/admin/v1beta/resources.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * A secret value used for sending hits to Measurement Protocol.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.MeasurementProtocolSecret} + */ +public final class MeasurementProtocolSecret extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.MeasurementProtocolSecret) + MeasurementProtocolSecretOrBuilder { + private static final long serialVersionUID = 0L; + // Use MeasurementProtocolSecret.newBuilder() to construct. + private MeasurementProtocolSecret(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MeasurementProtocolSecret() { + name_ = ""; + displayName_ = ""; + secretValue_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MeasurementProtocolSecret(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private MeasurementProtocolSecret( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + secretValue_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_MeasurementProtocolSecret_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_MeasurementProtocolSecret_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.MeasurementProtocolSecret.class, + com.google.analytics.admin.v1beta.MeasurementProtocolSecret.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Output only. Resource name of this secret. This secret may be a child of any type of
+   * stream.
+   * Format:
+   * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret}
+   * 
+ * + * string name = 1 [(.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. Resource name of this secret. This secret may be a child of any type of
+   * stream.
+   * Format:
+   * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret}
+   * 
+ * + * string name = 1 [(.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 DISPLAY_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * Required. Human-readable display name for this secret.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Human-readable display name for this secret.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SECRET_VALUE_FIELD_NUMBER = 3; + private volatile java.lang.Object secretValue_; + /** + * + * + *
+   * Output only. The measurement protocol secret value. Pass this value to the api_secret
+   * field of the Measurement Protocol API when sending hits to this
+   * secret's parent property.
+   * 
+ * + * string secret_value = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The secretValue. + */ + @java.lang.Override + public java.lang.String getSecretValue() { + java.lang.Object ref = secretValue_; + 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(); + secretValue_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The measurement protocol secret value. Pass this value to the api_secret
+   * field of the Measurement Protocol API when sending hits to this
+   * secret's parent property.
+   * 
+ * + * string secret_value = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for secretValue. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSecretValueBytes() { + java.lang.Object ref = secretValue_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + secretValue_ = 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_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(secretValue_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, secretValue_); + } + unknownFields.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(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(secretValue_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, secretValue_); + } + size += unknownFields.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.admin.v1beta.MeasurementProtocolSecret)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.MeasurementProtocolSecret other = + (com.google.analytics.admin.v1beta.MeasurementProtocolSecret) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getSecretValue().equals(other.getSecretValue())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + SECRET_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getSecretValue().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.MeasurementProtocolSecret parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.MeasurementProtocolSecret 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.admin.v1beta.MeasurementProtocolSecret parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.MeasurementProtocolSecret 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.admin.v1beta.MeasurementProtocolSecret parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.MeasurementProtocolSecret parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.MeasurementProtocolSecret parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.MeasurementProtocolSecret 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.admin.v1beta.MeasurementProtocolSecret parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.MeasurementProtocolSecret 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.admin.v1beta.MeasurementProtocolSecret parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.MeasurementProtocolSecret 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.admin.v1beta.MeasurementProtocolSecret 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 secret value used for sending hits to Measurement Protocol.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.MeasurementProtocolSecret} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.MeasurementProtocolSecret) + com.google.analytics.admin.v1beta.MeasurementProtocolSecretOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_MeasurementProtocolSecret_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_MeasurementProtocolSecret_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.MeasurementProtocolSecret.class, + com.google.analytics.admin.v1beta.MeasurementProtocolSecret.Builder.class); + } + + // Construct using com.google.analytics.admin.v1beta.MeasurementProtocolSecret.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + displayName_ = ""; + + secretValue_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_MeasurementProtocolSecret_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.MeasurementProtocolSecret getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.MeasurementProtocolSecret.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.MeasurementProtocolSecret build() { + com.google.analytics.admin.v1beta.MeasurementProtocolSecret result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.MeasurementProtocolSecret buildPartial() { + com.google.analytics.admin.v1beta.MeasurementProtocolSecret result = + new com.google.analytics.admin.v1beta.MeasurementProtocolSecret(this); + result.name_ = name_; + result.displayName_ = displayName_; + result.secretValue_ = secretValue_; + onBuilt(); + return result; + } + + @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.admin.v1beta.MeasurementProtocolSecret) { + return mergeFrom((com.google.analytics.admin.v1beta.MeasurementProtocolSecret) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1beta.MeasurementProtocolSecret other) { + if (other == com.google.analytics.admin.v1beta.MeasurementProtocolSecret.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getSecretValue().isEmpty()) { + secretValue_ = other.secretValue_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.MeasurementProtocolSecret parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.MeasurementProtocolSecret) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. Resource name of this secret. This secret may be a child of any type of
+     * stream.
+     * Format:
+     * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret}
+     * 
+ * + * string name = 1 [(.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. Resource name of this secret. This secret may be a child of any type of
+     * stream.
+     * Format:
+     * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret}
+     * 
+ * + * string name = 1 [(.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. Resource name of this secret. This secret may be a child of any type of
+     * stream.
+     * Format:
+     * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret}
+     * 
+ * + * string name = 1 [(.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; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Resource name of this secret. This secret may be a child of any type of
+     * stream.
+     * Format:
+     * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Resource name of this secret. This secret may be a child of any type of
+     * stream.
+     * Format:
+     * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret}
+     * 
+ * + * string name = 1 [(.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; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Required. Human-readable display name for this secret.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Human-readable display name for this secret.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Human-readable display name for this secret.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Human-readable display name for this secret.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Human-readable display name for this secret.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private java.lang.Object secretValue_ = ""; + /** + * + * + *
+     * Output only. The measurement protocol secret value. Pass this value to the api_secret
+     * field of the Measurement Protocol API when sending hits to this
+     * secret's parent property.
+     * 
+ * + * string secret_value = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The secretValue. + */ + public java.lang.String getSecretValue() { + java.lang.Object ref = secretValue_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + secretValue_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The measurement protocol secret value. Pass this value to the api_secret
+     * field of the Measurement Protocol API when sending hits to this
+     * secret's parent property.
+     * 
+ * + * string secret_value = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for secretValue. + */ + public com.google.protobuf.ByteString getSecretValueBytes() { + java.lang.Object ref = secretValue_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + secretValue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The measurement protocol secret value. Pass this value to the api_secret
+     * field of the Measurement Protocol API when sending hits to this
+     * secret's parent property.
+     * 
+ * + * string secret_value = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The secretValue to set. + * @return This builder for chaining. + */ + public Builder setSecretValue(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + secretValue_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The measurement protocol secret value. Pass this value to the api_secret
+     * field of the Measurement Protocol API when sending hits to this
+     * secret's parent property.
+     * 
+ * + * string secret_value = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearSecretValue() { + + secretValue_ = getDefaultInstance().getSecretValue(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The measurement protocol secret value. Pass this value to the api_secret
+     * field of the Measurement Protocol API when sending hits to this
+     * secret's parent property.
+     * 
+ * + * string secret_value = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for secretValue to set. + * @return This builder for chaining. + */ + public Builder setSecretValueBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + secretValue_ = value; + 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.admin.v1beta.MeasurementProtocolSecret) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.MeasurementProtocolSecret) + private static final com.google.analytics.admin.v1beta.MeasurementProtocolSecret DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.MeasurementProtocolSecret(); + } + + public static com.google.analytics.admin.v1beta.MeasurementProtocolSecret getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MeasurementProtocolSecret parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new MeasurementProtocolSecret(input, extensionRegistry); + } + }; + + 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.admin.v1beta.MeasurementProtocolSecret getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/MeasurementProtocolSecretName.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/MeasurementProtocolSecretName.java new file mode 100644 index 000000000000..586ba50db256 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/MeasurementProtocolSecretName.java @@ -0,0 +1,241 @@ +/* + * Copyright 2022 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.admin.v1beta; + +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 MeasurementProtocolSecretName implements ResourceName { + private static final PathTemplate PROPERTY_DATA_STREAM_MEASUREMENT_PROTOCOL_SECRET = + PathTemplate.createWithoutUrlEncoding( + "properties/{property}/dataStreams/{data_stream}/measurementProtocolSecrets/{measurement_protocol_secret}"); + private volatile Map fieldValuesMap; + private final String property; + private final String dataStream; + private final String measurementProtocolSecret; + + @Deprecated + protected MeasurementProtocolSecretName() { + property = null; + dataStream = null; + measurementProtocolSecret = null; + } + + private MeasurementProtocolSecretName(Builder builder) { + property = Preconditions.checkNotNull(builder.getProperty()); + dataStream = Preconditions.checkNotNull(builder.getDataStream()); + measurementProtocolSecret = Preconditions.checkNotNull(builder.getMeasurementProtocolSecret()); + } + + public String getProperty() { + return property; + } + + public String getDataStream() { + return dataStream; + } + + public String getMeasurementProtocolSecret() { + return measurementProtocolSecret; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static MeasurementProtocolSecretName of( + String property, String dataStream, String measurementProtocolSecret) { + return newBuilder() + .setProperty(property) + .setDataStream(dataStream) + .setMeasurementProtocolSecret(measurementProtocolSecret) + .build(); + } + + public static String format( + String property, String dataStream, String measurementProtocolSecret) { + return newBuilder() + .setProperty(property) + .setDataStream(dataStream) + .setMeasurementProtocolSecret(measurementProtocolSecret) + .build() + .toString(); + } + + public static MeasurementProtocolSecretName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROPERTY_DATA_STREAM_MEASUREMENT_PROTOCOL_SECRET.validatedMatch( + formattedString, + "MeasurementProtocolSecretName.parse: formattedString not in valid format"); + return of( + matchMap.get("property"), + matchMap.get("data_stream"), + matchMap.get("measurement_protocol_secret")); + } + + 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 (MeasurementProtocolSecretName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROPERTY_DATA_STREAM_MEASUREMENT_PROTOCOL_SECRET.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 (dataStream != null) { + fieldMapBuilder.put("data_stream", dataStream); + } + if (measurementProtocolSecret != null) { + fieldMapBuilder.put("measurement_protocol_secret", measurementProtocolSecret); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROPERTY_DATA_STREAM_MEASUREMENT_PROTOCOL_SECRET.instantiate( + "property", + property, + "data_stream", + dataStream, + "measurement_protocol_secret", + measurementProtocolSecret); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + MeasurementProtocolSecretName that = ((MeasurementProtocolSecretName) o); + return Objects.equals(this.property, that.property) + && Objects.equals(this.dataStream, that.dataStream) + && Objects.equals(this.measurementProtocolSecret, that.measurementProtocolSecret); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(property); + h *= 1000003; + h ^= Objects.hashCode(dataStream); + h *= 1000003; + h ^= Objects.hashCode(measurementProtocolSecret); + return h; + } + + /** + * Builder for + * properties/{property}/dataStreams/{data_stream}/measurementProtocolSecrets/{measurement_protocol_secret}. + */ + public static class Builder { + private String property; + private String dataStream; + private String measurementProtocolSecret; + + protected Builder() {} + + public String getProperty() { + return property; + } + + public String getDataStream() { + return dataStream; + } + + public String getMeasurementProtocolSecret() { + return measurementProtocolSecret; + } + + public Builder setProperty(String property) { + this.property = property; + return this; + } + + public Builder setDataStream(String dataStream) { + this.dataStream = dataStream; + return this; + } + + public Builder setMeasurementProtocolSecret(String measurementProtocolSecret) { + this.measurementProtocolSecret = measurementProtocolSecret; + return this; + } + + private Builder(MeasurementProtocolSecretName measurementProtocolSecretName) { + this.property = measurementProtocolSecretName.property; + this.dataStream = measurementProtocolSecretName.dataStream; + this.measurementProtocolSecret = measurementProtocolSecretName.measurementProtocolSecret; + } + + public MeasurementProtocolSecretName build() { + return new MeasurementProtocolSecretName(this); + } + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/MeasurementProtocolSecretOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/MeasurementProtocolSecretOrBuilder.java new file mode 100644 index 000000000000..d250e4e8189f --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/MeasurementProtocolSecretOrBuilder.java @@ -0,0 +1,110 @@ +/* + * Copyright 2020 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/admin/v1beta/resources.proto + +package com.google.analytics.admin.v1beta; + +public interface MeasurementProtocolSecretOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.MeasurementProtocolSecret) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Resource name of this secret. This secret may be a child of any type of
+   * stream.
+   * Format:
+   * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. Resource name of this secret. This secret may be a child of any type of
+   * stream.
+   * Format:
+   * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. Human-readable display name for this secret.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Required. Human-readable display name for this secret.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Output only. The measurement protocol secret value. Pass this value to the api_secret
+   * field of the Measurement Protocol API when sending hits to this
+   * secret's parent property.
+   * 
+ * + * string secret_value = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The secretValue. + */ + java.lang.String getSecretValue(); + /** + * + * + *
+   * Output only. The measurement protocol secret value. Pass this value to the api_secret
+   * field of the Measurement Protocol API when sending hits to this
+   * secret's parent property.
+   * 
+ * + * string secret_value = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for secretValue. + */ + com.google.protobuf.ByteString getSecretValueBytes(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/Property.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/Property.java new file mode 100644 index 000000000000..830a2404fdbe --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/Property.java @@ -0,0 +1,3383 @@ +/* + * Copyright 2020 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/admin/v1beta/resources.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * A resource message representing a Google Analytics GA4 property.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.Property} + */ +public final class Property extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.Property) + PropertyOrBuilder { + private static final long serialVersionUID = 0L; + // Use Property.newBuilder() to construct. + private Property(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Property() { + name_ = ""; + propertyType_ = 0; + parent_ = ""; + displayName_ = ""; + industryCategory_ = 0; + timeZone_ = ""; + currencyCode_ = ""; + serviceLevel_ = 0; + account_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Property(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Property( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 26: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 48: + { + int rawValue = input.readEnum(); + + industryCategory_ = rawValue; + break; + } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + + timeZone_ = s; + break; + } + case 66: + { + java.lang.String s = input.readStringRequireUtf8(); + + currencyCode_ = s; + break; + } + case 80: + { + int rawValue = input.readEnum(); + + serviceLevel_ = rawValue; + break; + } + case 90: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (deleteTime_ != null) { + subBuilder = deleteTime_.toBuilder(); + } + deleteTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(deleteTime_); + deleteTime_ = subBuilder.buildPartial(); + } + + break; + } + case 98: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (expireTime_ != null) { + subBuilder = expireTime_.toBuilder(); + } + expireTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(expireTime_); + expireTime_ = subBuilder.buildPartial(); + } + + break; + } + case 106: + { + java.lang.String s = input.readStringRequireUtf8(); + + account_ = s; + break; + } + case 112: + { + int rawValue = input.readEnum(); + + propertyType_ = rawValue; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_Property_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_Property_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.Property.class, + com.google.analytics.admin.v1beta.Property.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Output only. Resource name of this property.
+   * Format: properties/{property_id}
+   * Example: "properties/1000"
+   * 
+ * + * string name = 1 [(.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. Resource name of this property.
+   * Format: properties/{property_id}
+   * Example: "properties/1000"
+   * 
+ * + * string name = 1 [(.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 PROPERTY_TYPE_FIELD_NUMBER = 14; + private int propertyType_; + /** + * + * + *
+   * Immutable. The property type for this Property resource. When creating a property, if
+   * the type is "PROPERTY_TYPE_UNSPECIFIED", then "ORDINARY_PROPERTY" will be
+   * implied. "SUBPROPERTY" and "ROLLUP_PROPERTY" types cannot yet be created
+   * via Google Analytics Admin API.
+   * 
+ * + * + * .google.analytics.admin.v1beta.PropertyType property_type = 14 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for propertyType. + */ + @java.lang.Override + public int getPropertyTypeValue() { + return propertyType_; + } + /** + * + * + *
+   * Immutable. The property type for this Property resource. When creating a property, if
+   * the type is "PROPERTY_TYPE_UNSPECIFIED", then "ORDINARY_PROPERTY" will be
+   * implied. "SUBPROPERTY" and "ROLLUP_PROPERTY" types cannot yet be created
+   * via Google Analytics Admin API.
+   * 
+ * + * + * .google.analytics.admin.v1beta.PropertyType property_type = 14 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The propertyType. + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.PropertyType getPropertyType() { + @SuppressWarnings("deprecation") + com.google.analytics.admin.v1beta.PropertyType result = + com.google.analytics.admin.v1beta.PropertyType.valueOf(propertyType_); + return result == null ? com.google.analytics.admin.v1beta.PropertyType.UNRECOGNIZED : result; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Time when the entity was originally created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. Time when the entity was originally created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Time when the entity was originally created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. Time when entity payload fields were last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. Time when entity payload fields were last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. Time when entity payload fields were last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + public static final int PARENT_FIELD_NUMBER = 2; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Immutable. Resource name of this property's logical parent.
+   * Note: The Property-Moving UI can be used to change the parent.
+   * Format: accounts/{account}, properties/{property}
+   * Example: "accounts/100", "properties/101"
+   * 
+ * + * string parent = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @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; + } + } + /** + * + * + *
+   * Immutable. Resource name of this property's logical parent.
+   * Note: The Property-Moving UI can be used to change the parent.
+   * Format: accounts/{account}, properties/{property}
+   * Example: "accounts/100", "properties/101"
+   * 
+ * + * string parent = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @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 DISPLAY_NAME_FIELD_NUMBER = 5; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * Required. Human-readable display name for this property.
+   * The max allowed display name length is 100 UTF-16 code units.
+   * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Human-readable display name for this property.
+   * The max allowed display name length is 100 UTF-16 code units.
+   * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INDUSTRY_CATEGORY_FIELD_NUMBER = 6; + private int industryCategory_; + /** + * + * + *
+   * Industry associated with this property
+   * Example: AUTOMOTIVE, FOOD_AND_DRINK
+   * 
+ * + * .google.analytics.admin.v1beta.IndustryCategory industry_category = 6; + * + * @return The enum numeric value on the wire for industryCategory. + */ + @java.lang.Override + public int getIndustryCategoryValue() { + return industryCategory_; + } + /** + * + * + *
+   * Industry associated with this property
+   * Example: AUTOMOTIVE, FOOD_AND_DRINK
+   * 
+ * + * .google.analytics.admin.v1beta.IndustryCategory industry_category = 6; + * + * @return The industryCategory. + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.IndustryCategory getIndustryCategory() { + @SuppressWarnings("deprecation") + com.google.analytics.admin.v1beta.IndustryCategory result = + com.google.analytics.admin.v1beta.IndustryCategory.valueOf(industryCategory_); + return result == null + ? com.google.analytics.admin.v1beta.IndustryCategory.UNRECOGNIZED + : result; + } + + public static final int TIME_ZONE_FIELD_NUMBER = 7; + private volatile java.lang.Object timeZone_; + /** + * + * + *
+   * Required. Reporting Time Zone, used as the day boundary for reports, regardless of
+   * where the data originates. If the time zone honors DST, Analytics will
+   * automatically adjust for the changes.
+   * NOTE: Changing the time zone only affects data going forward, and is not
+   * applied retroactively.
+   * Format: https://www.iana.org/time-zones
+   * Example: "America/Los_Angeles"
+   * 
+ * + * string time_zone = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The timeZone. + */ + @java.lang.Override + public java.lang.String getTimeZone() { + java.lang.Object ref = timeZone_; + 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(); + timeZone_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Reporting Time Zone, used as the day boundary for reports, regardless of
+   * where the data originates. If the time zone honors DST, Analytics will
+   * automatically adjust for the changes.
+   * NOTE: Changing the time zone only affects data going forward, and is not
+   * applied retroactively.
+   * Format: https://www.iana.org/time-zones
+   * Example: "America/Los_Angeles"
+   * 
+ * + * string time_zone = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for timeZone. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTimeZoneBytes() { + java.lang.Object ref = timeZone_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + timeZone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CURRENCY_CODE_FIELD_NUMBER = 8; + private volatile java.lang.Object currencyCode_; + /** + * + * + *
+   * The currency type used in reports involving monetary values.
+   * Format: https://en.wikipedia.org/wiki/ISO_4217
+   * Examples: "USD", "EUR", "JPY"
+   * 
+ * + * string currency_code = 8; + * + * @return The currencyCode. + */ + @java.lang.Override + public java.lang.String getCurrencyCode() { + java.lang.Object ref = currencyCode_; + 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(); + currencyCode_ = s; + return s; + } + } + /** + * + * + *
+   * The currency type used in reports involving monetary values.
+   * Format: https://en.wikipedia.org/wiki/ISO_4217
+   * Examples: "USD", "EUR", "JPY"
+   * 
+ * + * string currency_code = 8; + * + * @return The bytes for currencyCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCurrencyCodeBytes() { + java.lang.Object ref = currencyCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + currencyCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERVICE_LEVEL_FIELD_NUMBER = 10; + private int serviceLevel_; + /** + * + * + *
+   * Output only. The Google Analytics service level that applies to this property.
+   * 
+ * + * + * .google.analytics.admin.v1beta.ServiceLevel service_level = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for serviceLevel. + */ + @java.lang.Override + public int getServiceLevelValue() { + return serviceLevel_; + } + /** + * + * + *
+   * Output only. The Google Analytics service level that applies to this property.
+   * 
+ * + * + * .google.analytics.admin.v1beta.ServiceLevel service_level = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The serviceLevel. + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.ServiceLevel getServiceLevel() { + @SuppressWarnings("deprecation") + com.google.analytics.admin.v1beta.ServiceLevel result = + com.google.analytics.admin.v1beta.ServiceLevel.valueOf(serviceLevel_); + return result == null ? com.google.analytics.admin.v1beta.ServiceLevel.UNRECOGNIZED : result; + } + + public static final int DELETE_TIME_FIELD_NUMBER = 11; + private com.google.protobuf.Timestamp deleteTime_; + /** + * + * + *
+   * Output only. If set, the time at which this property was trashed. If not set, then this
+   * property is not currently in the trash can.
+   * 
+ * + * .google.protobuf.Timestamp delete_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the deleteTime field is set. + */ + @java.lang.Override + public boolean hasDeleteTime() { + return deleteTime_ != null; + } + /** + * + * + *
+   * Output only. If set, the time at which this property was trashed. If not set, then this
+   * property is not currently in the trash can.
+   * 
+ * + * .google.protobuf.Timestamp delete_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The deleteTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getDeleteTime() { + return deleteTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : deleteTime_; + } + /** + * + * + *
+   * Output only. If set, the time at which this property was trashed. If not set, then this
+   * property is not currently in the trash can.
+   * 
+ * + * .google.protobuf.Timestamp delete_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder() { + return getDeleteTime(); + } + + public static final int EXPIRE_TIME_FIELD_NUMBER = 12; + private com.google.protobuf.Timestamp expireTime_; + /** + * + * + *
+   * Output only. If set, the time at which this trashed property will be permanently
+   * deleted. If not set, then this property is not currently in the trash can
+   * and is not slated to be deleted.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the expireTime field is set. + */ + @java.lang.Override + public boolean hasExpireTime() { + return expireTime_ != null; + } + /** + * + * + *
+   * Output only. If set, the time at which this trashed property will be permanently
+   * deleted. If not set, then this property is not currently in the trash can
+   * and is not slated to be deleted.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The expireTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getExpireTime() { + return expireTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expireTime_; + } + /** + * + * + *
+   * Output only. If set, the time at which this trashed property will be permanently
+   * deleted. If not set, then this property is not currently in the trash can
+   * and is not slated to be deleted.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { + return getExpireTime(); + } + + public static final int ACCOUNT_FIELD_NUMBER = 13; + private volatile java.lang.Object account_; + /** + * + * + *
+   * Immutable. The resource name of the parent account
+   * Format: accounts/{account_id}
+   * Example: "accounts/123"
+   * 
+ * + * + * string account = 13 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The account. + */ + @java.lang.Override + public java.lang.String getAccount() { + java.lang.Object ref = account_; + 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(); + account_ = s; + return s; + } + } + /** + * + * + *
+   * Immutable. The resource name of the parent account
+   * Format: accounts/{account_id}
+   * Example: "accounts/123"
+   * 
+ * + * + * string account = 13 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for account. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAccountBytes() { + java.lang.Object ref = account_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + account_ = 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_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, parent_); + } + if (createTime_ != null) { + output.writeMessage(3, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(4, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, displayName_); + } + if (industryCategory_ + != com.google.analytics.admin.v1beta.IndustryCategory.INDUSTRY_CATEGORY_UNSPECIFIED + .getNumber()) { + output.writeEnum(6, industryCategory_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(timeZone_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, timeZone_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(currencyCode_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, currencyCode_); + } + if (serviceLevel_ + != com.google.analytics.admin.v1beta.ServiceLevel.SERVICE_LEVEL_UNSPECIFIED.getNumber()) { + output.writeEnum(10, serviceLevel_); + } + if (deleteTime_ != null) { + output.writeMessage(11, getDeleteTime()); + } + if (expireTime_ != null) { + output.writeMessage(12, getExpireTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(account_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 13, account_); + } + if (propertyType_ + != com.google.analytics.admin.v1beta.PropertyType.PROPERTY_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(14, propertyType_); + } + unknownFields.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(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, parent_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, displayName_); + } + if (industryCategory_ + != com.google.analytics.admin.v1beta.IndustryCategory.INDUSTRY_CATEGORY_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, industryCategory_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(timeZone_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, timeZone_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(currencyCode_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, currencyCode_); + } + if (serviceLevel_ + != com.google.analytics.admin.v1beta.ServiceLevel.SERVICE_LEVEL_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(10, serviceLevel_); + } + if (deleteTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getDeleteTime()); + } + if (expireTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getExpireTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(account_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, account_); + } + if (propertyType_ + != com.google.analytics.admin.v1beta.PropertyType.PROPERTY_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(14, propertyType_); + } + size += unknownFields.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.admin.v1beta.Property)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.Property other = + (com.google.analytics.admin.v1beta.Property) obj; + + if (!getName().equals(other.getName())) return false; + if (propertyType_ != other.propertyType_) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getParent().equals(other.getParent())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (industryCategory_ != other.industryCategory_) return false; + if (!getTimeZone().equals(other.getTimeZone())) return false; + if (!getCurrencyCode().equals(other.getCurrencyCode())) return false; + if (serviceLevel_ != other.serviceLevel_) return false; + if (hasDeleteTime() != other.hasDeleteTime()) return false; + if (hasDeleteTime()) { + if (!getDeleteTime().equals(other.getDeleteTime())) return false; + } + if (hasExpireTime() != other.hasExpireTime()) return false; + if (hasExpireTime()) { + if (!getExpireTime().equals(other.getExpireTime())) return false; + } + if (!getAccount().equals(other.getAccount())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + PROPERTY_TYPE_FIELD_NUMBER; + hash = (53 * hash) + propertyType_; + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + INDUSTRY_CATEGORY_FIELD_NUMBER; + hash = (53 * hash) + industryCategory_; + hash = (37 * hash) + TIME_ZONE_FIELD_NUMBER; + hash = (53 * hash) + getTimeZone().hashCode(); + hash = (37 * hash) + CURRENCY_CODE_FIELD_NUMBER; + hash = (53 * hash) + getCurrencyCode().hashCode(); + hash = (37 * hash) + SERVICE_LEVEL_FIELD_NUMBER; + hash = (53 * hash) + serviceLevel_; + if (hasDeleteTime()) { + hash = (37 * hash) + DELETE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getDeleteTime().hashCode(); + } + if (hasExpireTime()) { + hash = (37 * hash) + EXPIRE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getExpireTime().hashCode(); + } + hash = (37 * hash) + ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getAccount().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.Property parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.Property 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.admin.v1beta.Property parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.Property 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.admin.v1beta.Property parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.Property parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.Property parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.Property 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.admin.v1beta.Property parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.Property 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.admin.v1beta.Property parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.Property 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.admin.v1beta.Property 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 resource message representing a Google Analytics GA4 property.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.Property} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.Property) + com.google.analytics.admin.v1beta.PropertyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_Property_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_Property_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.Property.class, + com.google.analytics.admin.v1beta.Property.Builder.class); + } + + // Construct using com.google.analytics.admin.v1beta.Property.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + propertyType_ = 0; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + parent_ = ""; + + displayName_ = ""; + + industryCategory_ = 0; + + timeZone_ = ""; + + currencyCode_ = ""; + + serviceLevel_ = 0; + + if (deleteTimeBuilder_ == null) { + deleteTime_ = null; + } else { + deleteTime_ = null; + deleteTimeBuilder_ = null; + } + if (expireTimeBuilder_ == null) { + expireTime_ = null; + } else { + expireTime_ = null; + expireTimeBuilder_ = null; + } + account_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_Property_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.Property getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.Property.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.Property build() { + com.google.analytics.admin.v1beta.Property result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.Property buildPartial() { + com.google.analytics.admin.v1beta.Property result = + new com.google.analytics.admin.v1beta.Property(this); + result.name_ = name_; + result.propertyType_ = propertyType_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + result.parent_ = parent_; + result.displayName_ = displayName_; + result.industryCategory_ = industryCategory_; + result.timeZone_ = timeZone_; + result.currencyCode_ = currencyCode_; + result.serviceLevel_ = serviceLevel_; + if (deleteTimeBuilder_ == null) { + result.deleteTime_ = deleteTime_; + } else { + result.deleteTime_ = deleteTimeBuilder_.build(); + } + if (expireTimeBuilder_ == null) { + result.expireTime_ = expireTime_; + } else { + result.expireTime_ = expireTimeBuilder_.build(); + } + result.account_ = account_; + onBuilt(); + return result; + } + + @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.admin.v1beta.Property) { + return mergeFrom((com.google.analytics.admin.v1beta.Property) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1beta.Property other) { + if (other == com.google.analytics.admin.v1beta.Property.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.propertyType_ != 0) { + setPropertyTypeValue(other.getPropertyTypeValue()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (other.industryCategory_ != 0) { + setIndustryCategoryValue(other.getIndustryCategoryValue()); + } + if (!other.getTimeZone().isEmpty()) { + timeZone_ = other.timeZone_; + onChanged(); + } + if (!other.getCurrencyCode().isEmpty()) { + currencyCode_ = other.currencyCode_; + onChanged(); + } + if (other.serviceLevel_ != 0) { + setServiceLevelValue(other.getServiceLevelValue()); + } + if (other.hasDeleteTime()) { + mergeDeleteTime(other.getDeleteTime()); + } + if (other.hasExpireTime()) { + mergeExpireTime(other.getExpireTime()); + } + if (!other.getAccount().isEmpty()) { + account_ = other.account_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.Property parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.analytics.admin.v1beta.Property) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. Resource name of this property.
+     * Format: properties/{property_id}
+     * Example: "properties/1000"
+     * 
+ * + * string name = 1 [(.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. Resource name of this property.
+     * Format: properties/{property_id}
+     * Example: "properties/1000"
+     * 
+ * + * string name = 1 [(.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. Resource name of this property.
+     * Format: properties/{property_id}
+     * Example: "properties/1000"
+     * 
+ * + * string name = 1 [(.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; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Resource name of this property.
+     * Format: properties/{property_id}
+     * Example: "properties/1000"
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Resource name of this property.
+     * Format: properties/{property_id}
+     * Example: "properties/1000"
+     * 
+ * + * string name = 1 [(.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; + onChanged(); + return this; + } + + private int propertyType_ = 0; + /** + * + * + *
+     * Immutable. The property type for this Property resource. When creating a property, if
+     * the type is "PROPERTY_TYPE_UNSPECIFIED", then "ORDINARY_PROPERTY" will be
+     * implied. "SUBPROPERTY" and "ROLLUP_PROPERTY" types cannot yet be created
+     * via Google Analytics Admin API.
+     * 
+ * + * + * .google.analytics.admin.v1beta.PropertyType property_type = 14 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for propertyType. + */ + @java.lang.Override + public int getPropertyTypeValue() { + return propertyType_; + } + /** + * + * + *
+     * Immutable. The property type for this Property resource. When creating a property, if
+     * the type is "PROPERTY_TYPE_UNSPECIFIED", then "ORDINARY_PROPERTY" will be
+     * implied. "SUBPROPERTY" and "ROLLUP_PROPERTY" types cannot yet be created
+     * via Google Analytics Admin API.
+     * 
+ * + * + * .google.analytics.admin.v1beta.PropertyType property_type = 14 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The enum numeric value on the wire for propertyType to set. + * @return This builder for chaining. + */ + public Builder setPropertyTypeValue(int value) { + + propertyType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The property type for this Property resource. When creating a property, if
+     * the type is "PROPERTY_TYPE_UNSPECIFIED", then "ORDINARY_PROPERTY" will be
+     * implied. "SUBPROPERTY" and "ROLLUP_PROPERTY" types cannot yet be created
+     * via Google Analytics Admin API.
+     * 
+ * + * + * .google.analytics.admin.v1beta.PropertyType property_type = 14 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The propertyType. + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.PropertyType getPropertyType() { + @SuppressWarnings("deprecation") + com.google.analytics.admin.v1beta.PropertyType result = + com.google.analytics.admin.v1beta.PropertyType.valueOf(propertyType_); + return result == null ? com.google.analytics.admin.v1beta.PropertyType.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Immutable. The property type for this Property resource. When creating a property, if
+     * the type is "PROPERTY_TYPE_UNSPECIFIED", then "ORDINARY_PROPERTY" will be
+     * implied. "SUBPROPERTY" and "ROLLUP_PROPERTY" types cannot yet be created
+     * via Google Analytics Admin API.
+     * 
+ * + * + * .google.analytics.admin.v1beta.PropertyType property_type = 14 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The propertyType to set. + * @return This builder for chaining. + */ + public Builder setPropertyType(com.google.analytics.admin.v1beta.PropertyType value) { + if (value == null) { + throw new NullPointerException(); + } + + propertyType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The property type for this Property resource. When creating a property, if
+     * the type is "PROPERTY_TYPE_UNSPECIFIED", then "ORDINARY_PROPERTY" will be
+     * implied. "SUBPROPERTY" and "ROLLUP_PROPERTY" types cannot yet be created
+     * via Google Analytics Admin API.
+     * 
+ * + * + * .google.analytics.admin.v1beta.PropertyType property_type = 14 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return This builder for chaining. + */ + public Builder clearPropertyType() { + + propertyType_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. Time when the entity was originally created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. Time when the entity was originally created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when the entity was originally created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the entity was originally created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the entity was originally created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the entity was originally created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the entity was originally created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when the entity was originally created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Time when the entity was originally created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. Time when entity payload fields were last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * Output only. Time when entity payload fields were last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when entity payload fields were last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when entity payload fields were last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when entity payload fields were last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when entity payload fields were last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Time when entity payload fields were last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when entity payload fields were last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. Time when entity payload fields were last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Immutable. Resource name of this property's logical parent.
+     * Note: The Property-Moving UI can be used to change the parent.
+     * Format: accounts/{account}, properties/{property}
+     * Example: "accounts/100", "properties/101"
+     * 
+ * + * string parent = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @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; + } + } + /** + * + * + *
+     * Immutable. Resource name of this property's logical parent.
+     * Note: The Property-Moving UI can be used to change the parent.
+     * Format: accounts/{account}, properties/{property}
+     * Example: "accounts/100", "properties/101"
+     * 
+ * + * string parent = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @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; + } + } + /** + * + * + *
+     * Immutable. Resource name of this property's logical parent.
+     * Note: The Property-Moving UI can be used to change the parent.
+     * Format: accounts/{account}, properties/{property}
+     * Example: "accounts/100", "properties/101"
+     * 
+ * + * string parent = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @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; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. Resource name of this property's logical parent.
+     * Note: The Property-Moving UI can be used to change the parent.
+     * Format: accounts/{account}, properties/{property}
+     * Example: "accounts/100", "properties/101"
+     * 
+ * + * string parent = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. Resource name of this property's logical parent.
+     * Note: The Property-Moving UI can be used to change the parent.
+     * Format: accounts/{account}, properties/{property}
+     * Example: "accounts/100", "properties/101"
+     * 
+ * + * string parent = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @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; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Required. Human-readable display name for this property.
+     * The max allowed display name length is 100 UTF-16 code units.
+     * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Human-readable display name for this property.
+     * The max allowed display name length is 100 UTF-16 code units.
+     * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Human-readable display name for this property.
+     * The max allowed display name length is 100 UTF-16 code units.
+     * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Human-readable display name for this property.
+     * The max allowed display name length is 100 UTF-16 code units.
+     * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Human-readable display name for this property.
+     * The max allowed display name length is 100 UTF-16 code units.
+     * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private int industryCategory_ = 0; + /** + * + * + *
+     * Industry associated with this property
+     * Example: AUTOMOTIVE, FOOD_AND_DRINK
+     * 
+ * + * .google.analytics.admin.v1beta.IndustryCategory industry_category = 6; + * + * @return The enum numeric value on the wire for industryCategory. + */ + @java.lang.Override + public int getIndustryCategoryValue() { + return industryCategory_; + } + /** + * + * + *
+     * Industry associated with this property
+     * Example: AUTOMOTIVE, FOOD_AND_DRINK
+     * 
+ * + * .google.analytics.admin.v1beta.IndustryCategory industry_category = 6; + * + * @param value The enum numeric value on the wire for industryCategory to set. + * @return This builder for chaining. + */ + public Builder setIndustryCategoryValue(int value) { + + industryCategory_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Industry associated with this property
+     * Example: AUTOMOTIVE, FOOD_AND_DRINK
+     * 
+ * + * .google.analytics.admin.v1beta.IndustryCategory industry_category = 6; + * + * @return The industryCategory. + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.IndustryCategory getIndustryCategory() { + @SuppressWarnings("deprecation") + com.google.analytics.admin.v1beta.IndustryCategory result = + com.google.analytics.admin.v1beta.IndustryCategory.valueOf(industryCategory_); + return result == null + ? com.google.analytics.admin.v1beta.IndustryCategory.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Industry associated with this property
+     * Example: AUTOMOTIVE, FOOD_AND_DRINK
+     * 
+ * + * .google.analytics.admin.v1beta.IndustryCategory industry_category = 6; + * + * @param value The industryCategory to set. + * @return This builder for chaining. + */ + public Builder setIndustryCategory(com.google.analytics.admin.v1beta.IndustryCategory value) { + if (value == null) { + throw new NullPointerException(); + } + + industryCategory_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Industry associated with this property
+     * Example: AUTOMOTIVE, FOOD_AND_DRINK
+     * 
+ * + * .google.analytics.admin.v1beta.IndustryCategory industry_category = 6; + * + * @return This builder for chaining. + */ + public Builder clearIndustryCategory() { + + industryCategory_ = 0; + onChanged(); + return this; + } + + private java.lang.Object timeZone_ = ""; + /** + * + * + *
+     * Required. Reporting Time Zone, used as the day boundary for reports, regardless of
+     * where the data originates. If the time zone honors DST, Analytics will
+     * automatically adjust for the changes.
+     * NOTE: Changing the time zone only affects data going forward, and is not
+     * applied retroactively.
+     * Format: https://www.iana.org/time-zones
+     * Example: "America/Los_Angeles"
+     * 
+ * + * string time_zone = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The timeZone. + */ + public java.lang.String getTimeZone() { + java.lang.Object ref = timeZone_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + timeZone_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Reporting Time Zone, used as the day boundary for reports, regardless of
+     * where the data originates. If the time zone honors DST, Analytics will
+     * automatically adjust for the changes.
+     * NOTE: Changing the time zone only affects data going forward, and is not
+     * applied retroactively.
+     * Format: https://www.iana.org/time-zones
+     * Example: "America/Los_Angeles"
+     * 
+ * + * string time_zone = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for timeZone. + */ + public com.google.protobuf.ByteString getTimeZoneBytes() { + java.lang.Object ref = timeZone_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + timeZone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Reporting Time Zone, used as the day boundary for reports, regardless of
+     * where the data originates. If the time zone honors DST, Analytics will
+     * automatically adjust for the changes.
+     * NOTE: Changing the time zone only affects data going forward, and is not
+     * applied retroactively.
+     * Format: https://www.iana.org/time-zones
+     * Example: "America/Los_Angeles"
+     * 
+ * + * string time_zone = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The timeZone to set. + * @return This builder for chaining. + */ + public Builder setTimeZone(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + timeZone_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Reporting Time Zone, used as the day boundary for reports, regardless of
+     * where the data originates. If the time zone honors DST, Analytics will
+     * automatically adjust for the changes.
+     * NOTE: Changing the time zone only affects data going forward, and is not
+     * applied retroactively.
+     * Format: https://www.iana.org/time-zones
+     * Example: "America/Los_Angeles"
+     * 
+ * + * string time_zone = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearTimeZone() { + + timeZone_ = getDefaultInstance().getTimeZone(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Reporting Time Zone, used as the day boundary for reports, regardless of
+     * where the data originates. If the time zone honors DST, Analytics will
+     * automatically adjust for the changes.
+     * NOTE: Changing the time zone only affects data going forward, and is not
+     * applied retroactively.
+     * Format: https://www.iana.org/time-zones
+     * Example: "America/Los_Angeles"
+     * 
+ * + * string time_zone = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for timeZone to set. + * @return This builder for chaining. + */ + public Builder setTimeZoneBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + timeZone_ = value; + onChanged(); + return this; + } + + private java.lang.Object currencyCode_ = ""; + /** + * + * + *
+     * The currency type used in reports involving monetary values.
+     * Format: https://en.wikipedia.org/wiki/ISO_4217
+     * Examples: "USD", "EUR", "JPY"
+     * 
+ * + * string currency_code = 8; + * + * @return The currencyCode. + */ + public java.lang.String getCurrencyCode() { + java.lang.Object ref = currencyCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + currencyCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The currency type used in reports involving monetary values.
+     * Format: https://en.wikipedia.org/wiki/ISO_4217
+     * Examples: "USD", "EUR", "JPY"
+     * 
+ * + * string currency_code = 8; + * + * @return The bytes for currencyCode. + */ + public com.google.protobuf.ByteString getCurrencyCodeBytes() { + java.lang.Object ref = currencyCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + currencyCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The currency type used in reports involving monetary values.
+     * Format: https://en.wikipedia.org/wiki/ISO_4217
+     * Examples: "USD", "EUR", "JPY"
+     * 
+ * + * string currency_code = 8; + * + * @param value The currencyCode to set. + * @return This builder for chaining. + */ + public Builder setCurrencyCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + currencyCode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The currency type used in reports involving monetary values.
+     * Format: https://en.wikipedia.org/wiki/ISO_4217
+     * Examples: "USD", "EUR", "JPY"
+     * 
+ * + * string currency_code = 8; + * + * @return This builder for chaining. + */ + public Builder clearCurrencyCode() { + + currencyCode_ = getDefaultInstance().getCurrencyCode(); + onChanged(); + return this; + } + /** + * + * + *
+     * The currency type used in reports involving monetary values.
+     * Format: https://en.wikipedia.org/wiki/ISO_4217
+     * Examples: "USD", "EUR", "JPY"
+     * 
+ * + * string currency_code = 8; + * + * @param value The bytes for currencyCode to set. + * @return This builder for chaining. + */ + public Builder setCurrencyCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + currencyCode_ = value; + onChanged(); + return this; + } + + private int serviceLevel_ = 0; + /** + * + * + *
+     * Output only. The Google Analytics service level that applies to this property.
+     * 
+ * + * + * .google.analytics.admin.v1beta.ServiceLevel service_level = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for serviceLevel. + */ + @java.lang.Override + public int getServiceLevelValue() { + return serviceLevel_; + } + /** + * + * + *
+     * Output only. The Google Analytics service level that applies to this property.
+     * 
+ * + * + * .google.analytics.admin.v1beta.ServiceLevel service_level = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for serviceLevel to set. + * @return This builder for chaining. + */ + public Builder setServiceLevelValue(int value) { + + serviceLevel_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The Google Analytics service level that applies to this property.
+     * 
+ * + * + * .google.analytics.admin.v1beta.ServiceLevel service_level = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The serviceLevel. + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.ServiceLevel getServiceLevel() { + @SuppressWarnings("deprecation") + com.google.analytics.admin.v1beta.ServiceLevel result = + com.google.analytics.admin.v1beta.ServiceLevel.valueOf(serviceLevel_); + return result == null ? com.google.analytics.admin.v1beta.ServiceLevel.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Output only. The Google Analytics service level that applies to this property.
+     * 
+ * + * + * .google.analytics.admin.v1beta.ServiceLevel service_level = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The serviceLevel to set. + * @return This builder for chaining. + */ + public Builder setServiceLevel(com.google.analytics.admin.v1beta.ServiceLevel value) { + if (value == null) { + throw new NullPointerException(); + } + + serviceLevel_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The Google Analytics service level that applies to this property.
+     * 
+ * + * + * .google.analytics.admin.v1beta.ServiceLevel service_level = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearServiceLevel() { + + serviceLevel_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp deleteTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + deleteTimeBuilder_; + /** + * + * + *
+     * Output only. If set, the time at which this property was trashed. If not set, then this
+     * property is not currently in the trash can.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the deleteTime field is set. + */ + public boolean hasDeleteTime() { + return deleteTimeBuilder_ != null || deleteTime_ != null; + } + /** + * + * + *
+     * Output only. If set, the time at which this property was trashed. If not set, then this
+     * property is not currently in the trash can.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The deleteTime. + */ + public com.google.protobuf.Timestamp getDeleteTime() { + if (deleteTimeBuilder_ == null) { + return deleteTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : deleteTime_; + } else { + return deleteTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. If set, the time at which this property was trashed. If not set, then this
+     * property is not currently in the trash can.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDeleteTime(com.google.protobuf.Timestamp value) { + if (deleteTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deleteTime_ = value; + onChanged(); + } else { + deleteTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. If set, the time at which this property was trashed. If not set, then this
+     * property is not currently in the trash can.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDeleteTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (deleteTimeBuilder_ == null) { + deleteTime_ = builderForValue.build(); + onChanged(); + } else { + deleteTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. If set, the time at which this property was trashed. If not set, then this
+     * property is not currently in the trash can.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeDeleteTime(com.google.protobuf.Timestamp value) { + if (deleteTimeBuilder_ == null) { + if (deleteTime_ != null) { + deleteTime_ = + com.google.protobuf.Timestamp.newBuilder(deleteTime_).mergeFrom(value).buildPartial(); + } else { + deleteTime_ = value; + } + onChanged(); + } else { + deleteTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. If set, the time at which this property was trashed. If not set, then this
+     * property is not currently in the trash can.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearDeleteTime() { + if (deleteTimeBuilder_ == null) { + deleteTime_ = null; + onChanged(); + } else { + deleteTime_ = null; + deleteTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. If set, the time at which this property was trashed. If not set, then this
+     * property is not currently in the trash can.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getDeleteTimeBuilder() { + + onChanged(); + return getDeleteTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. If set, the time at which this property was trashed. If not set, then this
+     * property is not currently in the trash can.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder() { + if (deleteTimeBuilder_ != null) { + return deleteTimeBuilder_.getMessageOrBuilder(); + } else { + return deleteTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : deleteTime_; + } + } + /** + * + * + *
+     * Output only. If set, the time at which this property was trashed. If not set, then this
+     * property is not currently in the trash can.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getDeleteTimeFieldBuilder() { + if (deleteTimeBuilder_ == null) { + deleteTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getDeleteTime(), getParentForChildren(), isClean()); + deleteTime_ = null; + } + return deleteTimeBuilder_; + } + + private com.google.protobuf.Timestamp expireTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + expireTimeBuilder_; + /** + * + * + *
+     * Output only. If set, the time at which this trashed property will be permanently
+     * deleted. If not set, then this property is not currently in the trash can
+     * and is not slated to be deleted.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the expireTime field is set. + */ + public boolean hasExpireTime() { + return expireTimeBuilder_ != null || expireTime_ != null; + } + /** + * + * + *
+     * Output only. If set, the time at which this trashed property will be permanently
+     * deleted. If not set, then this property is not currently in the trash can
+     * and is not slated to be deleted.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The expireTime. + */ + public com.google.protobuf.Timestamp getExpireTime() { + if (expireTimeBuilder_ == null) { + return expireTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : expireTime_; + } else { + return expireTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. If set, the time at which this trashed property will be permanently
+     * deleted. If not set, then this property is not currently in the trash can
+     * and is not slated to be deleted.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setExpireTime(com.google.protobuf.Timestamp value) { + if (expireTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + expireTime_ = value; + onChanged(); + } else { + expireTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. If set, the time at which this trashed property will be permanently
+     * deleted. If not set, then this property is not currently in the trash can
+     * and is not slated to be deleted.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setExpireTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (expireTimeBuilder_ == null) { + expireTime_ = builderForValue.build(); + onChanged(); + } else { + expireTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. If set, the time at which this trashed property will be permanently
+     * deleted. If not set, then this property is not currently in the trash can
+     * and is not slated to be deleted.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeExpireTime(com.google.protobuf.Timestamp value) { + if (expireTimeBuilder_ == null) { + if (expireTime_ != null) { + expireTime_ = + com.google.protobuf.Timestamp.newBuilder(expireTime_).mergeFrom(value).buildPartial(); + } else { + expireTime_ = value; + } + onChanged(); + } else { + expireTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. If set, the time at which this trashed property will be permanently
+     * deleted. If not set, then this property is not currently in the trash can
+     * and is not slated to be deleted.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearExpireTime() { + if (expireTimeBuilder_ == null) { + expireTime_ = null; + onChanged(); + } else { + expireTime_ = null; + expireTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. If set, the time at which this trashed property will be permanently
+     * deleted. If not set, then this property is not currently in the trash can
+     * and is not slated to be deleted.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getExpireTimeBuilder() { + + onChanged(); + return getExpireTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. If set, the time at which this trashed property will be permanently
+     * deleted. If not set, then this property is not currently in the trash can
+     * and is not slated to be deleted.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { + if (expireTimeBuilder_ != null) { + return expireTimeBuilder_.getMessageOrBuilder(); + } else { + return expireTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : expireTime_; + } + } + /** + * + * + *
+     * Output only. If set, the time at which this trashed property will be permanently
+     * deleted. If not set, then this property is not currently in the trash can
+     * and is not slated to be deleted.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getExpireTimeFieldBuilder() { + if (expireTimeBuilder_ == null) { + expireTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getExpireTime(), getParentForChildren(), isClean()); + expireTime_ = null; + } + return expireTimeBuilder_; + } + + private java.lang.Object account_ = ""; + /** + * + * + *
+     * Immutable. The resource name of the parent account
+     * Format: accounts/{account_id}
+     * Example: "accounts/123"
+     * 
+ * + * + * string account = 13 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The account. + */ + public java.lang.String getAccount() { + java.lang.Object ref = account_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + account_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Immutable. The resource name of the parent account
+     * Format: accounts/{account_id}
+     * Example: "accounts/123"
+     * 
+ * + * + * string account = 13 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for account. + */ + public com.google.protobuf.ByteString getAccountBytes() { + java.lang.Object ref = account_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + account_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Immutable. The resource name of the parent account
+     * Format: accounts/{account_id}
+     * Example: "accounts/123"
+     * 
+ * + * + * string account = 13 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @param value The account to set. + * @return This builder for chaining. + */ + public Builder setAccount(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + account_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The resource name of the parent account
+     * Format: accounts/{account_id}
+     * Example: "accounts/123"
+     * 
+ * + * + * string account = 13 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearAccount() { + + account_ = getDefaultInstance().getAccount(); + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The resource name of the parent account
+     * Format: accounts/{account_id}
+     * Example: "accounts/123"
+     * 
+ * + * + * string account = 13 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for account to set. + * @return This builder for chaining. + */ + public Builder setAccountBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + account_ = value; + 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.admin.v1beta.Property) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.Property) + private static final com.google.analytics.admin.v1beta.Property DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.Property(); + } + + public static com.google.analytics.admin.v1beta.Property getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Property parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Property(input, extensionRegistry); + } + }; + + 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.admin.v1beta.Property getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/PropertyName.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/PropertyName.java new file mode 100644 index 000000000000..fc6c68e3babd --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/PropertyName.java @@ -0,0 +1,168 @@ +/* + * Copyright 2022 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.admin.v1beta; + +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 PropertyName implements ResourceName { + private static final PathTemplate PROPERTY = + PathTemplate.createWithoutUrlEncoding("properties/{property}"); + private volatile Map fieldValuesMap; + private final String property; + + @Deprecated + protected PropertyName() { + property = null; + } + + private PropertyName(Builder builder) { + property = Preconditions.checkNotNull(builder.getProperty()); + } + + public String getProperty() { + return property; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static PropertyName of(String property) { + return newBuilder().setProperty(property).build(); + } + + public static String format(String property) { + return newBuilder().setProperty(property).build().toString(); + } + + public static PropertyName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROPERTY.validatedMatch( + formattedString, "PropertyName.parse: formattedString not in valid format"); + return of(matchMap.get("property")); + } + + 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 (PropertyName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROPERTY.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); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROPERTY.instantiate("property", property); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + PropertyName that = ((PropertyName) o); + return Objects.equals(this.property, that.property); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(property); + return h; + } + + /** Builder for properties/{property}. */ + public static class Builder { + private String property; + + protected Builder() {} + + public String getProperty() { + return property; + } + + public Builder setProperty(String property) { + this.property = property; + return this; + } + + private Builder(PropertyName propertyName) { + this.property = propertyName.property; + } + + public PropertyName build() { + return new PropertyName(this); + } + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/PropertyOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/PropertyOrBuilder.java new file mode 100644 index 000000000000..8b84687a37e7 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/PropertyOrBuilder.java @@ -0,0 +1,463 @@ +/* + * Copyright 2020 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/admin/v1beta/resources.proto + +package com.google.analytics.admin.v1beta; + +public interface PropertyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.Property) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Resource name of this property.
+   * Format: properties/{property_id}
+   * Example: "properties/1000"
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. Resource name of this property.
+   * Format: properties/{property_id}
+   * Example: "properties/1000"
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Immutable. The property type for this Property resource. When creating a property, if
+   * the type is "PROPERTY_TYPE_UNSPECIFIED", then "ORDINARY_PROPERTY" will be
+   * implied. "SUBPROPERTY" and "ROLLUP_PROPERTY" types cannot yet be created
+   * via Google Analytics Admin API.
+   * 
+ * + * + * .google.analytics.admin.v1beta.PropertyType property_type = 14 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for propertyType. + */ + int getPropertyTypeValue(); + /** + * + * + *
+   * Immutable. The property type for this Property resource. When creating a property, if
+   * the type is "PROPERTY_TYPE_UNSPECIFIED", then "ORDINARY_PROPERTY" will be
+   * implied. "SUBPROPERTY" and "ROLLUP_PROPERTY" types cannot yet be created
+   * via Google Analytics Admin API.
+   * 
+ * + * + * .google.analytics.admin.v1beta.PropertyType property_type = 14 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The propertyType. + */ + com.google.analytics.admin.v1beta.PropertyType getPropertyType(); + + /** + * + * + *
+   * Output only. Time when the entity was originally created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Time when the entity was originally created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Time when the entity was originally created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time when entity payload fields were last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. Time when entity payload fields were last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. Time when entity payload fields were last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Immutable. Resource name of this property's logical parent.
+   * Note: The Property-Moving UI can be used to change the parent.
+   * Format: accounts/{account}, properties/{property}
+   * Example: "accounts/100", "properties/101"
+   * 
+ * + * string parent = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Immutable. Resource name of this property's logical parent.
+   * Note: The Property-Moving UI can be used to change the parent.
+   * Format: accounts/{account}, properties/{property}
+   * Example: "accounts/100", "properties/101"
+   * 
+ * + * string parent = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. Human-readable display name for this property.
+   * The max allowed display name length is 100 UTF-16 code units.
+   * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Required. Human-readable display name for this property.
+   * The max allowed display name length is 100 UTF-16 code units.
+   * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Industry associated with this property
+   * Example: AUTOMOTIVE, FOOD_AND_DRINK
+   * 
+ * + * .google.analytics.admin.v1beta.IndustryCategory industry_category = 6; + * + * @return The enum numeric value on the wire for industryCategory. + */ + int getIndustryCategoryValue(); + /** + * + * + *
+   * Industry associated with this property
+   * Example: AUTOMOTIVE, FOOD_AND_DRINK
+   * 
+ * + * .google.analytics.admin.v1beta.IndustryCategory industry_category = 6; + * + * @return The industryCategory. + */ + com.google.analytics.admin.v1beta.IndustryCategory getIndustryCategory(); + + /** + * + * + *
+   * Required. Reporting Time Zone, used as the day boundary for reports, regardless of
+   * where the data originates. If the time zone honors DST, Analytics will
+   * automatically adjust for the changes.
+   * NOTE: Changing the time zone only affects data going forward, and is not
+   * applied retroactively.
+   * Format: https://www.iana.org/time-zones
+   * Example: "America/Los_Angeles"
+   * 
+ * + * string time_zone = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The timeZone. + */ + java.lang.String getTimeZone(); + /** + * + * + *
+   * Required. Reporting Time Zone, used as the day boundary for reports, regardless of
+   * where the data originates. If the time zone honors DST, Analytics will
+   * automatically adjust for the changes.
+   * NOTE: Changing the time zone only affects data going forward, and is not
+   * applied retroactively.
+   * Format: https://www.iana.org/time-zones
+   * Example: "America/Los_Angeles"
+   * 
+ * + * string time_zone = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for timeZone. + */ + com.google.protobuf.ByteString getTimeZoneBytes(); + + /** + * + * + *
+   * The currency type used in reports involving monetary values.
+   * Format: https://en.wikipedia.org/wiki/ISO_4217
+   * Examples: "USD", "EUR", "JPY"
+   * 
+ * + * string currency_code = 8; + * + * @return The currencyCode. + */ + java.lang.String getCurrencyCode(); + /** + * + * + *
+   * The currency type used in reports involving monetary values.
+   * Format: https://en.wikipedia.org/wiki/ISO_4217
+   * Examples: "USD", "EUR", "JPY"
+   * 
+ * + * string currency_code = 8; + * + * @return The bytes for currencyCode. + */ + com.google.protobuf.ByteString getCurrencyCodeBytes(); + + /** + * + * + *
+   * Output only. The Google Analytics service level that applies to this property.
+   * 
+ * + * + * .google.analytics.admin.v1beta.ServiceLevel service_level = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for serviceLevel. + */ + int getServiceLevelValue(); + /** + * + * + *
+   * Output only. The Google Analytics service level that applies to this property.
+   * 
+ * + * + * .google.analytics.admin.v1beta.ServiceLevel service_level = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The serviceLevel. + */ + com.google.analytics.admin.v1beta.ServiceLevel getServiceLevel(); + + /** + * + * + *
+   * Output only. If set, the time at which this property was trashed. If not set, then this
+   * property is not currently in the trash can.
+   * 
+ * + * .google.protobuf.Timestamp delete_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the deleteTime field is set. + */ + boolean hasDeleteTime(); + /** + * + * + *
+   * Output only. If set, the time at which this property was trashed. If not set, then this
+   * property is not currently in the trash can.
+   * 
+ * + * .google.protobuf.Timestamp delete_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The deleteTime. + */ + com.google.protobuf.Timestamp getDeleteTime(); + /** + * + * + *
+   * Output only. If set, the time at which this property was trashed. If not set, then this
+   * property is not currently in the trash can.
+   * 
+ * + * .google.protobuf.Timestamp delete_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder(); + + /** + * + * + *
+   * Output only. If set, the time at which this trashed property will be permanently
+   * deleted. If not set, then this property is not currently in the trash can
+   * and is not slated to be deleted.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the expireTime field is set. + */ + boolean hasExpireTime(); + /** + * + * + *
+   * Output only. If set, the time at which this trashed property will be permanently
+   * deleted. If not set, then this property is not currently in the trash can
+   * and is not slated to be deleted.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The expireTime. + */ + com.google.protobuf.Timestamp getExpireTime(); + /** + * + * + *
+   * Output only. If set, the time at which this trashed property will be permanently
+   * deleted. If not set, then this property is not currently in the trash can
+   * and is not slated to be deleted.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder(); + + /** + * + * + *
+   * Immutable. The resource name of the parent account
+   * Format: accounts/{account_id}
+   * Example: "accounts/123"
+   * 
+ * + * + * string account = 13 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The account. + */ + java.lang.String getAccount(); + /** + * + * + *
+   * Immutable. The resource name of the parent account
+   * Format: accounts/{account_id}
+   * Example: "accounts/123"
+   * 
+ * + * + * string account = 13 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for account. + */ + com.google.protobuf.ByteString getAccountBytes(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/PropertySummary.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/PropertySummary.java new file mode 100644 index 000000000000..59ce27c8288c --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/PropertySummary.java @@ -0,0 +1,1183 @@ +/* + * Copyright 2020 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/admin/v1beta/resources.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * A virtual resource representing metadata for a GA4 property.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.PropertySummary} + */ +public final class PropertySummary extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.PropertySummary) + PropertySummaryOrBuilder { + private static final long serialVersionUID = 0L; + // Use PropertySummary.newBuilder() to construct. + private PropertySummary(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PropertySummary() { + property_ = ""; + displayName_ = ""; + propertyType_ = 0; + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PropertySummary(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private PropertySummary( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + property_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 24: + { + int rawValue = input.readEnum(); + + propertyType_ = rawValue; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_PropertySummary_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_PropertySummary_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.PropertySummary.class, + com.google.analytics.admin.v1beta.PropertySummary.Builder.class); + } + + public static final int PROPERTY_FIELD_NUMBER = 1; + private volatile java.lang.Object property_; + /** + * + * + *
+   * Resource name of property referred to by this property summary
+   * Format: properties/{property_id}
+   * Example: "properties/1000"
+   * 
+ * + * string property = 1 [(.google.api.resource_reference) = { ... } + * + * @return The property. + */ + @java.lang.Override + public java.lang.String getProperty() { + java.lang.Object ref = property_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + property_ = s; + return s; + } + } + /** + * + * + *
+   * Resource name of property referred to by this property summary
+   * Format: properties/{property_id}
+   * Example: "properties/1000"
+   * 
+ * + * string property = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for property. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPropertyBytes() { + java.lang.Object ref = property_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + property_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * Display name for the property referred to in this property summary.
+   * 
+ * + * string display_name = 2; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Display name for the property referred to in this property summary.
+   * 
+ * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROPERTY_TYPE_FIELD_NUMBER = 3; + private int propertyType_; + /** + * + * + *
+   * The property's property type.
+   * 
+ * + * .google.analytics.admin.v1beta.PropertyType property_type = 3; + * + * @return The enum numeric value on the wire for propertyType. + */ + @java.lang.Override + public int getPropertyTypeValue() { + return propertyType_; + } + /** + * + * + *
+   * The property's property type.
+   * 
+ * + * .google.analytics.admin.v1beta.PropertyType property_type = 3; + * + * @return The propertyType. + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.PropertyType getPropertyType() { + @SuppressWarnings("deprecation") + com.google.analytics.admin.v1beta.PropertyType result = + com.google.analytics.admin.v1beta.PropertyType.valueOf(propertyType_); + return result == null ? com.google.analytics.admin.v1beta.PropertyType.UNRECOGNIZED : result; + } + + public static final int PARENT_FIELD_NUMBER = 4; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Resource name of this property's logical parent.
+   * Note: The Property-Moving UI can be used to change the parent.
+   * Format: accounts/{account}, properties/{property}
+   * Example: "accounts/100", "properties/200"
+   * 
+ * + * string parent = 4; + * + * @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; + } + } + /** + * + * + *
+   * Resource name of this property's logical parent.
+   * Note: The Property-Moving UI can be used to change the parent.
+   * Format: accounts/{account}, properties/{property}
+   * Example: "accounts/100", "properties/200"
+   * 
+ * + * string parent = 4; + * + * @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; + } + } + + 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(property_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, property_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (propertyType_ + != com.google.analytics.admin.v1beta.PropertyType.PROPERTY_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(3, propertyType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, parent_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(property_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, property_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (propertyType_ + != com.google.analytics.admin.v1beta.PropertyType.PROPERTY_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, propertyType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, parent_); + } + size += unknownFields.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.admin.v1beta.PropertySummary)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.PropertySummary other = + (com.google.analytics.admin.v1beta.PropertySummary) obj; + + if (!getProperty().equals(other.getProperty())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (propertyType_ != other.propertyType_) return false; + if (!getParent().equals(other.getParent())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PROPERTY_FIELD_NUMBER; + hash = (53 * hash) + getProperty().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + PROPERTY_TYPE_FIELD_NUMBER; + hash = (53 * hash) + propertyType_; + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.PropertySummary parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.PropertySummary 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.admin.v1beta.PropertySummary parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.PropertySummary 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.admin.v1beta.PropertySummary parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.PropertySummary parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.PropertySummary parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.PropertySummary 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.admin.v1beta.PropertySummary parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.PropertySummary 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.admin.v1beta.PropertySummary parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.PropertySummary 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.admin.v1beta.PropertySummary 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 virtual resource representing metadata for a GA4 property.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.PropertySummary} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.PropertySummary) + com.google.analytics.admin.v1beta.PropertySummaryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_PropertySummary_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_PropertySummary_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.PropertySummary.class, + com.google.analytics.admin.v1beta.PropertySummary.Builder.class); + } + + // Construct using com.google.analytics.admin.v1beta.PropertySummary.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + property_ = ""; + + displayName_ = ""; + + propertyType_ = 0; + + parent_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.ResourcesProto + .internal_static_google_analytics_admin_v1beta_PropertySummary_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.PropertySummary getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.PropertySummary.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.PropertySummary build() { + com.google.analytics.admin.v1beta.PropertySummary result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.PropertySummary buildPartial() { + com.google.analytics.admin.v1beta.PropertySummary result = + new com.google.analytics.admin.v1beta.PropertySummary(this); + result.property_ = property_; + result.displayName_ = displayName_; + result.propertyType_ = propertyType_; + result.parent_ = parent_; + onBuilt(); + return result; + } + + @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.admin.v1beta.PropertySummary) { + return mergeFrom((com.google.analytics.admin.v1beta.PropertySummary) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1beta.PropertySummary other) { + if (other == com.google.analytics.admin.v1beta.PropertySummary.getDefaultInstance()) + return this; + if (!other.getProperty().isEmpty()) { + property_ = other.property_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (other.propertyType_ != 0) { + setPropertyTypeValue(other.getPropertyTypeValue()); + } + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.PropertySummary parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.PropertySummary) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object property_ = ""; + /** + * + * + *
+     * Resource name of property referred to by this property summary
+     * Format: properties/{property_id}
+     * Example: "properties/1000"
+     * 
+ * + * string property = 1 [(.google.api.resource_reference) = { ... } + * + * @return The property. + */ + public java.lang.String getProperty() { + java.lang.Object ref = property_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + property_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Resource name of property referred to by this property summary
+     * Format: properties/{property_id}
+     * Example: "properties/1000"
+     * 
+ * + * string property = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for property. + */ + public com.google.protobuf.ByteString getPropertyBytes() { + java.lang.Object ref = property_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + property_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Resource name of property referred to by this property summary
+     * Format: properties/{property_id}
+     * Example: "properties/1000"
+     * 
+ * + * string property = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The property to set. + * @return This builder for chaining. + */ + public Builder setProperty(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + property_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Resource name of property referred to by this property summary
+     * Format: properties/{property_id}
+     * Example: "properties/1000"
+     * 
+ * + * string property = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearProperty() { + + property_ = getDefaultInstance().getProperty(); + onChanged(); + return this; + } + /** + * + * + *
+     * Resource name of property referred to by this property summary
+     * Format: properties/{property_id}
+     * Example: "properties/1000"
+     * 
+ * + * string property = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for property to set. + * @return This builder for chaining. + */ + public Builder setPropertyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + property_ = value; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Display name for the property referred to in this property summary.
+     * 
+ * + * string display_name = 2; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Display name for the property referred to in this property summary.
+     * 
+ * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Display name for the property referred to in this property summary.
+     * 
+ * + * string display_name = 2; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Display name for the property referred to in this property summary.
+     * 
+ * + * string display_name = 2; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Display name for the property referred to in this property summary.
+     * 
+ * + * string display_name = 2; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private int propertyType_ = 0; + /** + * + * + *
+     * The property's property type.
+     * 
+ * + * .google.analytics.admin.v1beta.PropertyType property_type = 3; + * + * @return The enum numeric value on the wire for propertyType. + */ + @java.lang.Override + public int getPropertyTypeValue() { + return propertyType_; + } + /** + * + * + *
+     * The property's property type.
+     * 
+ * + * .google.analytics.admin.v1beta.PropertyType property_type = 3; + * + * @param value The enum numeric value on the wire for propertyType to set. + * @return This builder for chaining. + */ + public Builder setPropertyTypeValue(int value) { + + propertyType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The property's property type.
+     * 
+ * + * .google.analytics.admin.v1beta.PropertyType property_type = 3; + * + * @return The propertyType. + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.PropertyType getPropertyType() { + @SuppressWarnings("deprecation") + com.google.analytics.admin.v1beta.PropertyType result = + com.google.analytics.admin.v1beta.PropertyType.valueOf(propertyType_); + return result == null ? com.google.analytics.admin.v1beta.PropertyType.UNRECOGNIZED : result; + } + /** + * + * + *
+     * The property's property type.
+     * 
+ * + * .google.analytics.admin.v1beta.PropertyType property_type = 3; + * + * @param value The propertyType to set. + * @return This builder for chaining. + */ + public Builder setPropertyType(com.google.analytics.admin.v1beta.PropertyType value) { + if (value == null) { + throw new NullPointerException(); + } + + propertyType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The property's property type.
+     * 
+ * + * .google.analytics.admin.v1beta.PropertyType property_type = 3; + * + * @return This builder for chaining. + */ + public Builder clearPropertyType() { + + propertyType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Resource name of this property's logical parent.
+     * Note: The Property-Moving UI can be used to change the parent.
+     * Format: accounts/{account}, properties/{property}
+     * Example: "accounts/100", "properties/200"
+     * 
+ * + * string parent = 4; + * + * @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; + } + } + /** + * + * + *
+     * Resource name of this property's logical parent.
+     * Note: The Property-Moving UI can be used to change the parent.
+     * Format: accounts/{account}, properties/{property}
+     * Example: "accounts/100", "properties/200"
+     * 
+ * + * string parent = 4; + * + * @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; + } + } + /** + * + * + *
+     * Resource name of this property's logical parent.
+     * Note: The Property-Moving UI can be used to change the parent.
+     * Format: accounts/{account}, properties/{property}
+     * Example: "accounts/100", "properties/200"
+     * 
+ * + * string parent = 4; + * + * @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; + onChanged(); + return this; + } + /** + * + * + *
+     * Resource name of this property's logical parent.
+     * Note: The Property-Moving UI can be used to change the parent.
+     * Format: accounts/{account}, properties/{property}
+     * Example: "accounts/100", "properties/200"
+     * 
+ * + * string parent = 4; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Resource name of this property's logical parent.
+     * Note: The Property-Moving UI can be used to change the parent.
+     * Format: accounts/{account}, properties/{property}
+     * Example: "accounts/100", "properties/200"
+     * 
+ * + * string parent = 4; + * + * @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; + 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.admin.v1beta.PropertySummary) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.PropertySummary) + private static final com.google.analytics.admin.v1beta.PropertySummary DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.PropertySummary(); + } + + public static com.google.analytics.admin.v1beta.PropertySummary getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PropertySummary parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PropertySummary(input, extensionRegistry); + } + }; + + 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.admin.v1beta.PropertySummary getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/PropertySummaryOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/PropertySummaryOrBuilder.java new file mode 100644 index 000000000000..313fff0f2dc2 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/PropertySummaryOrBuilder.java @@ -0,0 +1,135 @@ +/* + * Copyright 2020 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/admin/v1beta/resources.proto + +package com.google.analytics.admin.v1beta; + +public interface PropertySummaryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.PropertySummary) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Resource name of property referred to by this property summary
+   * Format: properties/{property_id}
+   * Example: "properties/1000"
+   * 
+ * + * string property = 1 [(.google.api.resource_reference) = { ... } + * + * @return The property. + */ + java.lang.String getProperty(); + /** + * + * + *
+   * Resource name of property referred to by this property summary
+   * Format: properties/{property_id}
+   * Example: "properties/1000"
+   * 
+ * + * string property = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for property. + */ + com.google.protobuf.ByteString getPropertyBytes(); + + /** + * + * + *
+   * Display name for the property referred to in this property summary.
+   * 
+ * + * string display_name = 2; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Display name for the property referred to in this property summary.
+   * 
+ * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * The property's property type.
+   * 
+ * + * .google.analytics.admin.v1beta.PropertyType property_type = 3; + * + * @return The enum numeric value on the wire for propertyType. + */ + int getPropertyTypeValue(); + /** + * + * + *
+   * The property's property type.
+   * 
+ * + * .google.analytics.admin.v1beta.PropertyType property_type = 3; + * + * @return The propertyType. + */ + com.google.analytics.admin.v1beta.PropertyType getPropertyType(); + + /** + * + * + *
+   * Resource name of this property's logical parent.
+   * Note: The Property-Moving UI can be used to change the parent.
+   * Format: accounts/{account}, properties/{property}
+   * Example: "accounts/100", "properties/200"
+   * 
+ * + * string parent = 4; + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Resource name of this property's logical parent.
+   * Note: The Property-Moving UI can be used to change the parent.
+   * Format: accounts/{account}, properties/{property}
+   * Example: "accounts/100", "properties/200"
+   * 
+ * + * string parent = 4; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/PropertyType.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/PropertyType.java new file mode 100644 index 000000000000..9914dfa2dfcc --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/PropertyType.java @@ -0,0 +1,198 @@ +/* + * Copyright 2020 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/admin/v1beta/resources.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * Types of Property resources.
+ * 
+ * + * Protobuf enum {@code google.analytics.admin.v1beta.PropertyType} + */ +public enum PropertyType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Unknown or unspecified property type
+   * 
+ * + * PROPERTY_TYPE_UNSPECIFIED = 0; + */ + PROPERTY_TYPE_UNSPECIFIED(0), + /** + * + * + *
+   * Ordinary GA4 property
+   * 
+ * + * PROPERTY_TYPE_ORDINARY = 1; + */ + PROPERTY_TYPE_ORDINARY(1), + /** + * + * + *
+   * GA4 subproperty
+   * 
+ * + * PROPERTY_TYPE_SUBPROPERTY = 2; + */ + PROPERTY_TYPE_SUBPROPERTY(2), + /** + * + * + *
+   * GA4 rollup property
+   * 
+ * + * PROPERTY_TYPE_ROLLUP = 3; + */ + PROPERTY_TYPE_ROLLUP(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Unknown or unspecified property type
+   * 
+ * + * PROPERTY_TYPE_UNSPECIFIED = 0; + */ + public static final int PROPERTY_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Ordinary GA4 property
+   * 
+ * + * PROPERTY_TYPE_ORDINARY = 1; + */ + public static final int PROPERTY_TYPE_ORDINARY_VALUE = 1; + /** + * + * + *
+   * GA4 subproperty
+   * 
+ * + * PROPERTY_TYPE_SUBPROPERTY = 2; + */ + public static final int PROPERTY_TYPE_SUBPROPERTY_VALUE = 2; + /** + * + * + *
+   * GA4 rollup property
+   * 
+ * + * PROPERTY_TYPE_ROLLUP = 3; + */ + public static final int PROPERTY_TYPE_ROLLUP_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static PropertyType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static PropertyType forNumber(int value) { + switch (value) { + case 0: + return PROPERTY_TYPE_UNSPECIFIED; + case 1: + return PROPERTY_TYPE_ORDINARY; + case 2: + return PROPERTY_TYPE_SUBPROPERTY; + case 3: + return PROPERTY_TYPE_ROLLUP; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public PropertyType findValueByNumber(int number) { + return PropertyType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.analytics.admin.v1beta.ResourcesProto.getDescriptor().getEnumTypes().get(5); + } + + private static final PropertyType[] VALUES = values(); + + public static PropertyType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private PropertyType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.analytics.admin.v1beta.PropertyType) +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ProvisionAccountTicketRequest.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ProvisionAccountTicketRequest.java new file mode 100644 index 000000000000..9fd984bb43ca --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ProvisionAccountTicketRequest.java @@ -0,0 +1,930 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * Request message for ProvisionAccountTicket RPC.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.ProvisionAccountTicketRequest} + */ +public final class ProvisionAccountTicketRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.ProvisionAccountTicketRequest) + ProvisionAccountTicketRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ProvisionAccountTicketRequest.newBuilder() to construct. + private ProvisionAccountTicketRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ProvisionAccountTicketRequest() { + redirectUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ProvisionAccountTicketRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ProvisionAccountTicketRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.analytics.admin.v1beta.Account.Builder subBuilder = null; + if (account_ != null) { + subBuilder = account_.toBuilder(); + } + account_ = + input.readMessage( + com.google.analytics.admin.v1beta.Account.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(account_); + account_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + redirectUri_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ProvisionAccountTicketRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ProvisionAccountTicketRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.ProvisionAccountTicketRequest.class, + com.google.analytics.admin.v1beta.ProvisionAccountTicketRequest.Builder.class); + } + + public static final int ACCOUNT_FIELD_NUMBER = 1; + private com.google.analytics.admin.v1beta.Account account_; + /** + * + * + *
+   * The account to create.
+   * 
+ * + * .google.analytics.admin.v1beta.Account account = 1; + * + * @return Whether the account field is set. + */ + @java.lang.Override + public boolean hasAccount() { + return account_ != null; + } + /** + * + * + *
+   * The account to create.
+   * 
+ * + * .google.analytics.admin.v1beta.Account account = 1; + * + * @return The account. + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.Account getAccount() { + return account_ == null + ? com.google.analytics.admin.v1beta.Account.getDefaultInstance() + : account_; + } + /** + * + * + *
+   * The account to create.
+   * 
+ * + * .google.analytics.admin.v1beta.Account account = 1; + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.AccountOrBuilder getAccountOrBuilder() { + return getAccount(); + } + + public static final int REDIRECT_URI_FIELD_NUMBER = 2; + private volatile java.lang.Object redirectUri_; + /** + * + * + *
+   * Redirect URI where the user will be sent after accepting Terms of Service.
+   * Must be configured in Developers Console as a Redirect URI
+   * 
+ * + * string redirect_uri = 2; + * + * @return The redirectUri. + */ + @java.lang.Override + public java.lang.String getRedirectUri() { + java.lang.Object ref = redirectUri_; + 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(); + redirectUri_ = s; + return s; + } + } + /** + * + * + *
+   * Redirect URI where the user will be sent after accepting Terms of Service.
+   * Must be configured in Developers Console as a Redirect URI
+   * 
+ * + * string redirect_uri = 2; + * + * @return The bytes for redirectUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRedirectUriBytes() { + java.lang.Object ref = redirectUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + redirectUri_ = 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 (account_ != null) { + output.writeMessage(1, getAccount()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(redirectUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, redirectUri_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (account_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getAccount()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(redirectUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, redirectUri_); + } + size += unknownFields.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.admin.v1beta.ProvisionAccountTicketRequest)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.ProvisionAccountTicketRequest other = + (com.google.analytics.admin.v1beta.ProvisionAccountTicketRequest) obj; + + if (hasAccount() != other.hasAccount()) return false; + if (hasAccount()) { + if (!getAccount().equals(other.getAccount())) return false; + } + if (!getRedirectUri().equals(other.getRedirectUri())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAccount()) { + hash = (37 * hash) + ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getAccount().hashCode(); + } + hash = (37 * hash) + REDIRECT_URI_FIELD_NUMBER; + hash = (53 * hash) + getRedirectUri().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.ProvisionAccountTicketRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ProvisionAccountTicketRequest 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.admin.v1beta.ProvisionAccountTicketRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ProvisionAccountTicketRequest 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.admin.v1beta.ProvisionAccountTicketRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ProvisionAccountTicketRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.ProvisionAccountTicketRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ProvisionAccountTicketRequest 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.admin.v1beta.ProvisionAccountTicketRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ProvisionAccountTicketRequest 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.admin.v1beta.ProvisionAccountTicketRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ProvisionAccountTicketRequest 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.admin.v1beta.ProvisionAccountTicketRequest 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; + } + /** + * + * + *
+   * Request message for ProvisionAccountTicket RPC.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.ProvisionAccountTicketRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.ProvisionAccountTicketRequest) + com.google.analytics.admin.v1beta.ProvisionAccountTicketRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ProvisionAccountTicketRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ProvisionAccountTicketRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.ProvisionAccountTicketRequest.class, + com.google.analytics.admin.v1beta.ProvisionAccountTicketRequest.Builder.class); + } + + // Construct using com.google.analytics.admin.v1beta.ProvisionAccountTicketRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (accountBuilder_ == null) { + account_ = null; + } else { + account_ = null; + accountBuilder_ = null; + } + redirectUri_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ProvisionAccountTicketRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ProvisionAccountTicketRequest + getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.ProvisionAccountTicketRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ProvisionAccountTicketRequest build() { + com.google.analytics.admin.v1beta.ProvisionAccountTicketRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ProvisionAccountTicketRequest buildPartial() { + com.google.analytics.admin.v1beta.ProvisionAccountTicketRequest result = + new com.google.analytics.admin.v1beta.ProvisionAccountTicketRequest(this); + if (accountBuilder_ == null) { + result.account_ = account_; + } else { + result.account_ = accountBuilder_.build(); + } + result.redirectUri_ = redirectUri_; + onBuilt(); + return result; + } + + @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.admin.v1beta.ProvisionAccountTicketRequest) { + return mergeFrom((com.google.analytics.admin.v1beta.ProvisionAccountTicketRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.analytics.admin.v1beta.ProvisionAccountTicketRequest other) { + if (other + == com.google.analytics.admin.v1beta.ProvisionAccountTicketRequest.getDefaultInstance()) + return this; + if (other.hasAccount()) { + mergeAccount(other.getAccount()); + } + if (!other.getRedirectUri().isEmpty()) { + redirectUri_ = other.redirectUri_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.ProvisionAccountTicketRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.ProvisionAccountTicketRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.analytics.admin.v1beta.Account account_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.Account, + com.google.analytics.admin.v1beta.Account.Builder, + com.google.analytics.admin.v1beta.AccountOrBuilder> + accountBuilder_; + /** + * + * + *
+     * The account to create.
+     * 
+ * + * .google.analytics.admin.v1beta.Account account = 1; + * + * @return Whether the account field is set. + */ + public boolean hasAccount() { + return accountBuilder_ != null || account_ != null; + } + /** + * + * + *
+     * The account to create.
+     * 
+ * + * .google.analytics.admin.v1beta.Account account = 1; + * + * @return The account. + */ + public com.google.analytics.admin.v1beta.Account getAccount() { + if (accountBuilder_ == null) { + return account_ == null + ? com.google.analytics.admin.v1beta.Account.getDefaultInstance() + : account_; + } else { + return accountBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The account to create.
+     * 
+ * + * .google.analytics.admin.v1beta.Account account = 1; + */ + public Builder setAccount(com.google.analytics.admin.v1beta.Account value) { + if (accountBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + account_ = value; + onChanged(); + } else { + accountBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The account to create.
+     * 
+ * + * .google.analytics.admin.v1beta.Account account = 1; + */ + public Builder setAccount(com.google.analytics.admin.v1beta.Account.Builder builderForValue) { + if (accountBuilder_ == null) { + account_ = builderForValue.build(); + onChanged(); + } else { + accountBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The account to create.
+     * 
+ * + * .google.analytics.admin.v1beta.Account account = 1; + */ + public Builder mergeAccount(com.google.analytics.admin.v1beta.Account value) { + if (accountBuilder_ == null) { + if (account_ != null) { + account_ = + com.google.analytics.admin.v1beta.Account.newBuilder(account_) + .mergeFrom(value) + .buildPartial(); + } else { + account_ = value; + } + onChanged(); + } else { + accountBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The account to create.
+     * 
+ * + * .google.analytics.admin.v1beta.Account account = 1; + */ + public Builder clearAccount() { + if (accountBuilder_ == null) { + account_ = null; + onChanged(); + } else { + account_ = null; + accountBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The account to create.
+     * 
+ * + * .google.analytics.admin.v1beta.Account account = 1; + */ + public com.google.analytics.admin.v1beta.Account.Builder getAccountBuilder() { + + onChanged(); + return getAccountFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The account to create.
+     * 
+ * + * .google.analytics.admin.v1beta.Account account = 1; + */ + public com.google.analytics.admin.v1beta.AccountOrBuilder getAccountOrBuilder() { + if (accountBuilder_ != null) { + return accountBuilder_.getMessageOrBuilder(); + } else { + return account_ == null + ? com.google.analytics.admin.v1beta.Account.getDefaultInstance() + : account_; + } + } + /** + * + * + *
+     * The account to create.
+     * 
+ * + * .google.analytics.admin.v1beta.Account account = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.Account, + com.google.analytics.admin.v1beta.Account.Builder, + com.google.analytics.admin.v1beta.AccountOrBuilder> + getAccountFieldBuilder() { + if (accountBuilder_ == null) { + accountBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.Account, + com.google.analytics.admin.v1beta.Account.Builder, + com.google.analytics.admin.v1beta.AccountOrBuilder>( + getAccount(), getParentForChildren(), isClean()); + account_ = null; + } + return accountBuilder_; + } + + private java.lang.Object redirectUri_ = ""; + /** + * + * + *
+     * Redirect URI where the user will be sent after accepting Terms of Service.
+     * Must be configured in Developers Console as a Redirect URI
+     * 
+ * + * string redirect_uri = 2; + * + * @return The redirectUri. + */ + public java.lang.String getRedirectUri() { + java.lang.Object ref = redirectUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + redirectUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Redirect URI where the user will be sent after accepting Terms of Service.
+     * Must be configured in Developers Console as a Redirect URI
+     * 
+ * + * string redirect_uri = 2; + * + * @return The bytes for redirectUri. + */ + public com.google.protobuf.ByteString getRedirectUriBytes() { + java.lang.Object ref = redirectUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + redirectUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Redirect URI where the user will be sent after accepting Terms of Service.
+     * Must be configured in Developers Console as a Redirect URI
+     * 
+ * + * string redirect_uri = 2; + * + * @param value The redirectUri to set. + * @return This builder for chaining. + */ + public Builder setRedirectUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + redirectUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Redirect URI where the user will be sent after accepting Terms of Service.
+     * Must be configured in Developers Console as a Redirect URI
+     * 
+ * + * string redirect_uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearRedirectUri() { + + redirectUri_ = getDefaultInstance().getRedirectUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * Redirect URI where the user will be sent after accepting Terms of Service.
+     * Must be configured in Developers Console as a Redirect URI
+     * 
+ * + * string redirect_uri = 2; + * + * @param value The bytes for redirectUri to set. + * @return This builder for chaining. + */ + public Builder setRedirectUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + redirectUri_ = value; + 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.admin.v1beta.ProvisionAccountTicketRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.ProvisionAccountTicketRequest) + private static final com.google.analytics.admin.v1beta.ProvisionAccountTicketRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.ProvisionAccountTicketRequest(); + } + + public static com.google.analytics.admin.v1beta.ProvisionAccountTicketRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ProvisionAccountTicketRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ProvisionAccountTicketRequest(input, extensionRegistry); + } + }; + + 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.admin.v1beta.ProvisionAccountTicketRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ProvisionAccountTicketRequestOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ProvisionAccountTicketRequestOrBuilder.java new file mode 100644 index 000000000000..9e8f616308ce --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ProvisionAccountTicketRequestOrBuilder.java @@ -0,0 +1,87 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +public interface ProvisionAccountTicketRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.ProvisionAccountTicketRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The account to create.
+   * 
+ * + * .google.analytics.admin.v1beta.Account account = 1; + * + * @return Whether the account field is set. + */ + boolean hasAccount(); + /** + * + * + *
+   * The account to create.
+   * 
+ * + * .google.analytics.admin.v1beta.Account account = 1; + * + * @return The account. + */ + com.google.analytics.admin.v1beta.Account getAccount(); + /** + * + * + *
+   * The account to create.
+   * 
+ * + * .google.analytics.admin.v1beta.Account account = 1; + */ + com.google.analytics.admin.v1beta.AccountOrBuilder getAccountOrBuilder(); + + /** + * + * + *
+   * Redirect URI where the user will be sent after accepting Terms of Service.
+   * Must be configured in Developers Console as a Redirect URI
+   * 
+ * + * string redirect_uri = 2; + * + * @return The redirectUri. + */ + java.lang.String getRedirectUri(); + /** + * + * + *
+   * Redirect URI where the user will be sent after accepting Terms of Service.
+   * Must be configured in Developers Console as a Redirect URI
+   * 
+ * + * string redirect_uri = 2; + * + * @return The bytes for redirectUri. + */ + com.google.protobuf.ByteString getRedirectUriBytes(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ProvisionAccountTicketResponse.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ProvisionAccountTicketResponse.java new file mode 100644 index 000000000000..b79a06b88e77 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ProvisionAccountTicketResponse.java @@ -0,0 +1,647 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * Response message for ProvisionAccountTicket RPC.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.ProvisionAccountTicketResponse} + */ +public final class ProvisionAccountTicketResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.ProvisionAccountTicketResponse) + ProvisionAccountTicketResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ProvisionAccountTicketResponse.newBuilder() to construct. + private ProvisionAccountTicketResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ProvisionAccountTicketResponse() { + accountTicketId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ProvisionAccountTicketResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ProvisionAccountTicketResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + accountTicketId_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ProvisionAccountTicketResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ProvisionAccountTicketResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.ProvisionAccountTicketResponse.class, + com.google.analytics.admin.v1beta.ProvisionAccountTicketResponse.Builder.class); + } + + public static final int ACCOUNT_TICKET_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object accountTicketId_; + /** + * + * + *
+   * The param to be passed in the ToS link.
+   * 
+ * + * string account_ticket_id = 1; + * + * @return The accountTicketId. + */ + @java.lang.Override + public java.lang.String getAccountTicketId() { + java.lang.Object ref = accountTicketId_; + 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(); + accountTicketId_ = s; + return s; + } + } + /** + * + * + *
+   * The param to be passed in the ToS link.
+   * 
+ * + * string account_ticket_id = 1; + * + * @return The bytes for accountTicketId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAccountTicketIdBytes() { + java.lang.Object ref = accountTicketId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + accountTicketId_ = 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(accountTicketId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, accountTicketId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(accountTicketId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, accountTicketId_); + } + size += unknownFields.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.admin.v1beta.ProvisionAccountTicketResponse)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.ProvisionAccountTicketResponse other = + (com.google.analytics.admin.v1beta.ProvisionAccountTicketResponse) obj; + + if (!getAccountTicketId().equals(other.getAccountTicketId())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + ACCOUNT_TICKET_ID_FIELD_NUMBER; + hash = (53 * hash) + getAccountTicketId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.ProvisionAccountTicketResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ProvisionAccountTicketResponse 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.admin.v1beta.ProvisionAccountTicketResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ProvisionAccountTicketResponse 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.admin.v1beta.ProvisionAccountTicketResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.ProvisionAccountTicketResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.ProvisionAccountTicketResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ProvisionAccountTicketResponse 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.admin.v1beta.ProvisionAccountTicketResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ProvisionAccountTicketResponse 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.admin.v1beta.ProvisionAccountTicketResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.ProvisionAccountTicketResponse 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.admin.v1beta.ProvisionAccountTicketResponse 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; + } + /** + * + * + *
+   * Response message for ProvisionAccountTicket RPC.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.ProvisionAccountTicketResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.ProvisionAccountTicketResponse) + com.google.analytics.admin.v1beta.ProvisionAccountTicketResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ProvisionAccountTicketResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ProvisionAccountTicketResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.ProvisionAccountTicketResponse.class, + com.google.analytics.admin.v1beta.ProvisionAccountTicketResponse.Builder.class); + } + + // Construct using com.google.analytics.admin.v1beta.ProvisionAccountTicketResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + accountTicketId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_ProvisionAccountTicketResponse_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ProvisionAccountTicketResponse + getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.ProvisionAccountTicketResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ProvisionAccountTicketResponse build() { + com.google.analytics.admin.v1beta.ProvisionAccountTicketResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.ProvisionAccountTicketResponse buildPartial() { + com.google.analytics.admin.v1beta.ProvisionAccountTicketResponse result = + new com.google.analytics.admin.v1beta.ProvisionAccountTicketResponse(this); + result.accountTicketId_ = accountTicketId_; + onBuilt(); + return result; + } + + @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.admin.v1beta.ProvisionAccountTicketResponse) { + return mergeFrom((com.google.analytics.admin.v1beta.ProvisionAccountTicketResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.analytics.admin.v1beta.ProvisionAccountTicketResponse other) { + if (other + == com.google.analytics.admin.v1beta.ProvisionAccountTicketResponse.getDefaultInstance()) + return this; + if (!other.getAccountTicketId().isEmpty()) { + accountTicketId_ = other.accountTicketId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.ProvisionAccountTicketResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.ProvisionAccountTicketResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object accountTicketId_ = ""; + /** + * + * + *
+     * The param to be passed in the ToS link.
+     * 
+ * + * string account_ticket_id = 1; + * + * @return The accountTicketId. + */ + public java.lang.String getAccountTicketId() { + java.lang.Object ref = accountTicketId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + accountTicketId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The param to be passed in the ToS link.
+     * 
+ * + * string account_ticket_id = 1; + * + * @return The bytes for accountTicketId. + */ + public com.google.protobuf.ByteString getAccountTicketIdBytes() { + java.lang.Object ref = accountTicketId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + accountTicketId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The param to be passed in the ToS link.
+     * 
+ * + * string account_ticket_id = 1; + * + * @param value The accountTicketId to set. + * @return This builder for chaining. + */ + public Builder setAccountTicketId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + accountTicketId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The param to be passed in the ToS link.
+     * 
+ * + * string account_ticket_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearAccountTicketId() { + + accountTicketId_ = getDefaultInstance().getAccountTicketId(); + onChanged(); + return this; + } + /** + * + * + *
+     * The param to be passed in the ToS link.
+     * 
+ * + * string account_ticket_id = 1; + * + * @param value The bytes for accountTicketId to set. + * @return This builder for chaining. + */ + public Builder setAccountTicketIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + accountTicketId_ = value; + 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.admin.v1beta.ProvisionAccountTicketResponse) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.ProvisionAccountTicketResponse) + private static final com.google.analytics.admin.v1beta.ProvisionAccountTicketResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.ProvisionAccountTicketResponse(); + } + + public static com.google.analytics.admin.v1beta.ProvisionAccountTicketResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ProvisionAccountTicketResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ProvisionAccountTicketResponse(input, extensionRegistry); + } + }; + + 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.admin.v1beta.ProvisionAccountTicketResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ProvisionAccountTicketResponseOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ProvisionAccountTicketResponseOrBuilder.java new file mode 100644 index 000000000000..0fdfc949d03b --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ProvisionAccountTicketResponseOrBuilder.java @@ -0,0 +1,50 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +public interface ProvisionAccountTicketResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.ProvisionAccountTicketResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The param to be passed in the ToS link.
+   * 
+ * + * string account_ticket_id = 1; + * + * @return The accountTicketId. + */ + java.lang.String getAccountTicketId(); + /** + * + * + *
+   * The param to be passed in the ToS link.
+   * 
+ * + * string account_ticket_id = 1; + * + * @return The bytes for accountTicketId. + */ + com.google.protobuf.ByteString getAccountTicketIdBytes(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ResourcesProto.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ResourcesProto.java new file mode 100644 index 000000000000..c78b8307d62c --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ResourcesProto.java @@ -0,0 +1,558 @@ +/* + * Copyright 2020 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/admin/v1beta/resources.proto + +package com.google.analytics.admin.v1beta; + +public final class ResourcesProto { + private ResourcesProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_Account_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_Account_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_Property_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_Property_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_DataStream_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_DataStream_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_DataStream_WebStreamData_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_DataStream_WebStreamData_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_DataStream_AndroidAppStreamData_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_DataStream_AndroidAppStreamData_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_DataStream_IosAppStreamData_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_DataStream_IosAppStreamData_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_FirebaseLink_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_FirebaseLink_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_GoogleAdsLink_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_GoogleAdsLink_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_DataSharingSettings_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_DataSharingSettings_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_AccountSummary_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_AccountSummary_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_PropertySummary_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_PropertySummary_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_MeasurementProtocolSecret_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_MeasurementProtocolSecret_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_ChangeHistoryEvent_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_ChangeHistoryEvent_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_ChangeHistoryChange_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_ChangeHistoryChange_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_ChangeHistoryChange_ChangeHistoryResource_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_ChangeHistoryChange_ChangeHistoryResource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_ConversionEvent_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_ConversionEvent_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_CustomDimension_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_CustomDimension_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_CustomMetric_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_CustomMetric_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1beta_DataRetentionSettings_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1beta_DataRetentionSettings_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n-google/analytics/admin/v1beta/resource" + + "s.proto\022\035google.analytics.admin.v1beta\032\037" + + "google/api/field_behavior.proto\032\031google/" + + "api/resource.proto\032\037google/protobuf/time" + + "stamp.proto\032\036google/protobuf/wrappers.pr" + + "oto\"\216\002\n\007Account\022\021\n\004name\030\001 \001(\tB\003\340A\003\0224\n\013cr" + + "eate_time\030\002 \001(\0132\032.google.protobuf.Timest" + + "ampB\003\340A\003\0224\n\013update_time\030\003 \001(\0132\032.google.p" + + "rotobuf.TimestampB\003\340A\003\022\031\n\014display_name\030\004" + + " \001(\tB\003\340A\002\022\023\n\013region_code\030\005 \001(\t\022\024\n\007delete" + + "d\030\006 \001(\010B\003\340A\003:>\352A;\n%analyticsadmin.google" + + "apis.com/Account\022\022accounts/{account}\"\266\005\n" + + "\010Property\022\021\n\004name\030\001 \001(\tB\003\340A\003\022G\n\rproperty" + + "_type\030\016 \001(\0162+.google.analytics.admin.v1b" + + "eta.PropertyTypeB\003\340A\005\0224\n\013create_time\030\003 \001" + + "(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n\013u" + + "pdate_time\030\004 \001(\0132\032.google.protobuf.Times" + + "tampB\003\340A\003\022\023\n\006parent\030\002 \001(\tB\003\340A\005\022\031\n\014displa" + + "y_name\030\005 \001(\tB\003\340A\002\022J\n\021industry_category\030\006" + + " \001(\0162/.google.analytics.admin.v1beta.Ind" + + "ustryCategory\022\026\n\ttime_zone\030\007 \001(\tB\003\340A\002\022\025\n" + + "\rcurrency_code\030\010 \001(\t\022G\n\rservice_level\030\n " + + "\001(\0162+.google.analytics.admin.v1beta.Serv" + + "iceLevelB\003\340A\003\0224\n\013delete_time\030\013 \001(\0132\032.goo" + + "gle.protobuf.TimestampB\003\340A\003\0224\n\013expire_ti" + + "me\030\014 \001(\0132\032.google.protobuf.TimestampB\003\340A" + + "\003\022>\n\007account\030\r \001(\tB-\340A\005\372A\'\n%analyticsadm" + + "in.googleapis.com/Account:B\352A?\n&analytic" + + "sadmin.googleapis.com/Property\022\025properti" + + "es/{property}\"\365\007\n\nDataStream\022R\n\017web_stre" + + "am_data\030\006 \001(\01327.google.analytics.admin.v" + + "1beta.DataStream.WebStreamDataH\000\022a\n\027andr" + + "oid_app_stream_data\030\007 \001(\0132>.google.analy" + + "tics.admin.v1beta.DataStream.AndroidAppS" + + "treamDataH\000\022Y\n\023ios_app_stream_data\030\010 \001(\013" + + "2:.google.analytics.admin.v1beta.DataStr" + + "eam.IosAppStreamDataH\000\022\021\n\004name\030\001 \001(\tB\003\340A" + + "\003\022N\n\004type\030\002 \001(\01628.google.analytics.admin" + + ".v1beta.DataStream.DataStreamTypeB\006\340A\005\340A" + + "\002\022\024\n\014display_name\030\003 \001(\t\0224\n\013create_time\030\004" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + + "\013update_time\030\005 \001(\0132\032.google.protobuf.Tim" + + "estampB\003\340A\003\032d\n\rWebStreamData\022\033\n\016measurem" + + "ent_id\030\001 \001(\tB\003\340A\003\022\034\n\017firebase_app_id\030\002 \001" + + "(\tB\003\340A\003\022\030\n\013default_uri\030\003 \001(\tB\003\340A\005\032O\n\024And" + + "roidAppStreamData\022\034\n\017firebase_app_id\030\001 \001" + + "(\tB\003\340A\003\022\031\n\014package_name\030\002 \001(\tB\003\340A\005\032K\n\020Io" + + "sAppStreamData\022\034\n\017firebase_app_id\030\001 \001(\tB" + + "\003\340A\003\022\031\n\tbundle_id\030\002 \001(\tB\006\340A\005\340A\002\"}\n\016DataS" + + "treamType\022 \n\034DATA_STREAM_TYPE_UNSPECIFIE" + + "D\020\000\022\023\n\017WEB_DATA_STREAM\020\001\022\033\n\027ANDROID_APP_" + + "DATA_STREAM\020\002\022\027\n\023IOS_APP_DATA_STREAM\020\003:^" + + "\352A[\n(analyticsadmin.googleapis.com/DataS" + + "tream\022/properties/{property}/dataStreams" + + "/{data_stream}B\r\n\013stream_data\"\323\001\n\014Fireba" + + "seLink\022\021\n\004name\030\001 \001(\tB\003\340A\003\022\024\n\007project\030\002 \001" + + "(\tB\003\340A\005\0224\n\013create_time\030\003 \001(\0132\032.google.pr" + + "otobuf.TimestampB\003\340A\003:d\352Aa\n*analyticsadm" + + "in.googleapis.com/FirebaseLink\0223properti" + + "es/{property}/firebaseLinks/{firebase_li" + + "nk}\"\230\003\n\rGoogleAdsLink\022\021\n\004name\030\001 \001(\tB\003\340A\003" + + "\022\030\n\013customer_id\030\003 \001(\tB\003\340A\005\022\037\n\022can_manage" + + "_clients\030\004 \001(\010B\003\340A\003\022?\n\033ads_personalizati" + + "on_enabled\030\005 \001(\0132\032.google.protobuf.BoolV" + + "alue\0224\n\013create_time\030\007 \001(\0132\032.google.proto" + + "buf.TimestampB\003\340A\003\0224\n\013update_time\030\010 \001(\0132" + + "\032.google.protobuf.TimestampB\003\340A\003\022\"\n\025crea" + + "tor_email_address\030\t \001(\tB\003\340A\003:h\352Ae\n+analy" + + "ticsadmin.googleapis.com/GoogleAdsLink\0226" + + "properties/{property}/googleAdsLinks/{go" + + "ogle_ads_link}\"\353\002\n\023DataSharingSettings\022\021" + + "\n\004name\030\001 \001(\tB\003\340A\003\022+\n#sharing_with_google" + + "_support_enabled\030\002 \001(\010\0222\n*sharing_with_g" + + "oogle_assigned_sales_enabled\030\003 \001(\010\022-\n%sh" + + "aring_with_google_any_sales_enabled\030\004 \001(" + + "\010\022,\n$sharing_with_google_products_enable" + + "d\030\005 \001(\010\022#\n\033sharing_with_others_enabled\030\006" + + " \001(\010:^\352A[\n1analyticsadmin.googleapis.com" + + "/DataSharingSettings\022&accounts/{account}" + + "/dataSharingSettings\"\224\002\n\016AccountSummary\022" + + "\014\n\004name\030\001 \001(\t\022;\n\007account\030\002 \001(\tB*\372A\'\n%ana" + + "lyticsadmin.googleapis.com/Account\022\024\n\014di" + + "splay_name\030\003 \001(\t\022J\n\022property_summaries\030\004" + + " \003(\0132..google.analytics.admin.v1beta.Pro" + + "pertySummary:U\352AR\n,analyticsadmin.google" + + "apis.com/AccountSummary\022\"accountSummarie" + + "s/{account_summary}\"\272\001\n\017PropertySummary\022" + + "=\n\010property\030\001 \001(\tB+\372A(\n&analyticsadmin.g" + + "oogleapis.com/Property\022\024\n\014display_name\030\002" + + " \001(\t\022B\n\rproperty_type\030\003 \001(\0162+.google.ana" + + "lytics.admin.v1beta.PropertyType\022\016\n\006pare" + + "nt\030\004 \001(\t\"\216\002\n\031MeasurementProtocolSecret\022\021" + + "\n\004name\030\001 \001(\tB\003\340A\003\022\031\n\014display_name\030\002 \001(\tB" + + "\003\340A\002\022\031\n\014secret_value\030\003 \001(\tB\003\340A\003:\247\001\352A\243\001\n7" + + "analyticsadmin.googleapis.com/Measuremen" + + "tProtocolSecret\022hproperties/{property}/d" + + "ataStreams/{data_stream}/measurementProt" + + "ocolSecrets/{measurement_protocol_secret" + + "}\"\210\002\n\022ChangeHistoryEvent\022\n\n\002id\030\001 \001(\t\022/\n\013" + + "change_time\030\002 \001(\0132\032.google.protobuf.Time" + + "stamp\022<\n\nactor_type\030\003 \001(\0162(.google.analy" + + "tics.admin.v1beta.ActorType\022\030\n\020user_acto" + + "r_email\030\004 \001(\t\022\030\n\020changes_filtered\030\005 \001(\010\022" + + "C\n\007changes\030\006 \003(\01322.google.analytics.admi" + + "n.v1beta.ChangeHistoryChange\"\252\007\n\023ChangeH" + + "istoryChange\022\020\n\010resource\030\001 \001(\t\0229\n\006action" + + "\030\002 \001(\0162).google.analytics.admin.v1beta.A" + + "ctionType\022h\n\026resource_before_change\030\003 \001(" + + "\0132H.google.analytics.admin.v1beta.Change" + + "HistoryChange.ChangeHistoryResource\022g\n\025r" + + "esource_after_change\030\004 \001(\0132H.google.anal" + + "ytics.admin.v1beta.ChangeHistoryChange.C" + + "hangeHistoryResource\032\362\004\n\025ChangeHistoryRe" + + "source\0229\n\007account\030\001 \001(\0132&.google.analyti" + + "cs.admin.v1beta.AccountH\000\022;\n\010property\030\002 " + + "\001(\0132\'.google.analytics.admin.v1beta.Prop" + + "ertyH\000\022D\n\rfirebase_link\030\006 \001(\0132+.google.a" + + "nalytics.admin.v1beta.FirebaseLinkH\000\022G\n\017" + + "google_ads_link\030\007 \001(\0132,.google.analytics" + + ".admin.v1beta.GoogleAdsLinkH\000\022J\n\020convers" + + "ion_event\030\013 \001(\0132..google.analytics.admin" + + ".v1beta.ConversionEventH\000\022_\n\033measurement" + + "_protocol_secret\030\014 \001(\01328.google.analytic" + + "s.admin.v1beta.MeasurementProtocolSecret" + + "H\000\022W\n\027data_retention_settings\030\017 \001(\01324.go" + + "ogle.analytics.admin.v1beta.DataRetentio" + + "nSettingsH\000\022@\n\013data_stream\030\022 \001(\0132).googl" + + "e.analytics.admin.v1beta.DataStreamH\000B\n\n" + + "\010resource\"\217\002\n\017ConversionEvent\022\021\n\004name\030\001 " + + "\001(\tB\003\340A\003\022\027\n\nevent_name\030\002 \001(\tB\003\340A\005\0224\n\013cre" + + "ate_time\030\003 \001(\0132\032.google.protobuf.Timesta" + + "mpB\003\340A\003\022\026\n\tdeletable\030\004 \001(\010B\003\340A\003\022\023\n\006custo" + + "m\030\005 \001(\010B\003\340A\003:m\352Aj\n-analyticsadmin.google" + + "apis.com/ConversionEvent\0229properties/{pr" + + "operty}/conversionEvents/{conversion_eve" + + "nt}\"\261\003\n\017CustomDimension\022\021\n\004name\030\001 \001(\tB\003\340" + + "A\003\022\036\n\016parameter_name\030\002 \001(\tB\006\340A\002\340A\005\022\031\n\014di" + + "splay_name\030\003 \001(\tB\003\340A\002\022\030\n\013description\030\004 \001" + + "(\tB\003\340A\001\022T\n\005scope\030\005 \001(\0162=.google.analytic" + + "s.admin.v1beta.CustomDimension.Dimension" + + "ScopeB\006\340A\002\340A\005\022)\n\034disallow_ads_personaliz" + + "ation\030\006 \001(\010B\003\340A\001\"F\n\016DimensionScope\022\037\n\033DI" + + "MENSION_SCOPE_UNSPECIFIED\020\000\022\t\n\005EVENT\020\001\022\010" + + "\n\004USER\020\002:m\352Aj\n-analyticsadmin.googleapis" + + ".com/CustomDimension\0229properties/{proper" + + "ty}/customDimensions/{custom_dimension}\"" + + "\302\006\n\014CustomMetric\022\021\n\004name\030\001 \001(\tB\003\340A\003\022\036\n\016p" + + "arameter_name\030\002 \001(\tB\006\340A\002\340A\005\022\031\n\014display_n" + + "ame\030\003 \001(\tB\003\340A\002\022\030\n\013description\030\004 \001(\tB\003\340A\001" + + "\022Z\n\020measurement_unit\030\005 \001(\0162;.google.anal" + + "ytics.admin.v1beta.CustomMetric.Measurem" + + "entUnitB\003\340A\002\022N\n\005scope\030\006 \001(\01627.google.ana" + + "lytics.admin.v1beta.CustomMetric.MetricS" + + "copeB\006\340A\002\340A\005\022e\n\026restricted_metric_type\030\010" + + " \003(\0162@.google.analytics.admin.v1beta.Cus" + + "tomMetric.RestrictedMetricTypeB\003\340A\001\"\267\001\n\017" + + "MeasurementUnit\022 \n\034MEASUREMENT_UNIT_UNSP" + + "ECIFIED\020\000\022\014\n\010STANDARD\020\001\022\014\n\010CURRENCY\020\002\022\010\n" + + "\004FEET\020\003\022\n\n\006METERS\020\004\022\016\n\nKILOMETERS\020\005\022\t\n\005M" + + "ILES\020\006\022\020\n\014MILLISECONDS\020\007\022\013\n\007SECONDS\020\010\022\013\n" + + "\007MINUTES\020\t\022\t\n\005HOURS\020\n\"6\n\013MetricScope\022\034\n\030" + + "METRIC_SCOPE_UNSPECIFIED\020\000\022\t\n\005EVENT\020\001\"_\n" + + "\024RestrictedMetricType\022&\n\"RESTRICTED_METR" + + "IC_TYPE_UNSPECIFIED\020\000\022\r\n\tCOST_DATA\020\001\022\020\n\014" + + "REVENUE_DATA\020\002:d\352Aa\n*analyticsadmin.goog" + + "leapis.com/CustomMetric\0223properties/{pro" + + "perty}/customMetrics/{custom_metric}\"\301\003\n" + + "\025DataRetentionSettings\022\021\n\004name\030\001 \001(\tB\003\340A" + + "\003\022d\n\024event_data_retention\030\002 \001(\0162F.google" + + ".analytics.admin.v1beta.DataRetentionSet" + + "tings.RetentionDuration\022\'\n\037reset_user_da" + + "ta_on_new_activity\030\003 \001(\010\"\236\001\n\021RetentionDu" + + "ration\022\"\n\036RETENTION_DURATION_UNSPECIFIED" + + "\020\000\022\016\n\nTWO_MONTHS\020\001\022\023\n\017FOURTEEN_MONTHS\020\003\022" + + "\025\n\021TWENTY_SIX_MONTHS\020\004\022\027\n\023THIRTY_EIGHT_M" + + "ONTHS\020\005\022\020\n\014FIFTY_MONTHS\020\006:e\352Ab\n3analytic" + + "sadmin.googleapis.com/DataRetentionSetti" + + "ngs\022+properties/{property}/dataRetention" + + "Settings*\252\004\n\020IndustryCategory\022!\n\035INDUSTR" + + "Y_CATEGORY_UNSPECIFIED\020\000\022\016\n\nAUTOMOTIVE\020\001" + + "\022#\n\037BUSINESS_AND_INDUSTRIAL_MARKETS\020\002\022\013\n" + + "\007FINANCE\020\003\022\016\n\nHEALTHCARE\020\004\022\016\n\nTECHNOLOGY" + + "\020\005\022\n\n\006TRAVEL\020\006\022\t\n\005OTHER\020\007\022\032\n\026ARTS_AND_EN" + + "TERTAINMENT\020\010\022\026\n\022BEAUTY_AND_FITNESS\020\t\022\030\n" + + "\024BOOKS_AND_LITERATURE\020\n\022\022\n\016FOOD_AND_DRIN" + + "K\020\013\022\t\n\005GAMES\020\014\022\027\n\023HOBBIES_AND_LEISURE\020\r\022" + + "\023\n\017HOME_AND_GARDEN\020\016\022\030\n\024INTERNET_AND_TEL" + + "ECOM\020\017\022\026\n\022LAW_AND_GOVERNMENT\020\020\022\010\n\004NEWS\020\021" + + "\022\026\n\022ONLINE_COMMUNITIES\020\022\022\026\n\022PEOPLE_AND_S" + + "OCIETY\020\023\022\024\n\020PETS_AND_ANIMALS\020\024\022\017\n\013REAL_E" + + "STATE\020\025\022\r\n\tREFERENCE\020\026\022\013\n\007SCIENCE\020\027\022\n\n\006S" + + "PORTS\020\030\022\026\n\022JOBS_AND_EDUCATION\020\031\022\014\n\010SHOPP" + + "ING\020\032*f\n\014ServiceLevel\022\035\n\031SERVICE_LEVEL_U" + + "NSPECIFIED\020\000\022\035\n\031GOOGLE_ANALYTICS_STANDAR" + + "D\020\001\022\030\n\024GOOGLE_ANALYTICS_360\020\002*J\n\tActorTy" + + "pe\022\032\n\026ACTOR_TYPE_UNSPECIFIED\020\000\022\010\n\004USER\020\001" + + "\022\n\n\006SYSTEM\020\002\022\013\n\007SUPPORT\020\003*P\n\nActionType\022" + + "\033\n\027ACTION_TYPE_UNSPECIFIED\020\000\022\013\n\007CREATED\020" + + "\001\022\013\n\007UPDATED\020\002\022\013\n\007DELETED\020\003*\377\002\n\031ChangeHi" + + "storyResourceType\022,\n(CHANGE_HISTORY_RESO" + + "URCE_TYPE_UNSPECIFIED\020\000\022\013\n\007ACCOUNT\020\001\022\014\n\010" + + "PROPERTY\020\002\022\021\n\rFIREBASE_LINK\020\006\022\023\n\017GOOGLE_" + + "ADS_LINK\020\007\022\033\n\027GOOGLE_SIGNALS_SETTINGS\020\010\022" + + "\024\n\020CONVERSION_EVENT\020\t\022\037\n\033MEASUREMENT_PRO" + + "TOCOL_SECRET\020\n\022\033\n\027DATA_RETENTION_SETTING" + + "S\020\r\022%\n!DISPLAY_VIDEO_360_ADVERTISER_LINK" + + "\020\016\022.\n*DISPLAY_VIDEO_360_ADVERTISER_LINK_" + + "PROPOSAL\020\017\022\017\n\013DATA_STREAM\020\022\022\030\n\024ATTRIBUTI" + + "ON_SETTINGS\020\024*\202\001\n\014PropertyType\022\035\n\031PROPER" + + "TY_TYPE_UNSPECIFIED\020\000\022\032\n\026PROPERTY_TYPE_O" + + "RDINARY\020\001\022\035\n\031PROPERTY_TYPE_SUBPROPERTY\020\002" + + "\022\030\n\024PROPERTY_TYPE_ROLLUP\020\003By\n!com.google" + + ".analytics.admin.v1betaB\016ResourcesProtoP" + + "\001ZBgoogle.golang.org/genproto/googleapis" + + "/analytics/admin/v1beta;adminb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.protobuf.WrappersProto.getDescriptor(), + }); + internal_static_google_analytics_admin_v1beta_Account_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_analytics_admin_v1beta_Account_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_Account_descriptor, + new java.lang.String[] { + "Name", "CreateTime", "UpdateTime", "DisplayName", "RegionCode", "Deleted", + }); + internal_static_google_analytics_admin_v1beta_Property_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_analytics_admin_v1beta_Property_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_Property_descriptor, + new java.lang.String[] { + "Name", + "PropertyType", + "CreateTime", + "UpdateTime", + "Parent", + "DisplayName", + "IndustryCategory", + "TimeZone", + "CurrencyCode", + "ServiceLevel", + "DeleteTime", + "ExpireTime", + "Account", + }); + internal_static_google_analytics_admin_v1beta_DataStream_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_analytics_admin_v1beta_DataStream_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_DataStream_descriptor, + new java.lang.String[] { + "WebStreamData", + "AndroidAppStreamData", + "IosAppStreamData", + "Name", + "Type", + "DisplayName", + "CreateTime", + "UpdateTime", + "StreamData", + }); + internal_static_google_analytics_admin_v1beta_DataStream_WebStreamData_descriptor = + internal_static_google_analytics_admin_v1beta_DataStream_descriptor.getNestedTypes().get(0); + internal_static_google_analytics_admin_v1beta_DataStream_WebStreamData_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_DataStream_WebStreamData_descriptor, + new java.lang.String[] { + "MeasurementId", "FirebaseAppId", "DefaultUri", + }); + internal_static_google_analytics_admin_v1beta_DataStream_AndroidAppStreamData_descriptor = + internal_static_google_analytics_admin_v1beta_DataStream_descriptor.getNestedTypes().get(1); + internal_static_google_analytics_admin_v1beta_DataStream_AndroidAppStreamData_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_DataStream_AndroidAppStreamData_descriptor, + new java.lang.String[] { + "FirebaseAppId", "PackageName", + }); + internal_static_google_analytics_admin_v1beta_DataStream_IosAppStreamData_descriptor = + internal_static_google_analytics_admin_v1beta_DataStream_descriptor.getNestedTypes().get(2); + internal_static_google_analytics_admin_v1beta_DataStream_IosAppStreamData_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_DataStream_IosAppStreamData_descriptor, + new java.lang.String[] { + "FirebaseAppId", "BundleId", + }); + internal_static_google_analytics_admin_v1beta_FirebaseLink_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_analytics_admin_v1beta_FirebaseLink_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_FirebaseLink_descriptor, + new java.lang.String[] { + "Name", "Project", "CreateTime", + }); + internal_static_google_analytics_admin_v1beta_GoogleAdsLink_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_analytics_admin_v1beta_GoogleAdsLink_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_GoogleAdsLink_descriptor, + new java.lang.String[] { + "Name", + "CustomerId", + "CanManageClients", + "AdsPersonalizationEnabled", + "CreateTime", + "UpdateTime", + "CreatorEmailAddress", + }); + internal_static_google_analytics_admin_v1beta_DataSharingSettings_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_analytics_admin_v1beta_DataSharingSettings_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_DataSharingSettings_descriptor, + new java.lang.String[] { + "Name", + "SharingWithGoogleSupportEnabled", + "SharingWithGoogleAssignedSalesEnabled", + "SharingWithGoogleAnySalesEnabled", + "SharingWithGoogleProductsEnabled", + "SharingWithOthersEnabled", + }); + internal_static_google_analytics_admin_v1beta_AccountSummary_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_analytics_admin_v1beta_AccountSummary_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_AccountSummary_descriptor, + new java.lang.String[] { + "Name", "Account", "DisplayName", "PropertySummaries", + }); + internal_static_google_analytics_admin_v1beta_PropertySummary_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_analytics_admin_v1beta_PropertySummary_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_PropertySummary_descriptor, + new java.lang.String[] { + "Property", "DisplayName", "PropertyType", "Parent", + }); + internal_static_google_analytics_admin_v1beta_MeasurementProtocolSecret_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_analytics_admin_v1beta_MeasurementProtocolSecret_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_MeasurementProtocolSecret_descriptor, + new java.lang.String[] { + "Name", "DisplayName", "SecretValue", + }); + internal_static_google_analytics_admin_v1beta_ChangeHistoryEvent_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_analytics_admin_v1beta_ChangeHistoryEvent_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_ChangeHistoryEvent_descriptor, + new java.lang.String[] { + "Id", "ChangeTime", "ActorType", "UserActorEmail", "ChangesFiltered", "Changes", + }); + internal_static_google_analytics_admin_v1beta_ChangeHistoryChange_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_analytics_admin_v1beta_ChangeHistoryChange_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_ChangeHistoryChange_descriptor, + new java.lang.String[] { + "Resource", "Action", "ResourceBeforeChange", "ResourceAfterChange", + }); + internal_static_google_analytics_admin_v1beta_ChangeHistoryChange_ChangeHistoryResource_descriptor = + internal_static_google_analytics_admin_v1beta_ChangeHistoryChange_descriptor + .getNestedTypes() + .get(0); + internal_static_google_analytics_admin_v1beta_ChangeHistoryChange_ChangeHistoryResource_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_ChangeHistoryChange_ChangeHistoryResource_descriptor, + new java.lang.String[] { + "Account", + "Property", + "FirebaseLink", + "GoogleAdsLink", + "ConversionEvent", + "MeasurementProtocolSecret", + "DataRetentionSettings", + "DataStream", + "Resource", + }); + internal_static_google_analytics_admin_v1beta_ConversionEvent_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_analytics_admin_v1beta_ConversionEvent_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_ConversionEvent_descriptor, + new java.lang.String[] { + "Name", "EventName", "CreateTime", "Deletable", "Custom", + }); + internal_static_google_analytics_admin_v1beta_CustomDimension_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_analytics_admin_v1beta_CustomDimension_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_CustomDimension_descriptor, + new java.lang.String[] { + "Name", + "ParameterName", + "DisplayName", + "Description", + "Scope", + "DisallowAdsPersonalization", + }); + internal_static_google_analytics_admin_v1beta_CustomMetric_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_analytics_admin_v1beta_CustomMetric_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_CustomMetric_descriptor, + new java.lang.String[] { + "Name", + "ParameterName", + "DisplayName", + "Description", + "MeasurementUnit", + "Scope", + "RestrictedMetricType", + }); + internal_static_google_analytics_admin_v1beta_DataRetentionSettings_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_analytics_admin_v1beta_DataRetentionSettings_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1beta_DataRetentionSettings_descriptor, + new java.lang.String[] { + "Name", "EventDataRetention", "ResetUserDataOnNewActivity", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.protobuf.WrappersProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/SearchChangeHistoryEventsRequest.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/SearchChangeHistoryEventsRequest.java new file mode 100644 index 000000000000..2b13017e8020 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/SearchChangeHistoryEventsRequest.java @@ -0,0 +1,2935 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * Request message for SearchChangeHistoryEvents RPC.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest} + */ +public final class SearchChangeHistoryEventsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest) + SearchChangeHistoryEventsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use SearchChangeHistoryEventsRequest.newBuilder() to construct. + private SearchChangeHistoryEventsRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SearchChangeHistoryEventsRequest() { + account_ = ""; + property_ = ""; + resourceType_ = java.util.Collections.emptyList(); + action_ = java.util.Collections.emptyList(); + actorEmail_ = com.google.protobuf.LazyStringArrayList.EMPTY; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SearchChangeHistoryEventsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SearchChangeHistoryEventsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + account_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + property_ = s; + break; + } + case 24: + { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + resourceType_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + resourceType_.add(rawValue); + break; + } + case 26: + { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + resourceType_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + resourceType_.add(rawValue); + } + input.popLimit(oldLimit); + break; + } + case 32: + { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + action_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + action_.add(rawValue); + break; + } + case 34: + { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + action_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + action_.add(rawValue); + } + input.popLimit(oldLimit); + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + actorEmail_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000004; + } + actorEmail_.add(s); + break; + } + case 50: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (earliestChangeTime_ != null) { + subBuilder = earliestChangeTime_.toBuilder(); + } + earliestChangeTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(earliestChangeTime_); + earliestChangeTime_ = subBuilder.buildPartial(); + } + + break; + } + case 58: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (latestChangeTime_ != null) { + subBuilder = latestChangeTime_.toBuilder(); + } + latestChangeTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(latestChangeTime_); + latestChangeTime_ = subBuilder.buildPartial(); + } + + break; + } + case 64: + { + pageSize_ = input.readInt32(); + break; + } + case 74: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + resourceType_ = java.util.Collections.unmodifiableList(resourceType_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + action_ = java.util.Collections.unmodifiableList(action_); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + actorEmail_ = actorEmail_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_SearchChangeHistoryEventsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_SearchChangeHistoryEventsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest.class, + com.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest.Builder.class); + } + + public static final int ACCOUNT_FIELD_NUMBER = 1; + private volatile java.lang.Object account_; + /** + * + * + *
+   * Required. The account resource for which to return change history resources.
+   * 
+ * + * + * string account = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The account. + */ + @java.lang.Override + public java.lang.String getAccount() { + java.lang.Object ref = account_; + 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(); + account_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The account resource for which to return change history resources.
+   * 
+ * + * + * string account = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for account. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAccountBytes() { + java.lang.Object ref = account_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + account_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROPERTY_FIELD_NUMBER = 2; + private volatile java.lang.Object property_; + /** + * + * + *
+   * Optional. Resource name for a child property. If set, only return changes
+   * made to this property or its child resources.
+   * 
+ * + * + * string property = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The property. + */ + @java.lang.Override + public java.lang.String getProperty() { + java.lang.Object ref = property_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + property_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Resource name for a child property. If set, only return changes
+   * made to this property or its child resources.
+   * 
+ * + * + * string property = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for property. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPropertyBytes() { + java.lang.Object ref = property_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + property_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESOURCE_TYPE_FIELD_NUMBER = 3; + private java.util.List resourceType_; + private static final com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.analytics.admin.v1beta.ChangeHistoryResourceType> + resourceType_converter_ = + new com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.analytics.admin.v1beta.ChangeHistoryResourceType>() { + public com.google.analytics.admin.v1beta.ChangeHistoryResourceType convert( + java.lang.Integer from) { + @SuppressWarnings("deprecation") + com.google.analytics.admin.v1beta.ChangeHistoryResourceType result = + com.google.analytics.admin.v1beta.ChangeHistoryResourceType.valueOf(from); + return result == null + ? com.google.analytics.admin.v1beta.ChangeHistoryResourceType.UNRECOGNIZED + : result; + } + }; + /** + * + * + *
+   * Optional. If set, only return changes if they are for a resource that matches at
+   * least one of these types.
+   * 
+ * + * + * repeated .google.analytics.admin.v1beta.ChangeHistoryResourceType resource_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the resourceType. + */ + @java.lang.Override + public java.util.List + getResourceTypeList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.analytics.admin.v1beta.ChangeHistoryResourceType>( + resourceType_, resourceType_converter_); + } + /** + * + * + *
+   * Optional. If set, only return changes if they are for a resource that matches at
+   * least one of these types.
+   * 
+ * + * + * repeated .google.analytics.admin.v1beta.ChangeHistoryResourceType resource_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of resourceType. + */ + @java.lang.Override + public int getResourceTypeCount() { + return resourceType_.size(); + } + /** + * + * + *
+   * Optional. If set, only return changes if they are for a resource that matches at
+   * least one of these types.
+   * 
+ * + * + * repeated .google.analytics.admin.v1beta.ChangeHistoryResourceType resource_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The resourceType at the given index. + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.ChangeHistoryResourceType getResourceType(int index) { + return resourceType_converter_.convert(resourceType_.get(index)); + } + /** + * + * + *
+   * Optional. If set, only return changes if they are for a resource that matches at
+   * least one of these types.
+   * 
+ * + * + * repeated .google.analytics.admin.v1beta.ChangeHistoryResourceType resource_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the enum numeric values on the wire for resourceType. + */ + @java.lang.Override + public java.util.List getResourceTypeValueList() { + return resourceType_; + } + /** + * + * + *
+   * Optional. If set, only return changes if they are for a resource that matches at
+   * least one of these types.
+   * 
+ * + * + * repeated .google.analytics.admin.v1beta.ChangeHistoryResourceType resource_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of resourceType at the given index. + */ + @java.lang.Override + public int getResourceTypeValue(int index) { + return resourceType_.get(index); + } + + private int resourceTypeMemoizedSerializedSize; + + public static final int ACTION_FIELD_NUMBER = 4; + private java.util.List action_; + private static final com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.analytics.admin.v1beta.ActionType> + action_converter_ = + new com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.analytics.admin.v1beta.ActionType>() { + public com.google.analytics.admin.v1beta.ActionType convert(java.lang.Integer from) { + @SuppressWarnings("deprecation") + com.google.analytics.admin.v1beta.ActionType result = + com.google.analytics.admin.v1beta.ActionType.valueOf(from); + return result == null + ? com.google.analytics.admin.v1beta.ActionType.UNRECOGNIZED + : result; + } + }; + /** + * + * + *
+   * Optional. If set, only return changes that match one or more of these types of
+   * actions.
+   * 
+ * + * + * repeated .google.analytics.admin.v1beta.ActionType action = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the action. + */ + @java.lang.Override + public java.util.List getActionList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.analytics.admin.v1beta.ActionType>( + action_, action_converter_); + } + /** + * + * + *
+   * Optional. If set, only return changes that match one or more of these types of
+   * actions.
+   * 
+ * + * + * repeated .google.analytics.admin.v1beta.ActionType action = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of action. + */ + @java.lang.Override + public int getActionCount() { + return action_.size(); + } + /** + * + * + *
+   * Optional. If set, only return changes that match one or more of these types of
+   * actions.
+   * 
+ * + * + * repeated .google.analytics.admin.v1beta.ActionType action = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The action at the given index. + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.ActionType getAction(int index) { + return action_converter_.convert(action_.get(index)); + } + /** + * + * + *
+   * Optional. If set, only return changes that match one or more of these types of
+   * actions.
+   * 
+ * + * + * repeated .google.analytics.admin.v1beta.ActionType action = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the enum numeric values on the wire for action. + */ + @java.lang.Override + public java.util.List getActionValueList() { + return action_; + } + /** + * + * + *
+   * Optional. If set, only return changes that match one or more of these types of
+   * actions.
+   * 
+ * + * + * repeated .google.analytics.admin.v1beta.ActionType action = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of action at the given index. + */ + @java.lang.Override + public int getActionValue(int index) { + return action_.get(index); + } + + private int actionMemoizedSerializedSize; + + public static final int ACTOR_EMAIL_FIELD_NUMBER = 5; + private com.google.protobuf.LazyStringList actorEmail_; + /** + * + * + *
+   * Optional. If set, only return changes if they are made by a user in this list.
+   * 
+ * + * repeated string actor_email = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the actorEmail. + */ + public com.google.protobuf.ProtocolStringList getActorEmailList() { + return actorEmail_; + } + /** + * + * + *
+   * Optional. If set, only return changes if they are made by a user in this list.
+   * 
+ * + * repeated string actor_email = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of actorEmail. + */ + public int getActorEmailCount() { + return actorEmail_.size(); + } + /** + * + * + *
+   * Optional. If set, only return changes if they are made by a user in this list.
+   * 
+ * + * repeated string actor_email = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The actorEmail at the given index. + */ + public java.lang.String getActorEmail(int index) { + return actorEmail_.get(index); + } + /** + * + * + *
+   * Optional. If set, only return changes if they are made by a user in this list.
+   * 
+ * + * repeated string actor_email = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the actorEmail at the given index. + */ + public com.google.protobuf.ByteString getActorEmailBytes(int index) { + return actorEmail_.getByteString(index); + } + + public static final int EARLIEST_CHANGE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp earliestChangeTime_; + /** + * + * + *
+   * Optional. If set, only return changes made after this time (inclusive).
+   * 
+ * + * + * .google.protobuf.Timestamp earliest_change_time = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the earliestChangeTime field is set. + */ + @java.lang.Override + public boolean hasEarliestChangeTime() { + return earliestChangeTime_ != null; + } + /** + * + * + *
+   * Optional. If set, only return changes made after this time (inclusive).
+   * 
+ * + * + * .google.protobuf.Timestamp earliest_change_time = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The earliestChangeTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEarliestChangeTime() { + return earliestChangeTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : earliestChangeTime_; + } + /** + * + * + *
+   * Optional. If set, only return changes made after this time (inclusive).
+   * 
+ * + * + * .google.protobuf.Timestamp earliest_change_time = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEarliestChangeTimeOrBuilder() { + return getEarliestChangeTime(); + } + + public static final int LATEST_CHANGE_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp latestChangeTime_; + /** + * + * + *
+   * Optional. If set, only return changes made before this time (inclusive).
+   * 
+ * + * + * .google.protobuf.Timestamp latest_change_time = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the latestChangeTime field is set. + */ + @java.lang.Override + public boolean hasLatestChangeTime() { + return latestChangeTime_ != null; + } + /** + * + * + *
+   * Optional. If set, only return changes made before this time (inclusive).
+   * 
+ * + * + * .google.protobuf.Timestamp latest_change_time = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The latestChangeTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getLatestChangeTime() { + return latestChangeTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : latestChangeTime_; + } + /** + * + * + *
+   * Optional. If set, only return changes made before this time (inclusive).
+   * 
+ * + * + * .google.protobuf.Timestamp latest_change_time = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getLatestChangeTimeOrBuilder() { + return getLatestChangeTime(); + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 8; + private int pageSize_; + /** + * + * + *
+   * Optional. The maximum number of ChangeHistoryEvent items to return.
+   * The service may return fewer than this value, even if there are additional
+   * pages. If unspecified, at most 50 items will be returned.
+   * The maximum value is 200 (higher values will be coerced to the maximum).
+   * 
+ * + * int32 page_size = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 9; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * Optional. A page token, received from a previous `SearchChangeHistoryEvents` call.
+   * Provide this to retrieve the subsequent page. When paginating, all other
+   * parameters provided to `SearchChangeHistoryEvents` must match the call that
+   * provided the page token.
+   * 
+ * + * string page_token = 9 [(.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 `SearchChangeHistoryEvents` call.
+   * Provide this to retrieve the subsequent page. When paginating, all other
+   * parameters provided to `SearchChangeHistoryEvents` must match the call that
+   * provided the page token.
+   * 
+ * + * string page_token = 9 [(.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 { + getSerializedSize(); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(account_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, account_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(property_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, property_); + } + if (getResourceTypeList().size() > 0) { + output.writeUInt32NoTag(26); + output.writeUInt32NoTag(resourceTypeMemoizedSerializedSize); + } + for (int i = 0; i < resourceType_.size(); i++) { + output.writeEnumNoTag(resourceType_.get(i)); + } + if (getActionList().size() > 0) { + output.writeUInt32NoTag(34); + output.writeUInt32NoTag(actionMemoizedSerializedSize); + } + for (int i = 0; i < action_.size(); i++) { + output.writeEnumNoTag(action_.get(i)); + } + for (int i = 0; i < actorEmail_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, actorEmail_.getRaw(i)); + } + if (earliestChangeTime_ != null) { + output.writeMessage(6, getEarliestChangeTime()); + } + if (latestChangeTime_ != null) { + output.writeMessage(7, getLatestChangeTime()); + } + if (pageSize_ != 0) { + output.writeInt32(8, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, pageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(account_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, account_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(property_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, property_); + } + { + int dataSize = 0; + for (int i = 0; i < resourceType_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(resourceType_.get(i)); + } + size += dataSize; + if (!getResourceTypeList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + resourceTypeMemoizedSerializedSize = dataSize; + } + { + int dataSize = 0; + for (int i = 0; i < action_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(action_.get(i)); + } + size += dataSize; + if (!getActionList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + actionMemoizedSerializedSize = dataSize; + } + { + int dataSize = 0; + for (int i = 0; i < actorEmail_.size(); i++) { + dataSize += computeStringSizeNoTag(actorEmail_.getRaw(i)); + } + size += dataSize; + size += 1 * getActorEmailList().size(); + } + if (earliestChangeTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getEarliestChangeTime()); + } + if (latestChangeTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getLatestChangeTime()); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(8, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, pageToken_); + } + size += unknownFields.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.admin.v1beta.SearchChangeHistoryEventsRequest)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest other = + (com.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest) obj; + + if (!getAccount().equals(other.getAccount())) return false; + if (!getProperty().equals(other.getProperty())) return false; + if (!resourceType_.equals(other.resourceType_)) return false; + if (!action_.equals(other.action_)) return false; + if (!getActorEmailList().equals(other.getActorEmailList())) return false; + if (hasEarliestChangeTime() != other.hasEarliestChangeTime()) return false; + if (hasEarliestChangeTime()) { + if (!getEarliestChangeTime().equals(other.getEarliestChangeTime())) return false; + } + if (hasLatestChangeTime() != other.hasLatestChangeTime()) return false; + if (hasLatestChangeTime()) { + if (!getLatestChangeTime().equals(other.getLatestChangeTime())) return false; + } + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getAccount().hashCode(); + hash = (37 * hash) + PROPERTY_FIELD_NUMBER; + hash = (53 * hash) + getProperty().hashCode(); + if (getResourceTypeCount() > 0) { + hash = (37 * hash) + RESOURCE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + resourceType_.hashCode(); + } + if (getActionCount() > 0) { + hash = (37 * hash) + ACTION_FIELD_NUMBER; + hash = (53 * hash) + action_.hashCode(); + } + if (getActorEmailCount() > 0) { + hash = (37 * hash) + ACTOR_EMAIL_FIELD_NUMBER; + hash = (53 * hash) + getActorEmailList().hashCode(); + } + if (hasEarliestChangeTime()) { + hash = (37 * hash) + EARLIEST_CHANGE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEarliestChangeTime().hashCode(); + } + if (hasLatestChangeTime()) { + hash = (37 * hash) + LATEST_CHANGE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getLatestChangeTime().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) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest 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.admin.v1beta.SearchChangeHistoryEventsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest 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.admin.v1beta.SearchChangeHistoryEventsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest 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.admin.v1beta.SearchChangeHistoryEventsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest + 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.admin.v1beta.SearchChangeHistoryEventsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest 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.admin.v1beta.SearchChangeHistoryEventsRequest 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; + } + /** + * + * + *
+   * Request message for SearchChangeHistoryEvents RPC.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest) + com.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_SearchChangeHistoryEventsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_SearchChangeHistoryEventsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest.class, + com.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest.Builder.class); + } + + // Construct using + // com.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + account_ = ""; + + property_ = ""; + + resourceType_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + action_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + actorEmail_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + if (earliestChangeTimeBuilder_ == null) { + earliestChangeTime_ = null; + } else { + earliestChangeTime_ = null; + earliestChangeTimeBuilder_ = null; + } + if (latestChangeTimeBuilder_ == null) { + latestChangeTime_ = null; + } else { + latestChangeTime_ = null; + latestChangeTimeBuilder_ = null; + } + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_SearchChangeHistoryEventsRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest + getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest build() { + com.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest buildPartial() { + com.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest result = + new com.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest(this); + int from_bitField0_ = bitField0_; + result.account_ = account_; + result.property_ = property_; + if (((bitField0_ & 0x00000001) != 0)) { + resourceType_ = java.util.Collections.unmodifiableList(resourceType_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.resourceType_ = resourceType_; + if (((bitField0_ & 0x00000002) != 0)) { + action_ = java.util.Collections.unmodifiableList(action_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.action_ = action_; + if (((bitField0_ & 0x00000004) != 0)) { + actorEmail_ = actorEmail_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.actorEmail_ = actorEmail_; + if (earliestChangeTimeBuilder_ == null) { + result.earliestChangeTime_ = earliestChangeTime_; + } else { + result.earliestChangeTime_ = earliestChangeTimeBuilder_.build(); + } + if (latestChangeTimeBuilder_ == null) { + result.latestChangeTime_ = latestChangeTime_; + } else { + result.latestChangeTime_ = latestChangeTimeBuilder_.build(); + } + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + @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.admin.v1beta.SearchChangeHistoryEventsRequest) { + return mergeFrom( + (com.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest other) { + if (other + == com.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest + .getDefaultInstance()) return this; + if (!other.getAccount().isEmpty()) { + account_ = other.account_; + onChanged(); + } + if (!other.getProperty().isEmpty()) { + property_ = other.property_; + onChanged(); + } + if (!other.resourceType_.isEmpty()) { + if (resourceType_.isEmpty()) { + resourceType_ = other.resourceType_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureResourceTypeIsMutable(); + resourceType_.addAll(other.resourceType_); + } + onChanged(); + } + if (!other.action_.isEmpty()) { + if (action_.isEmpty()) { + action_ = other.action_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureActionIsMutable(); + action_.addAll(other.action_); + } + onChanged(); + } + if (!other.actorEmail_.isEmpty()) { + if (actorEmail_.isEmpty()) { + actorEmail_ = other.actorEmail_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureActorEmailIsMutable(); + actorEmail_.addAll(other.actorEmail_); + } + onChanged(); + } + if (other.hasEarliestChangeTime()) { + mergeEarliestChangeTime(other.getEarliestChangeTime()); + } + if (other.hasLatestChangeTime()) { + mergeLatestChangeTime(other.getLatestChangeTime()); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object account_ = ""; + /** + * + * + *
+     * Required. The account resource for which to return change history resources.
+     * 
+ * + * + * string account = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The account. + */ + public java.lang.String getAccount() { + java.lang.Object ref = account_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + account_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The account resource for which to return change history resources.
+     * 
+ * + * + * string account = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for account. + */ + public com.google.protobuf.ByteString getAccountBytes() { + java.lang.Object ref = account_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + account_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The account resource for which to return change history resources.
+     * 
+ * + * + * string account = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The account to set. + * @return This builder for chaining. + */ + public Builder setAccount(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + account_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The account resource for which to return change history resources.
+     * 
+ * + * + * string account = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearAccount() { + + account_ = getDefaultInstance().getAccount(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The account resource for which to return change history resources.
+     * 
+ * + * + * string account = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for account to set. + * @return This builder for chaining. + */ + public Builder setAccountBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + account_ = value; + onChanged(); + return this; + } + + private java.lang.Object property_ = ""; + /** + * + * + *
+     * Optional. Resource name for a child property. If set, only return changes
+     * made to this property or its child resources.
+     * 
+ * + * + * string property = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The property. + */ + public java.lang.String getProperty() { + java.lang.Object ref = property_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + property_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Resource name for a child property. If set, only return changes
+     * made to this property or its child resources.
+     * 
+ * + * + * string property = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for property. + */ + public com.google.protobuf.ByteString getPropertyBytes() { + java.lang.Object ref = property_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + property_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Resource name for a child property. If set, only return changes
+     * made to this property or its child resources.
+     * 
+ * + * + * string property = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The property to set. + * @return This builder for chaining. + */ + public Builder setProperty(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + property_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Resource name for a child property. If set, only return changes
+     * made to this property or its child resources.
+     * 
+ * + * + * string property = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearProperty() { + + property_ = getDefaultInstance().getProperty(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Resource name for a child property. If set, only return changes
+     * made to this property or its child resources.
+     * 
+ * + * + * string property = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for property to set. + * @return This builder for chaining. + */ + public Builder setPropertyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + property_ = value; + onChanged(); + return this; + } + + private java.util.List resourceType_ = java.util.Collections.emptyList(); + + private void ensureResourceTypeIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + resourceType_ = new java.util.ArrayList(resourceType_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Optional. If set, only return changes if they are for a resource that matches at
+     * least one of these types.
+     * 
+ * + * + * repeated .google.analytics.admin.v1beta.ChangeHistoryResourceType resource_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the resourceType. + */ + public java.util.List + getResourceTypeList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.analytics.admin.v1beta.ChangeHistoryResourceType>( + resourceType_, resourceType_converter_); + } + /** + * + * + *
+     * Optional. If set, only return changes if they are for a resource that matches at
+     * least one of these types.
+     * 
+ * + * + * repeated .google.analytics.admin.v1beta.ChangeHistoryResourceType resource_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of resourceType. + */ + public int getResourceTypeCount() { + return resourceType_.size(); + } + /** + * + * + *
+     * Optional. If set, only return changes if they are for a resource that matches at
+     * least one of these types.
+     * 
+ * + * + * repeated .google.analytics.admin.v1beta.ChangeHistoryResourceType resource_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The resourceType at the given index. + */ + public com.google.analytics.admin.v1beta.ChangeHistoryResourceType getResourceType(int index) { + return resourceType_converter_.convert(resourceType_.get(index)); + } + /** + * + * + *
+     * Optional. If set, only return changes if they are for a resource that matches at
+     * least one of these types.
+     * 
+ * + * + * repeated .google.analytics.admin.v1beta.ChangeHistoryResourceType resource_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The resourceType to set. + * @return This builder for chaining. + */ + public Builder setResourceType( + int index, com.google.analytics.admin.v1beta.ChangeHistoryResourceType value) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourceTypeIsMutable(); + resourceType_.set(index, value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If set, only return changes if they are for a resource that matches at
+     * least one of these types.
+     * 
+ * + * + * repeated .google.analytics.admin.v1beta.ChangeHistoryResourceType resource_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The resourceType to add. + * @return This builder for chaining. + */ + public Builder addResourceType( + com.google.analytics.admin.v1beta.ChangeHistoryResourceType value) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourceTypeIsMutable(); + resourceType_.add(value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If set, only return changes if they are for a resource that matches at
+     * least one of these types.
+     * 
+ * + * + * repeated .google.analytics.admin.v1beta.ChangeHistoryResourceType resource_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The resourceType to add. + * @return This builder for chaining. + */ + public Builder addAllResourceType( + java.lang.Iterable + values) { + ensureResourceTypeIsMutable(); + for (com.google.analytics.admin.v1beta.ChangeHistoryResourceType value : values) { + resourceType_.add(value.getNumber()); + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If set, only return changes if they are for a resource that matches at
+     * least one of these types.
+     * 
+ * + * + * repeated .google.analytics.admin.v1beta.ChangeHistoryResourceType resource_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearResourceType() { + resourceType_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If set, only return changes if they are for a resource that matches at
+     * least one of these types.
+     * 
+ * + * + * repeated .google.analytics.admin.v1beta.ChangeHistoryResourceType resource_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the enum numeric values on the wire for resourceType. + */ + public java.util.List getResourceTypeValueList() { + return java.util.Collections.unmodifiableList(resourceType_); + } + /** + * + * + *
+     * Optional. If set, only return changes if they are for a resource that matches at
+     * least one of these types.
+     * 
+ * + * + * repeated .google.analytics.admin.v1beta.ChangeHistoryResourceType resource_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of resourceType at the given index. + */ + public int getResourceTypeValue(int index) { + return resourceType_.get(index); + } + /** + * + * + *
+     * Optional. If set, only return changes if they are for a resource that matches at
+     * least one of these types.
+     * 
+ * + * + * repeated .google.analytics.admin.v1beta.ChangeHistoryResourceType resource_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of resourceType at the given index. + * @return This builder for chaining. + */ + public Builder setResourceTypeValue(int index, int value) { + ensureResourceTypeIsMutable(); + resourceType_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If set, only return changes if they are for a resource that matches at
+     * least one of these types.
+     * 
+ * + * + * repeated .google.analytics.admin.v1beta.ChangeHistoryResourceType resource_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for resourceType to add. + * @return This builder for chaining. + */ + public Builder addResourceTypeValue(int value) { + ensureResourceTypeIsMutable(); + resourceType_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If set, only return changes if they are for a resource that matches at
+     * least one of these types.
+     * 
+ * + * + * repeated .google.analytics.admin.v1beta.ChangeHistoryResourceType resource_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The enum numeric values on the wire for resourceType to add. + * @return This builder for chaining. + */ + public Builder addAllResourceTypeValue(java.lang.Iterable values) { + ensureResourceTypeIsMutable(); + for (int value : values) { + resourceType_.add(value); + } + onChanged(); + return this; + } + + private java.util.List action_ = java.util.Collections.emptyList(); + + private void ensureActionIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + action_ = new java.util.ArrayList(action_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * Optional. If set, only return changes that match one or more of these types of
+     * actions.
+     * 
+ * + * + * repeated .google.analytics.admin.v1beta.ActionType action = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the action. + */ + public java.util.List getActionList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.analytics.admin.v1beta.ActionType>( + action_, action_converter_); + } + /** + * + * + *
+     * Optional. If set, only return changes that match one or more of these types of
+     * actions.
+     * 
+ * + * + * repeated .google.analytics.admin.v1beta.ActionType action = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of action. + */ + public int getActionCount() { + return action_.size(); + } + /** + * + * + *
+     * Optional. If set, only return changes that match one or more of these types of
+     * actions.
+     * 
+ * + * + * repeated .google.analytics.admin.v1beta.ActionType action = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The action at the given index. + */ + public com.google.analytics.admin.v1beta.ActionType getAction(int index) { + return action_converter_.convert(action_.get(index)); + } + /** + * + * + *
+     * Optional. If set, only return changes that match one or more of these types of
+     * actions.
+     * 
+ * + * + * repeated .google.analytics.admin.v1beta.ActionType action = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The action to set. + * @return This builder for chaining. + */ + public Builder setAction(int index, com.google.analytics.admin.v1beta.ActionType value) { + if (value == null) { + throw new NullPointerException(); + } + ensureActionIsMutable(); + action_.set(index, value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If set, only return changes that match one or more of these types of
+     * actions.
+     * 
+ * + * + * repeated .google.analytics.admin.v1beta.ActionType action = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The action to add. + * @return This builder for chaining. + */ + public Builder addAction(com.google.analytics.admin.v1beta.ActionType value) { + if (value == null) { + throw new NullPointerException(); + } + ensureActionIsMutable(); + action_.add(value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If set, only return changes that match one or more of these types of
+     * actions.
+     * 
+ * + * + * repeated .google.analytics.admin.v1beta.ActionType action = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The action to add. + * @return This builder for chaining. + */ + public Builder addAllAction( + java.lang.Iterable values) { + ensureActionIsMutable(); + for (com.google.analytics.admin.v1beta.ActionType value : values) { + action_.add(value.getNumber()); + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If set, only return changes that match one or more of these types of
+     * actions.
+     * 
+ * + * + * repeated .google.analytics.admin.v1beta.ActionType action = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearAction() { + action_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If set, only return changes that match one or more of these types of
+     * actions.
+     * 
+ * + * + * repeated .google.analytics.admin.v1beta.ActionType action = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the enum numeric values on the wire for action. + */ + public java.util.List getActionValueList() { + return java.util.Collections.unmodifiableList(action_); + } + /** + * + * + *
+     * Optional. If set, only return changes that match one or more of these types of
+     * actions.
+     * 
+ * + * + * repeated .google.analytics.admin.v1beta.ActionType action = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of action at the given index. + */ + public int getActionValue(int index) { + return action_.get(index); + } + /** + * + * + *
+     * Optional. If set, only return changes that match one or more of these types of
+     * actions.
+     * 
+ * + * + * repeated .google.analytics.admin.v1beta.ActionType action = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of action at the given index. + * @return This builder for chaining. + */ + public Builder setActionValue(int index, int value) { + ensureActionIsMutable(); + action_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If set, only return changes that match one or more of these types of
+     * actions.
+     * 
+ * + * + * repeated .google.analytics.admin.v1beta.ActionType action = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for action to add. + * @return This builder for chaining. + */ + public Builder addActionValue(int value) { + ensureActionIsMutable(); + action_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If set, only return changes that match one or more of these types of
+     * actions.
+     * 
+ * + * + * repeated .google.analytics.admin.v1beta.ActionType action = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The enum numeric values on the wire for action to add. + * @return This builder for chaining. + */ + public Builder addAllActionValue(java.lang.Iterable values) { + ensureActionIsMutable(); + for (int value : values) { + action_.add(value); + } + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList actorEmail_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureActorEmailIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + actorEmail_ = new com.google.protobuf.LazyStringArrayList(actorEmail_); + bitField0_ |= 0x00000004; + } + } + /** + * + * + *
+     * Optional. If set, only return changes if they are made by a user in this list.
+     * 
+ * + * repeated string actor_email = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the actorEmail. + */ + public com.google.protobuf.ProtocolStringList getActorEmailList() { + return actorEmail_.getUnmodifiableView(); + } + /** + * + * + *
+     * Optional. If set, only return changes if they are made by a user in this list.
+     * 
+ * + * repeated string actor_email = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of actorEmail. + */ + public int getActorEmailCount() { + return actorEmail_.size(); + } + /** + * + * + *
+     * Optional. If set, only return changes if they are made by a user in this list.
+     * 
+ * + * repeated string actor_email = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The actorEmail at the given index. + */ + public java.lang.String getActorEmail(int index) { + return actorEmail_.get(index); + } + /** + * + * + *
+     * Optional. If set, only return changes if they are made by a user in this list.
+     * 
+ * + * repeated string actor_email = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the actorEmail at the given index. + */ + public com.google.protobuf.ByteString getActorEmailBytes(int index) { + return actorEmail_.getByteString(index); + } + /** + * + * + *
+     * Optional. If set, only return changes if they are made by a user in this list.
+     * 
+ * + * repeated string actor_email = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The actorEmail to set. + * @return This builder for chaining. + */ + public Builder setActorEmail(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureActorEmailIsMutable(); + actorEmail_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If set, only return changes if they are made by a user in this list.
+     * 
+ * + * repeated string actor_email = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The actorEmail to add. + * @return This builder for chaining. + */ + public Builder addActorEmail(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureActorEmailIsMutable(); + actorEmail_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If set, only return changes if they are made by a user in this list.
+     * 
+ * + * repeated string actor_email = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The actorEmail to add. + * @return This builder for chaining. + */ + public Builder addAllActorEmail(java.lang.Iterable values) { + ensureActorEmailIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, actorEmail_); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If set, only return changes if they are made by a user in this list.
+     * 
+ * + * repeated string actor_email = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearActorEmail() { + actorEmail_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If set, only return changes if they are made by a user in this list.
+     * 
+ * + * repeated string actor_email = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the actorEmail to add. + * @return This builder for chaining. + */ + public Builder addActorEmailBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureActorEmailIsMutable(); + actorEmail_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp earliestChangeTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + earliestChangeTimeBuilder_; + /** + * + * + *
+     * Optional. If set, only return changes made after this time (inclusive).
+     * 
+ * + * + * .google.protobuf.Timestamp earliest_change_time = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the earliestChangeTime field is set. + */ + public boolean hasEarliestChangeTime() { + return earliestChangeTimeBuilder_ != null || earliestChangeTime_ != null; + } + /** + * + * + *
+     * Optional. If set, only return changes made after this time (inclusive).
+     * 
+ * + * + * .google.protobuf.Timestamp earliest_change_time = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The earliestChangeTime. + */ + public com.google.protobuf.Timestamp getEarliestChangeTime() { + if (earliestChangeTimeBuilder_ == null) { + return earliestChangeTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : earliestChangeTime_; + } else { + return earliestChangeTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. If set, only return changes made after this time (inclusive).
+     * 
+ * + * + * .google.protobuf.Timestamp earliest_change_time = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setEarliestChangeTime(com.google.protobuf.Timestamp value) { + if (earliestChangeTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + earliestChangeTime_ = value; + onChanged(); + } else { + earliestChangeTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. If set, only return changes made after this time (inclusive).
+     * 
+ * + * + * .google.protobuf.Timestamp earliest_change_time = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setEarliestChangeTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (earliestChangeTimeBuilder_ == null) { + earliestChangeTime_ = builderForValue.build(); + onChanged(); + } else { + earliestChangeTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. If set, only return changes made after this time (inclusive).
+     * 
+ * + * + * .google.protobuf.Timestamp earliest_change_time = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeEarliestChangeTime(com.google.protobuf.Timestamp value) { + if (earliestChangeTimeBuilder_ == null) { + if (earliestChangeTime_ != null) { + earliestChangeTime_ = + com.google.protobuf.Timestamp.newBuilder(earliestChangeTime_) + .mergeFrom(value) + .buildPartial(); + } else { + earliestChangeTime_ = value; + } + onChanged(); + } else { + earliestChangeTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. If set, only return changes made after this time (inclusive).
+     * 
+ * + * + * .google.protobuf.Timestamp earliest_change_time = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearEarliestChangeTime() { + if (earliestChangeTimeBuilder_ == null) { + earliestChangeTime_ = null; + onChanged(); + } else { + earliestChangeTime_ = null; + earliestChangeTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. If set, only return changes made after this time (inclusive).
+     * 
+ * + * + * .google.protobuf.Timestamp earliest_change_time = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Timestamp.Builder getEarliestChangeTimeBuilder() { + + onChanged(); + return getEarliestChangeTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. If set, only return changes made after this time (inclusive).
+     * 
+ * + * + * .google.protobuf.Timestamp earliest_change_time = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.TimestampOrBuilder getEarliestChangeTimeOrBuilder() { + if (earliestChangeTimeBuilder_ != null) { + return earliestChangeTimeBuilder_.getMessageOrBuilder(); + } else { + return earliestChangeTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : earliestChangeTime_; + } + } + /** + * + * + *
+     * Optional. If set, only return changes made after this time (inclusive).
+     * 
+ * + * + * .google.protobuf.Timestamp earliest_change_time = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEarliestChangeTimeFieldBuilder() { + if (earliestChangeTimeBuilder_ == null) { + earliestChangeTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEarliestChangeTime(), getParentForChildren(), isClean()); + earliestChangeTime_ = null; + } + return earliestChangeTimeBuilder_; + } + + private com.google.protobuf.Timestamp latestChangeTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + latestChangeTimeBuilder_; + /** + * + * + *
+     * Optional. If set, only return changes made before this time (inclusive).
+     * 
+ * + * + * .google.protobuf.Timestamp latest_change_time = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the latestChangeTime field is set. + */ + public boolean hasLatestChangeTime() { + return latestChangeTimeBuilder_ != null || latestChangeTime_ != null; + } + /** + * + * + *
+     * Optional. If set, only return changes made before this time (inclusive).
+     * 
+ * + * + * .google.protobuf.Timestamp latest_change_time = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The latestChangeTime. + */ + public com.google.protobuf.Timestamp getLatestChangeTime() { + if (latestChangeTimeBuilder_ == null) { + return latestChangeTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : latestChangeTime_; + } else { + return latestChangeTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. If set, only return changes made before this time (inclusive).
+     * 
+ * + * + * .google.protobuf.Timestamp latest_change_time = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setLatestChangeTime(com.google.protobuf.Timestamp value) { + if (latestChangeTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + latestChangeTime_ = value; + onChanged(); + } else { + latestChangeTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. If set, only return changes made before this time (inclusive).
+     * 
+ * + * + * .google.protobuf.Timestamp latest_change_time = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setLatestChangeTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (latestChangeTimeBuilder_ == null) { + latestChangeTime_ = builderForValue.build(); + onChanged(); + } else { + latestChangeTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. If set, only return changes made before this time (inclusive).
+     * 
+ * + * + * .google.protobuf.Timestamp latest_change_time = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeLatestChangeTime(com.google.protobuf.Timestamp value) { + if (latestChangeTimeBuilder_ == null) { + if (latestChangeTime_ != null) { + latestChangeTime_ = + com.google.protobuf.Timestamp.newBuilder(latestChangeTime_) + .mergeFrom(value) + .buildPartial(); + } else { + latestChangeTime_ = value; + } + onChanged(); + } else { + latestChangeTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. If set, only return changes made before this time (inclusive).
+     * 
+ * + * + * .google.protobuf.Timestamp latest_change_time = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearLatestChangeTime() { + if (latestChangeTimeBuilder_ == null) { + latestChangeTime_ = null; + onChanged(); + } else { + latestChangeTime_ = null; + latestChangeTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. If set, only return changes made before this time (inclusive).
+     * 
+ * + * + * .google.protobuf.Timestamp latest_change_time = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Timestamp.Builder getLatestChangeTimeBuilder() { + + onChanged(); + return getLatestChangeTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. If set, only return changes made before this time (inclusive).
+     * 
+ * + * + * .google.protobuf.Timestamp latest_change_time = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.TimestampOrBuilder getLatestChangeTimeOrBuilder() { + if (latestChangeTimeBuilder_ != null) { + return latestChangeTimeBuilder_.getMessageOrBuilder(); + } else { + return latestChangeTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : latestChangeTime_; + } + } + /** + * + * + *
+     * Optional. If set, only return changes made before this time (inclusive).
+     * 
+ * + * + * .google.protobuf.Timestamp latest_change_time = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getLatestChangeTimeFieldBuilder() { + if (latestChangeTimeBuilder_ == null) { + latestChangeTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getLatestChangeTime(), getParentForChildren(), isClean()); + latestChangeTime_ = null; + } + return latestChangeTimeBuilder_; + } + + private int pageSize_; + /** + * + * + *
+     * Optional. The maximum number of ChangeHistoryEvent items to return.
+     * The service may return fewer than this value, even if there are additional
+     * pages. If unspecified, at most 50 items will be returned.
+     * The maximum value is 200 (higher values will be coerced to the maximum).
+     * 
+ * + * int32 page_size = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Optional. The maximum number of ChangeHistoryEvent items to return.
+     * The service may return fewer than this value, even if there are additional
+     * pages. If unspecified, at most 50 items will be returned.
+     * The maximum value is 200 (higher values will be coerced to the maximum).
+     * 
+ * + * int32 page_size = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The maximum number of ChangeHistoryEvent items to return.
+     * The service may return fewer than this value, even if there are additional
+     * pages. If unspecified, at most 50 items will be returned.
+     * The maximum value is 200 (higher values will be coerced to the maximum).
+     * 
+ * + * int32 page_size = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Optional. A page token, received from a previous `SearchChangeHistoryEvents` call.
+     * Provide this to retrieve the subsequent page. When paginating, all other
+     * parameters provided to `SearchChangeHistoryEvents` must match the call that
+     * provided the page token.
+     * 
+ * + * string page_token = 9 [(.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 `SearchChangeHistoryEvents` call.
+     * Provide this to retrieve the subsequent page. When paginating, all other
+     * parameters provided to `SearchChangeHistoryEvents` must match the call that
+     * provided the page token.
+     * 
+ * + * string page_token = 9 [(.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 `SearchChangeHistoryEvents` call.
+     * Provide this to retrieve the subsequent page. When paginating, all other
+     * parameters provided to `SearchChangeHistoryEvents` must match the call that
+     * provided the page token.
+     * 
+ * + * string page_token = 9 [(.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; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A page token, received from a previous `SearchChangeHistoryEvents` call.
+     * Provide this to retrieve the subsequent page. When paginating, all other
+     * parameters provided to `SearchChangeHistoryEvents` must match the call that
+     * provided the page token.
+     * 
+ * + * string page_token = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A page token, received from a previous `SearchChangeHistoryEvents` call.
+     * Provide this to retrieve the subsequent page. When paginating, all other
+     * parameters provided to `SearchChangeHistoryEvents` must match the call that
+     * provided the page token.
+     * 
+ * + * string page_token = 9 [(.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; + 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.admin.v1beta.SearchChangeHistoryEventsRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest) + private static final com.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest(); + } + + public static com.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchChangeHistoryEventsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SearchChangeHistoryEventsRequest(input, extensionRegistry); + } + }; + + 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.admin.v1beta.SearchChangeHistoryEventsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/SearchChangeHistoryEventsRequestOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/SearchChangeHistoryEventsRequestOrBuilder.java new file mode 100644 index 000000000000..eb347d9ab3ee --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/SearchChangeHistoryEventsRequestOrBuilder.java @@ -0,0 +1,421 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +public interface SearchChangeHistoryEventsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The account resource for which to return change history resources.
+   * 
+ * + * + * string account = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The account. + */ + java.lang.String getAccount(); + /** + * + * + *
+   * Required. The account resource for which to return change history resources.
+   * 
+ * + * + * string account = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for account. + */ + com.google.protobuf.ByteString getAccountBytes(); + + /** + * + * + *
+   * Optional. Resource name for a child property. If set, only return changes
+   * made to this property or its child resources.
+   * 
+ * + * + * string property = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The property. + */ + java.lang.String getProperty(); + /** + * + * + *
+   * Optional. Resource name for a child property. If set, only return changes
+   * made to this property or its child resources.
+   * 
+ * + * + * string property = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for property. + */ + com.google.protobuf.ByteString getPropertyBytes(); + + /** + * + * + *
+   * Optional. If set, only return changes if they are for a resource that matches at
+   * least one of these types.
+   * 
+ * + * + * repeated .google.analytics.admin.v1beta.ChangeHistoryResourceType resource_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the resourceType. + */ + java.util.List getResourceTypeList(); + /** + * + * + *
+   * Optional. If set, only return changes if they are for a resource that matches at
+   * least one of these types.
+   * 
+ * + * + * repeated .google.analytics.admin.v1beta.ChangeHistoryResourceType resource_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of resourceType. + */ + int getResourceTypeCount(); + /** + * + * + *
+   * Optional. If set, only return changes if they are for a resource that matches at
+   * least one of these types.
+   * 
+ * + * + * repeated .google.analytics.admin.v1beta.ChangeHistoryResourceType resource_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The resourceType at the given index. + */ + com.google.analytics.admin.v1beta.ChangeHistoryResourceType getResourceType(int index); + /** + * + * + *
+   * Optional. If set, only return changes if they are for a resource that matches at
+   * least one of these types.
+   * 
+ * + * + * repeated .google.analytics.admin.v1beta.ChangeHistoryResourceType resource_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the enum numeric values on the wire for resourceType. + */ + java.util.List getResourceTypeValueList(); + /** + * + * + *
+   * Optional. If set, only return changes if they are for a resource that matches at
+   * least one of these types.
+   * 
+ * + * + * repeated .google.analytics.admin.v1beta.ChangeHistoryResourceType resource_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of resourceType at the given index. + */ + int getResourceTypeValue(int index); + + /** + * + * + *
+   * Optional. If set, only return changes that match one or more of these types of
+   * actions.
+   * 
+ * + * + * repeated .google.analytics.admin.v1beta.ActionType action = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the action. + */ + java.util.List getActionList(); + /** + * + * + *
+   * Optional. If set, only return changes that match one or more of these types of
+   * actions.
+   * 
+ * + * + * repeated .google.analytics.admin.v1beta.ActionType action = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of action. + */ + int getActionCount(); + /** + * + * + *
+   * Optional. If set, only return changes that match one or more of these types of
+   * actions.
+   * 
+ * + * + * repeated .google.analytics.admin.v1beta.ActionType action = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The action at the given index. + */ + com.google.analytics.admin.v1beta.ActionType getAction(int index); + /** + * + * + *
+   * Optional. If set, only return changes that match one or more of these types of
+   * actions.
+   * 
+ * + * + * repeated .google.analytics.admin.v1beta.ActionType action = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the enum numeric values on the wire for action. + */ + java.util.List getActionValueList(); + /** + * + * + *
+   * Optional. If set, only return changes that match one or more of these types of
+   * actions.
+   * 
+ * + * + * repeated .google.analytics.admin.v1beta.ActionType action = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of action at the given index. + */ + int getActionValue(int index); + + /** + * + * + *
+   * Optional. If set, only return changes if they are made by a user in this list.
+   * 
+ * + * repeated string actor_email = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the actorEmail. + */ + java.util.List getActorEmailList(); + /** + * + * + *
+   * Optional. If set, only return changes if they are made by a user in this list.
+   * 
+ * + * repeated string actor_email = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of actorEmail. + */ + int getActorEmailCount(); + /** + * + * + *
+   * Optional. If set, only return changes if they are made by a user in this list.
+   * 
+ * + * repeated string actor_email = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The actorEmail at the given index. + */ + java.lang.String getActorEmail(int index); + /** + * + * + *
+   * Optional. If set, only return changes if they are made by a user in this list.
+   * 
+ * + * repeated string actor_email = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the actorEmail at the given index. + */ + com.google.protobuf.ByteString getActorEmailBytes(int index); + + /** + * + * + *
+   * Optional. If set, only return changes made after this time (inclusive).
+   * 
+ * + * + * .google.protobuf.Timestamp earliest_change_time = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the earliestChangeTime field is set. + */ + boolean hasEarliestChangeTime(); + /** + * + * + *
+   * Optional. If set, only return changes made after this time (inclusive).
+   * 
+ * + * + * .google.protobuf.Timestamp earliest_change_time = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The earliestChangeTime. + */ + com.google.protobuf.Timestamp getEarliestChangeTime(); + /** + * + * + *
+   * Optional. If set, only return changes made after this time (inclusive).
+   * 
+ * + * + * .google.protobuf.Timestamp earliest_change_time = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.TimestampOrBuilder getEarliestChangeTimeOrBuilder(); + + /** + * + * + *
+   * Optional. If set, only return changes made before this time (inclusive).
+   * 
+ * + * + * .google.protobuf.Timestamp latest_change_time = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the latestChangeTime field is set. + */ + boolean hasLatestChangeTime(); + /** + * + * + *
+   * Optional. If set, only return changes made before this time (inclusive).
+   * 
+ * + * + * .google.protobuf.Timestamp latest_change_time = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The latestChangeTime. + */ + com.google.protobuf.Timestamp getLatestChangeTime(); + /** + * + * + *
+   * Optional. If set, only return changes made before this time (inclusive).
+   * 
+ * + * + * .google.protobuf.Timestamp latest_change_time = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.TimestampOrBuilder getLatestChangeTimeOrBuilder(); + + /** + * + * + *
+   * Optional. The maximum number of ChangeHistoryEvent items to return.
+   * The service may return fewer than this value, even if there are additional
+   * pages. If unspecified, at most 50 items will be returned.
+   * The maximum value is 200 (higher values will be coerced to the maximum).
+   * 
+ * + * int32 page_size = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A page token, received from a previous `SearchChangeHistoryEvents` call.
+   * Provide this to retrieve the subsequent page. When paginating, all other
+   * parameters provided to `SearchChangeHistoryEvents` must match the call that
+   * provided the page token.
+   * 
+ * + * string page_token = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Optional. A page token, received from a previous `SearchChangeHistoryEvents` call.
+   * Provide this to retrieve the subsequent page. When paginating, all other
+   * parameters provided to `SearchChangeHistoryEvents` must match the call that
+   * provided the page token.
+   * 
+ * + * string page_token = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/SearchChangeHistoryEventsResponse.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/SearchChangeHistoryEventsResponse.java new file mode 100644 index 000000000000..c2286cc5b4ba --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/SearchChangeHistoryEventsResponse.java @@ -0,0 +1,1193 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * Response message for SearchAccounts RPC.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse} + */ +public final class SearchChangeHistoryEventsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse) + SearchChangeHistoryEventsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use SearchChangeHistoryEventsResponse.newBuilder() to construct. + private SearchChangeHistoryEventsResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SearchChangeHistoryEventsResponse() { + changeHistoryEvents_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SearchChangeHistoryEventsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SearchChangeHistoryEventsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + changeHistoryEvents_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + changeHistoryEvents_.add( + input.readMessage( + com.google.analytics.admin.v1beta.ChangeHistoryEvent.parser(), + extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + changeHistoryEvents_ = java.util.Collections.unmodifiableList(changeHistoryEvents_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_SearchChangeHistoryEventsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_SearchChangeHistoryEventsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse.class, + com.google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse.Builder.class); + } + + public static final int CHANGE_HISTORY_EVENTS_FIELD_NUMBER = 1; + private java.util.List changeHistoryEvents_; + /** + * + * + *
+   * Results that were accessible to the caller.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.ChangeHistoryEvent change_history_events = 1; + * + */ + @java.lang.Override + public java.util.List + getChangeHistoryEventsList() { + return changeHistoryEvents_; + } + /** + * + * + *
+   * Results that were accessible to the caller.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.ChangeHistoryEvent change_history_events = 1; + * + */ + @java.lang.Override + public java.util.List + getChangeHistoryEventsOrBuilderList() { + return changeHistoryEvents_; + } + /** + * + * + *
+   * Results that were accessible to the caller.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.ChangeHistoryEvent change_history_events = 1; + * + */ + @java.lang.Override + public int getChangeHistoryEventsCount() { + return changeHistoryEvents_.size(); + } + /** + * + * + *
+   * Results that were accessible to the caller.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.ChangeHistoryEvent change_history_events = 1; + * + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.ChangeHistoryEvent getChangeHistoryEvents(int index) { + return changeHistoryEvents_.get(index); + } + /** + * + * + *
+   * Results that were accessible to the caller.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.ChangeHistoryEvent change_history_events = 1; + * + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.ChangeHistoryEventOrBuilder + getChangeHistoryEventsOrBuilder(int index) { + return changeHistoryEvents_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < changeHistoryEvents_.size(); i++) { + output.writeMessage(1, changeHistoryEvents_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < changeHistoryEvents_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, changeHistoryEvents_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.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.admin.v1beta.SearchChangeHistoryEventsResponse)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse other = + (com.google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse) obj; + + if (!getChangeHistoryEventsList().equals(other.getChangeHistoryEventsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getChangeHistoryEventsCount() > 0) { + hash = (37 * hash) + CHANGE_HISTORY_EVENTS_FIELD_NUMBER; + hash = (53 * hash) + getChangeHistoryEventsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse 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.admin.v1beta.SearchChangeHistoryEventsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse 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.admin.v1beta.SearchChangeHistoryEventsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse 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.admin.v1beta.SearchChangeHistoryEventsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse + 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.admin.v1beta.SearchChangeHistoryEventsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse 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.admin.v1beta.SearchChangeHistoryEventsResponse 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; + } + /** + * + * + *
+   * Response message for SearchAccounts RPC.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse) + com.google.analytics.admin.v1beta.SearchChangeHistoryEventsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_SearchChangeHistoryEventsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_SearchChangeHistoryEventsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse.class, + com.google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse.Builder.class); + } + + // Construct using + // com.google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getChangeHistoryEventsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (changeHistoryEventsBuilder_ == null) { + changeHistoryEvents_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + changeHistoryEventsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_SearchChangeHistoryEventsResponse_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse + getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse build() { + com.google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse buildPartial() { + com.google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse result = + new com.google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse(this); + int from_bitField0_ = bitField0_; + if (changeHistoryEventsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + changeHistoryEvents_ = java.util.Collections.unmodifiableList(changeHistoryEvents_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.changeHistoryEvents_ = changeHistoryEvents_; + } else { + result.changeHistoryEvents_ = changeHistoryEventsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @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.admin.v1beta.SearchChangeHistoryEventsResponse) { + return mergeFrom( + (com.google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse other) { + if (other + == com.google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse + .getDefaultInstance()) return this; + if (changeHistoryEventsBuilder_ == null) { + if (!other.changeHistoryEvents_.isEmpty()) { + if (changeHistoryEvents_.isEmpty()) { + changeHistoryEvents_ = other.changeHistoryEvents_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureChangeHistoryEventsIsMutable(); + changeHistoryEvents_.addAll(other.changeHistoryEvents_); + } + onChanged(); + } + } else { + if (!other.changeHistoryEvents_.isEmpty()) { + if (changeHistoryEventsBuilder_.isEmpty()) { + changeHistoryEventsBuilder_.dispose(); + changeHistoryEventsBuilder_ = null; + changeHistoryEvents_ = other.changeHistoryEvents_; + bitField0_ = (bitField0_ & ~0x00000001); + changeHistoryEventsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getChangeHistoryEventsFieldBuilder() + : null; + } else { + changeHistoryEventsBuilder_.addAllMessages(other.changeHistoryEvents_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List + changeHistoryEvents_ = java.util.Collections.emptyList(); + + private void ensureChangeHistoryEventsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + changeHistoryEvents_ = + new java.util.ArrayList( + changeHistoryEvents_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.admin.v1beta.ChangeHistoryEvent, + com.google.analytics.admin.v1beta.ChangeHistoryEvent.Builder, + com.google.analytics.admin.v1beta.ChangeHistoryEventOrBuilder> + changeHistoryEventsBuilder_; + + /** + * + * + *
+     * Results that were accessible to the caller.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.ChangeHistoryEvent change_history_events = 1; + * + */ + public java.util.List + getChangeHistoryEventsList() { + if (changeHistoryEventsBuilder_ == null) { + return java.util.Collections.unmodifiableList(changeHistoryEvents_); + } else { + return changeHistoryEventsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Results that were accessible to the caller.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.ChangeHistoryEvent change_history_events = 1; + * + */ + public int getChangeHistoryEventsCount() { + if (changeHistoryEventsBuilder_ == null) { + return changeHistoryEvents_.size(); + } else { + return changeHistoryEventsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Results that were accessible to the caller.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.ChangeHistoryEvent change_history_events = 1; + * + */ + public com.google.analytics.admin.v1beta.ChangeHistoryEvent getChangeHistoryEvents(int index) { + if (changeHistoryEventsBuilder_ == null) { + return changeHistoryEvents_.get(index); + } else { + return changeHistoryEventsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Results that were accessible to the caller.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.ChangeHistoryEvent change_history_events = 1; + * + */ + public Builder setChangeHistoryEvents( + int index, com.google.analytics.admin.v1beta.ChangeHistoryEvent value) { + if (changeHistoryEventsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureChangeHistoryEventsIsMutable(); + changeHistoryEvents_.set(index, value); + onChanged(); + } else { + changeHistoryEventsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Results that were accessible to the caller.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.ChangeHistoryEvent change_history_events = 1; + * + */ + public Builder setChangeHistoryEvents( + int index, com.google.analytics.admin.v1beta.ChangeHistoryEvent.Builder builderForValue) { + if (changeHistoryEventsBuilder_ == null) { + ensureChangeHistoryEventsIsMutable(); + changeHistoryEvents_.set(index, builderForValue.build()); + onChanged(); + } else { + changeHistoryEventsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Results that were accessible to the caller.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.ChangeHistoryEvent change_history_events = 1; + * + */ + public Builder addChangeHistoryEvents( + com.google.analytics.admin.v1beta.ChangeHistoryEvent value) { + if (changeHistoryEventsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureChangeHistoryEventsIsMutable(); + changeHistoryEvents_.add(value); + onChanged(); + } else { + changeHistoryEventsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Results that were accessible to the caller.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.ChangeHistoryEvent change_history_events = 1; + * + */ + public Builder addChangeHistoryEvents( + int index, com.google.analytics.admin.v1beta.ChangeHistoryEvent value) { + if (changeHistoryEventsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureChangeHistoryEventsIsMutable(); + changeHistoryEvents_.add(index, value); + onChanged(); + } else { + changeHistoryEventsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Results that were accessible to the caller.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.ChangeHistoryEvent change_history_events = 1; + * + */ + public Builder addChangeHistoryEvents( + com.google.analytics.admin.v1beta.ChangeHistoryEvent.Builder builderForValue) { + if (changeHistoryEventsBuilder_ == null) { + ensureChangeHistoryEventsIsMutable(); + changeHistoryEvents_.add(builderForValue.build()); + onChanged(); + } else { + changeHistoryEventsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Results that were accessible to the caller.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.ChangeHistoryEvent change_history_events = 1; + * + */ + public Builder addChangeHistoryEvents( + int index, com.google.analytics.admin.v1beta.ChangeHistoryEvent.Builder builderForValue) { + if (changeHistoryEventsBuilder_ == null) { + ensureChangeHistoryEventsIsMutable(); + changeHistoryEvents_.add(index, builderForValue.build()); + onChanged(); + } else { + changeHistoryEventsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Results that were accessible to the caller.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.ChangeHistoryEvent change_history_events = 1; + * + */ + public Builder addAllChangeHistoryEvents( + java.lang.Iterable values) { + if (changeHistoryEventsBuilder_ == null) { + ensureChangeHistoryEventsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, changeHistoryEvents_); + onChanged(); + } else { + changeHistoryEventsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Results that were accessible to the caller.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.ChangeHistoryEvent change_history_events = 1; + * + */ + public Builder clearChangeHistoryEvents() { + if (changeHistoryEventsBuilder_ == null) { + changeHistoryEvents_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + changeHistoryEventsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Results that were accessible to the caller.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.ChangeHistoryEvent change_history_events = 1; + * + */ + public Builder removeChangeHistoryEvents(int index) { + if (changeHistoryEventsBuilder_ == null) { + ensureChangeHistoryEventsIsMutable(); + changeHistoryEvents_.remove(index); + onChanged(); + } else { + changeHistoryEventsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Results that were accessible to the caller.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.ChangeHistoryEvent change_history_events = 1; + * + */ + public com.google.analytics.admin.v1beta.ChangeHistoryEvent.Builder + getChangeHistoryEventsBuilder(int index) { + return getChangeHistoryEventsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Results that were accessible to the caller.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.ChangeHistoryEvent change_history_events = 1; + * + */ + public com.google.analytics.admin.v1beta.ChangeHistoryEventOrBuilder + getChangeHistoryEventsOrBuilder(int index) { + if (changeHistoryEventsBuilder_ == null) { + return changeHistoryEvents_.get(index); + } else { + return changeHistoryEventsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Results that were accessible to the caller.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.ChangeHistoryEvent change_history_events = 1; + * + */ + public java.util.List + getChangeHistoryEventsOrBuilderList() { + if (changeHistoryEventsBuilder_ != null) { + return changeHistoryEventsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(changeHistoryEvents_); + } + } + /** + * + * + *
+     * Results that were accessible to the caller.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.ChangeHistoryEvent change_history_events = 1; + * + */ + public com.google.analytics.admin.v1beta.ChangeHistoryEvent.Builder + addChangeHistoryEventsBuilder() { + return getChangeHistoryEventsFieldBuilder() + .addBuilder(com.google.analytics.admin.v1beta.ChangeHistoryEvent.getDefaultInstance()); + } + /** + * + * + *
+     * Results that were accessible to the caller.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.ChangeHistoryEvent change_history_events = 1; + * + */ + public com.google.analytics.admin.v1beta.ChangeHistoryEvent.Builder + addChangeHistoryEventsBuilder(int index) { + return getChangeHistoryEventsFieldBuilder() + .addBuilder( + index, com.google.analytics.admin.v1beta.ChangeHistoryEvent.getDefaultInstance()); + } + /** + * + * + *
+     * Results that were accessible to the caller.
+     * 
+ * + * repeated .google.analytics.admin.v1beta.ChangeHistoryEvent change_history_events = 1; + * + */ + public java.util.List + getChangeHistoryEventsBuilderList() { + return getChangeHistoryEventsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.admin.v1beta.ChangeHistoryEvent, + com.google.analytics.admin.v1beta.ChangeHistoryEvent.Builder, + com.google.analytics.admin.v1beta.ChangeHistoryEventOrBuilder> + getChangeHistoryEventsFieldBuilder() { + if (changeHistoryEventsBuilder_ == null) { + changeHistoryEventsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.admin.v1beta.ChangeHistoryEvent, + com.google.analytics.admin.v1beta.ChangeHistoryEvent.Builder, + com.google.analytics.admin.v1beta.ChangeHistoryEventOrBuilder>( + changeHistoryEvents_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + changeHistoryEvents_ = null; + } + return changeHistoryEventsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + 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.admin.v1beta.SearchChangeHistoryEventsResponse) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse) + private static final com.google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse(); + } + + public static com.google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchChangeHistoryEventsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SearchChangeHistoryEventsResponse(input, extensionRegistry); + } + }; + + 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.admin.v1beta.SearchChangeHistoryEventsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/SearchChangeHistoryEventsResponseOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/SearchChangeHistoryEventsResponseOrBuilder.java new file mode 100644 index 000000000000..8686a73dfe20 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/SearchChangeHistoryEventsResponseOrBuilder.java @@ -0,0 +1,110 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +public interface SearchChangeHistoryEventsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Results that were accessible to the caller.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.ChangeHistoryEvent change_history_events = 1; + * + */ + java.util.List getChangeHistoryEventsList(); + /** + * + * + *
+   * Results that were accessible to the caller.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.ChangeHistoryEvent change_history_events = 1; + * + */ + com.google.analytics.admin.v1beta.ChangeHistoryEvent getChangeHistoryEvents(int index); + /** + * + * + *
+   * Results that were accessible to the caller.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.ChangeHistoryEvent change_history_events = 1; + * + */ + int getChangeHistoryEventsCount(); + /** + * + * + *
+   * Results that were accessible to the caller.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.ChangeHistoryEvent change_history_events = 1; + * + */ + java.util.List + getChangeHistoryEventsOrBuilderList(); + /** + * + * + *
+   * Results that were accessible to the caller.
+   * 
+ * + * repeated .google.analytics.admin.v1beta.ChangeHistoryEvent change_history_events = 1; + * + */ + com.google.analytics.admin.v1beta.ChangeHistoryEventOrBuilder getChangeHistoryEventsOrBuilder( + int index); + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ServiceLevel.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ServiceLevel.java new file mode 100644 index 000000000000..72dd45b9ee62 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/ServiceLevel.java @@ -0,0 +1,176 @@ +/* + * Copyright 2020 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/admin/v1beta/resources.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * Various levels of service for Google Analytics.
+ * 
+ * + * Protobuf enum {@code google.analytics.admin.v1beta.ServiceLevel} + */ +public enum ServiceLevel implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Service level not specified or invalid.
+   * 
+ * + * SERVICE_LEVEL_UNSPECIFIED = 0; + */ + SERVICE_LEVEL_UNSPECIFIED(0), + /** + * + * + *
+   * The standard version of Google Analytics.
+   * 
+ * + * GOOGLE_ANALYTICS_STANDARD = 1; + */ + GOOGLE_ANALYTICS_STANDARD(1), + /** + * + * + *
+   * The paid, premium version of Google Analytics.
+   * 
+ * + * GOOGLE_ANALYTICS_360 = 2; + */ + GOOGLE_ANALYTICS_360(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Service level not specified or invalid.
+   * 
+ * + * SERVICE_LEVEL_UNSPECIFIED = 0; + */ + public static final int SERVICE_LEVEL_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * The standard version of Google Analytics.
+   * 
+ * + * GOOGLE_ANALYTICS_STANDARD = 1; + */ + public static final int GOOGLE_ANALYTICS_STANDARD_VALUE = 1; + /** + * + * + *
+   * The paid, premium version of Google Analytics.
+   * 
+ * + * GOOGLE_ANALYTICS_360 = 2; + */ + public static final int GOOGLE_ANALYTICS_360_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ServiceLevel valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ServiceLevel forNumber(int value) { + switch (value) { + case 0: + return SERVICE_LEVEL_UNSPECIFIED; + case 1: + return GOOGLE_ANALYTICS_STANDARD; + case 2: + return GOOGLE_ANALYTICS_360; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ServiceLevel findValueByNumber(int number) { + return ServiceLevel.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.analytics.admin.v1beta.ResourcesProto.getDescriptor().getEnumTypes().get(1); + } + + private static final ServiceLevel[] VALUES = values(); + + public static ServiceLevel valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ServiceLevel(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.analytics.admin.v1beta.ServiceLevel) +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/UpdateAccountRequest.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/UpdateAccountRequest.java new file mode 100644 index 000000000000..f11622ed620e --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/UpdateAccountRequest.java @@ -0,0 +1,1080 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * Request message for UpdateAccount RPC.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.UpdateAccountRequest} + */ +public final class UpdateAccountRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.UpdateAccountRequest) + UpdateAccountRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateAccountRequest.newBuilder() to construct. + private UpdateAccountRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateAccountRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateAccountRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateAccountRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.analytics.admin.v1beta.Account.Builder subBuilder = null; + if (account_ != null) { + subBuilder = account_.toBuilder(); + } + account_ = + input.readMessage( + com.google.analytics.admin.v1beta.Account.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(account_); + account_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_UpdateAccountRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_UpdateAccountRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.UpdateAccountRequest.class, + com.google.analytics.admin.v1beta.UpdateAccountRequest.Builder.class); + } + + public static final int ACCOUNT_FIELD_NUMBER = 1; + private com.google.analytics.admin.v1beta.Account account_; + /** + * + * + *
+   * Required. The account to update.
+   * The account's `name` field is used to identify the account.
+   * 
+ * + * + * .google.analytics.admin.v1beta.Account account = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the account field is set. + */ + @java.lang.Override + public boolean hasAccount() { + return account_ != null; + } + /** + * + * + *
+   * Required. The account to update.
+   * The account's `name` field is used to identify the account.
+   * 
+ * + * + * .google.analytics.admin.v1beta.Account account = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The account. + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.Account getAccount() { + return account_ == null + ? com.google.analytics.admin.v1beta.Account.getDefaultInstance() + : account_; + } + /** + * + * + *
+   * Required. The account to update.
+   * The account's `name` field is used to identify the account.
+   * 
+ * + * + * .google.analytics.admin.v1beta.Account account = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.AccountOrBuilder getAccountOrBuilder() { + return getAccount(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. The list of fields to be updated. Field names must be in snake case
+   * (e.g., "field_to_update"). Omitted fields will not be updated. To replace
+   * the entire entity, use one path with the string "*" to match all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Required. The list of fields to be updated. Field names must be in snake case
+   * (e.g., "field_to_update"). Omitted fields will not be updated. To replace
+   * the entire entity, use one path with the string "*" to match all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Required. The list of fields to be updated. Field names must be in snake case
+   * (e.g., "field_to_update"). Omitted fields will not be updated. To replace
+   * the entire entity, use one path with the string "*" to match all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + 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 (account_ != null) { + output.writeMessage(1, getAccount()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (account_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getAccount()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + size += unknownFields.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.admin.v1beta.UpdateAccountRequest)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.UpdateAccountRequest other = + (com.google.analytics.admin.v1beta.UpdateAccountRequest) obj; + + if (hasAccount() != other.hasAccount()) return false; + if (hasAccount()) { + if (!getAccount().equals(other.getAccount())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAccount()) { + hash = (37 * hash) + ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getAccount().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.UpdateAccountRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.UpdateAccountRequest 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.admin.v1beta.UpdateAccountRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.UpdateAccountRequest 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.admin.v1beta.UpdateAccountRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.UpdateAccountRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.UpdateAccountRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.UpdateAccountRequest 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.admin.v1beta.UpdateAccountRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.UpdateAccountRequest 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.admin.v1beta.UpdateAccountRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.UpdateAccountRequest 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.admin.v1beta.UpdateAccountRequest 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; + } + /** + * + * + *
+   * Request message for UpdateAccount RPC.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.UpdateAccountRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.UpdateAccountRequest) + com.google.analytics.admin.v1beta.UpdateAccountRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_UpdateAccountRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_UpdateAccountRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.UpdateAccountRequest.class, + com.google.analytics.admin.v1beta.UpdateAccountRequest.Builder.class); + } + + // Construct using com.google.analytics.admin.v1beta.UpdateAccountRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (accountBuilder_ == null) { + account_ = null; + } else { + account_ = null; + accountBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_UpdateAccountRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.UpdateAccountRequest getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.UpdateAccountRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.UpdateAccountRequest build() { + com.google.analytics.admin.v1beta.UpdateAccountRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.UpdateAccountRequest buildPartial() { + com.google.analytics.admin.v1beta.UpdateAccountRequest result = + new com.google.analytics.admin.v1beta.UpdateAccountRequest(this); + if (accountBuilder_ == null) { + result.account_ = account_; + } else { + result.account_ = accountBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + onBuilt(); + return result; + } + + @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.admin.v1beta.UpdateAccountRequest) { + return mergeFrom((com.google.analytics.admin.v1beta.UpdateAccountRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1beta.UpdateAccountRequest other) { + if (other == com.google.analytics.admin.v1beta.UpdateAccountRequest.getDefaultInstance()) + return this; + if (other.hasAccount()) { + mergeAccount(other.getAccount()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.UpdateAccountRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.UpdateAccountRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.analytics.admin.v1beta.Account account_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.Account, + com.google.analytics.admin.v1beta.Account.Builder, + com.google.analytics.admin.v1beta.AccountOrBuilder> + accountBuilder_; + /** + * + * + *
+     * Required. The account to update.
+     * The account's `name` field is used to identify the account.
+     * 
+ * + * + * .google.analytics.admin.v1beta.Account account = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the account field is set. + */ + public boolean hasAccount() { + return accountBuilder_ != null || account_ != null; + } + /** + * + * + *
+     * Required. The account to update.
+     * The account's `name` field is used to identify the account.
+     * 
+ * + * + * .google.analytics.admin.v1beta.Account account = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The account. + */ + public com.google.analytics.admin.v1beta.Account getAccount() { + if (accountBuilder_ == null) { + return account_ == null + ? com.google.analytics.admin.v1beta.Account.getDefaultInstance() + : account_; + } else { + return accountBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The account to update.
+     * The account's `name` field is used to identify the account.
+     * 
+ * + * + * .google.analytics.admin.v1beta.Account account = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAccount(com.google.analytics.admin.v1beta.Account value) { + if (accountBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + account_ = value; + onChanged(); + } else { + accountBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The account to update.
+     * The account's `name` field is used to identify the account.
+     * 
+ * + * + * .google.analytics.admin.v1beta.Account account = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAccount(com.google.analytics.admin.v1beta.Account.Builder builderForValue) { + if (accountBuilder_ == null) { + account_ = builderForValue.build(); + onChanged(); + } else { + accountBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The account to update.
+     * The account's `name` field is used to identify the account.
+     * 
+ * + * + * .google.analytics.admin.v1beta.Account account = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeAccount(com.google.analytics.admin.v1beta.Account value) { + if (accountBuilder_ == null) { + if (account_ != null) { + account_ = + com.google.analytics.admin.v1beta.Account.newBuilder(account_) + .mergeFrom(value) + .buildPartial(); + } else { + account_ = value; + } + onChanged(); + } else { + accountBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The account to update.
+     * The account's `name` field is used to identify the account.
+     * 
+ * + * + * .google.analytics.admin.v1beta.Account account = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearAccount() { + if (accountBuilder_ == null) { + account_ = null; + onChanged(); + } else { + account_ = null; + accountBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The account to update.
+     * The account's `name` field is used to identify the account.
+     * 
+ * + * + * .google.analytics.admin.v1beta.Account account = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.analytics.admin.v1beta.Account.Builder getAccountBuilder() { + + onChanged(); + return getAccountFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The account to update.
+     * The account's `name` field is used to identify the account.
+     * 
+ * + * + * .google.analytics.admin.v1beta.Account account = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.analytics.admin.v1beta.AccountOrBuilder getAccountOrBuilder() { + if (accountBuilder_ != null) { + return accountBuilder_.getMessageOrBuilder(); + } else { + return account_ == null + ? com.google.analytics.admin.v1beta.Account.getDefaultInstance() + : account_; + } + } + /** + * + * + *
+     * Required. The account to update.
+     * The account's `name` field is used to identify the account.
+     * 
+ * + * + * .google.analytics.admin.v1beta.Account account = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.Account, + com.google.analytics.admin.v1beta.Account.Builder, + com.google.analytics.admin.v1beta.AccountOrBuilder> + getAccountFieldBuilder() { + if (accountBuilder_ == null) { + accountBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.Account, + com.google.analytics.admin.v1beta.Account.Builder, + com.google.analytics.admin.v1beta.AccountOrBuilder>( + getAccount(), getParentForChildren(), isClean()); + account_ = null; + } + return accountBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Required. The list of fields to be updated. Field names must be in snake case
+     * (e.g., "field_to_update"). Omitted fields will not be updated. To replace
+     * the entire entity, use one path with the string "*" to match all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * Required. The list of fields to be updated. Field names must be in snake case
+     * (e.g., "field_to_update"). Omitted fields will not be updated. To replace
+     * the entire entity, use one path with the string "*" to match all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The list of fields to be updated. Field names must be in snake case
+     * (e.g., "field_to_update"). Omitted fields will not be updated. To replace
+     * the entire entity, use one path with the string "*" to match all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The list of fields to be updated. Field names must be in snake case
+     * (e.g., "field_to_update"). Omitted fields will not be updated. To replace
+     * the entire entity, use one path with the string "*" to match all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The list of fields to be updated. Field names must be in snake case
+     * (e.g., "field_to_update"). Omitted fields will not be updated. To replace
+     * the entire entity, use one path with the string "*" to match all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The list of fields to be updated. Field names must be in snake case
+     * (e.g., "field_to_update"). Omitted fields will not be updated. To replace
+     * the entire entity, use one path with the string "*" to match all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The list of fields to be updated. Field names must be in snake case
+     * (e.g., "field_to_update"). Omitted fields will not be updated. To replace
+     * the entire entity, use one path with the string "*" to match all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The list of fields to be updated. Field names must be in snake case
+     * (e.g., "field_to_update"). Omitted fields will not be updated. To replace
+     * the entire entity, use one path with the string "*" to match all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Required. The list of fields to be updated. Field names must be in snake case
+     * (e.g., "field_to_update"). Omitted fields will not be updated. To replace
+     * the entire entity, use one path with the string "*" to match all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @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.admin.v1beta.UpdateAccountRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.UpdateAccountRequest) + private static final com.google.analytics.admin.v1beta.UpdateAccountRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.UpdateAccountRequest(); + } + + public static com.google.analytics.admin.v1beta.UpdateAccountRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateAccountRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateAccountRequest(input, extensionRegistry); + } + }; + + 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.admin.v1beta.UpdateAccountRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/UpdateAccountRequestOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/UpdateAccountRequestOrBuilder.java new file mode 100644 index 000000000000..0fba6bf22d7b --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/UpdateAccountRequestOrBuilder.java @@ -0,0 +1,113 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +public interface UpdateAccountRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.UpdateAccountRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The account to update.
+   * The account's `name` field is used to identify the account.
+   * 
+ * + * + * .google.analytics.admin.v1beta.Account account = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the account field is set. + */ + boolean hasAccount(); + /** + * + * + *
+   * Required. The account to update.
+   * The account's `name` field is used to identify the account.
+   * 
+ * + * + * .google.analytics.admin.v1beta.Account account = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The account. + */ + com.google.analytics.admin.v1beta.Account getAccount(); + /** + * + * + *
+   * Required. The account to update.
+   * The account's `name` field is used to identify the account.
+   * 
+ * + * + * .google.analytics.admin.v1beta.Account account = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.analytics.admin.v1beta.AccountOrBuilder getAccountOrBuilder(); + + /** + * + * + *
+   * Required. The list of fields to be updated. Field names must be in snake case
+   * (e.g., "field_to_update"). Omitted fields will not be updated. To replace
+   * the entire entity, use one path with the string "*" to match all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. The list of fields to be updated. Field names must be in snake case
+   * (e.g., "field_to_update"). Omitted fields will not be updated. To replace
+   * the entire entity, use one path with the string "*" to match all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. The list of fields to be updated. Field names must be in snake case
+   * (e.g., "field_to_update"). Omitted fields will not be updated. To replace
+   * the entire entity, use one path with the string "*" to match all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/UpdateCustomDimensionRequest.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/UpdateCustomDimensionRequest.java new file mode 100644 index 000000000000..62ada63fa8ae --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/UpdateCustomDimensionRequest.java @@ -0,0 +1,1053 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * Request message for UpdateCustomDimension RPC.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.UpdateCustomDimensionRequest} + */ +public final class UpdateCustomDimensionRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.UpdateCustomDimensionRequest) + UpdateCustomDimensionRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateCustomDimensionRequest.newBuilder() to construct. + private UpdateCustomDimensionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateCustomDimensionRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateCustomDimensionRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateCustomDimensionRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.analytics.admin.v1beta.CustomDimension.Builder subBuilder = null; + if (customDimension_ != null) { + subBuilder = customDimension_.toBuilder(); + } + customDimension_ = + input.readMessage( + com.google.analytics.admin.v1beta.CustomDimension.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(customDimension_); + customDimension_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_UpdateCustomDimensionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_UpdateCustomDimensionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.UpdateCustomDimensionRequest.class, + com.google.analytics.admin.v1beta.UpdateCustomDimensionRequest.Builder.class); + } + + public static final int CUSTOM_DIMENSION_FIELD_NUMBER = 1; + private com.google.analytics.admin.v1beta.CustomDimension customDimension_; + /** + * + * + *
+   * The CustomDimension to update
+   * 
+ * + * .google.analytics.admin.v1beta.CustomDimension custom_dimension = 1; + * + * @return Whether the customDimension field is set. + */ + @java.lang.Override + public boolean hasCustomDimension() { + return customDimension_ != null; + } + /** + * + * + *
+   * The CustomDimension to update
+   * 
+ * + * .google.analytics.admin.v1beta.CustomDimension custom_dimension = 1; + * + * @return The customDimension. + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.CustomDimension getCustomDimension() { + return customDimension_ == null + ? com.google.analytics.admin.v1beta.CustomDimension.getDefaultInstance() + : customDimension_; + } + /** + * + * + *
+   * The CustomDimension to update
+   * 
+ * + * .google.analytics.admin.v1beta.CustomDimension custom_dimension = 1; + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.CustomDimensionOrBuilder getCustomDimensionOrBuilder() { + return getCustomDimension(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. The list of fields to be updated. Omitted fields will not be updated.
+   * To replace the entire entity, use one path with the string "*" to match
+   * all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Required. The list of fields to be updated. Omitted fields will not be updated.
+   * To replace the entire entity, use one path with the string "*" to match
+   * all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Required. The list of fields to be updated. Omitted fields will not be updated.
+   * To replace the entire entity, use one path with the string "*" to match
+   * all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + 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 (customDimension_ != null) { + output.writeMessage(1, getCustomDimension()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (customDimension_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCustomDimension()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + size += unknownFields.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.admin.v1beta.UpdateCustomDimensionRequest)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.UpdateCustomDimensionRequest other = + (com.google.analytics.admin.v1beta.UpdateCustomDimensionRequest) obj; + + if (hasCustomDimension() != other.hasCustomDimension()) return false; + if (hasCustomDimension()) { + if (!getCustomDimension().equals(other.getCustomDimension())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCustomDimension()) { + hash = (37 * hash) + CUSTOM_DIMENSION_FIELD_NUMBER; + hash = (53 * hash) + getCustomDimension().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.UpdateCustomDimensionRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.UpdateCustomDimensionRequest 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.admin.v1beta.UpdateCustomDimensionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.UpdateCustomDimensionRequest 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.admin.v1beta.UpdateCustomDimensionRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.UpdateCustomDimensionRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.UpdateCustomDimensionRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.UpdateCustomDimensionRequest 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.admin.v1beta.UpdateCustomDimensionRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.UpdateCustomDimensionRequest 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.admin.v1beta.UpdateCustomDimensionRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.UpdateCustomDimensionRequest 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.admin.v1beta.UpdateCustomDimensionRequest 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; + } + /** + * + * + *
+   * Request message for UpdateCustomDimension RPC.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.UpdateCustomDimensionRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.UpdateCustomDimensionRequest) + com.google.analytics.admin.v1beta.UpdateCustomDimensionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_UpdateCustomDimensionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_UpdateCustomDimensionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.UpdateCustomDimensionRequest.class, + com.google.analytics.admin.v1beta.UpdateCustomDimensionRequest.Builder.class); + } + + // Construct using com.google.analytics.admin.v1beta.UpdateCustomDimensionRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (customDimensionBuilder_ == null) { + customDimension_ = null; + } else { + customDimension_ = null; + customDimensionBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_UpdateCustomDimensionRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.UpdateCustomDimensionRequest + getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.UpdateCustomDimensionRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.UpdateCustomDimensionRequest build() { + com.google.analytics.admin.v1beta.UpdateCustomDimensionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.UpdateCustomDimensionRequest buildPartial() { + com.google.analytics.admin.v1beta.UpdateCustomDimensionRequest result = + new com.google.analytics.admin.v1beta.UpdateCustomDimensionRequest(this); + if (customDimensionBuilder_ == null) { + result.customDimension_ = customDimension_; + } else { + result.customDimension_ = customDimensionBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + onBuilt(); + return result; + } + + @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.admin.v1beta.UpdateCustomDimensionRequest) { + return mergeFrom((com.google.analytics.admin.v1beta.UpdateCustomDimensionRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1beta.UpdateCustomDimensionRequest other) { + if (other + == com.google.analytics.admin.v1beta.UpdateCustomDimensionRequest.getDefaultInstance()) + return this; + if (other.hasCustomDimension()) { + mergeCustomDimension(other.getCustomDimension()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.UpdateCustomDimensionRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.UpdateCustomDimensionRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.analytics.admin.v1beta.CustomDimension customDimension_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.CustomDimension, + com.google.analytics.admin.v1beta.CustomDimension.Builder, + com.google.analytics.admin.v1beta.CustomDimensionOrBuilder> + customDimensionBuilder_; + /** + * + * + *
+     * The CustomDimension to update
+     * 
+ * + * .google.analytics.admin.v1beta.CustomDimension custom_dimension = 1; + * + * @return Whether the customDimension field is set. + */ + public boolean hasCustomDimension() { + return customDimensionBuilder_ != null || customDimension_ != null; + } + /** + * + * + *
+     * The CustomDimension to update
+     * 
+ * + * .google.analytics.admin.v1beta.CustomDimension custom_dimension = 1; + * + * @return The customDimension. + */ + public com.google.analytics.admin.v1beta.CustomDimension getCustomDimension() { + if (customDimensionBuilder_ == null) { + return customDimension_ == null + ? com.google.analytics.admin.v1beta.CustomDimension.getDefaultInstance() + : customDimension_; + } else { + return customDimensionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The CustomDimension to update
+     * 
+ * + * .google.analytics.admin.v1beta.CustomDimension custom_dimension = 1; + */ + public Builder setCustomDimension(com.google.analytics.admin.v1beta.CustomDimension value) { + if (customDimensionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + customDimension_ = value; + onChanged(); + } else { + customDimensionBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The CustomDimension to update
+     * 
+ * + * .google.analytics.admin.v1beta.CustomDimension custom_dimension = 1; + */ + public Builder setCustomDimension( + com.google.analytics.admin.v1beta.CustomDimension.Builder builderForValue) { + if (customDimensionBuilder_ == null) { + customDimension_ = builderForValue.build(); + onChanged(); + } else { + customDimensionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The CustomDimension to update
+     * 
+ * + * .google.analytics.admin.v1beta.CustomDimension custom_dimension = 1; + */ + public Builder mergeCustomDimension(com.google.analytics.admin.v1beta.CustomDimension value) { + if (customDimensionBuilder_ == null) { + if (customDimension_ != null) { + customDimension_ = + com.google.analytics.admin.v1beta.CustomDimension.newBuilder(customDimension_) + .mergeFrom(value) + .buildPartial(); + } else { + customDimension_ = value; + } + onChanged(); + } else { + customDimensionBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The CustomDimension to update
+     * 
+ * + * .google.analytics.admin.v1beta.CustomDimension custom_dimension = 1; + */ + public Builder clearCustomDimension() { + if (customDimensionBuilder_ == null) { + customDimension_ = null; + onChanged(); + } else { + customDimension_ = null; + customDimensionBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The CustomDimension to update
+     * 
+ * + * .google.analytics.admin.v1beta.CustomDimension custom_dimension = 1; + */ + public com.google.analytics.admin.v1beta.CustomDimension.Builder getCustomDimensionBuilder() { + + onChanged(); + return getCustomDimensionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The CustomDimension to update
+     * 
+ * + * .google.analytics.admin.v1beta.CustomDimension custom_dimension = 1; + */ + public com.google.analytics.admin.v1beta.CustomDimensionOrBuilder + getCustomDimensionOrBuilder() { + if (customDimensionBuilder_ != null) { + return customDimensionBuilder_.getMessageOrBuilder(); + } else { + return customDimension_ == null + ? com.google.analytics.admin.v1beta.CustomDimension.getDefaultInstance() + : customDimension_; + } + } + /** + * + * + *
+     * The CustomDimension to update
+     * 
+ * + * .google.analytics.admin.v1beta.CustomDimension custom_dimension = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.CustomDimension, + com.google.analytics.admin.v1beta.CustomDimension.Builder, + com.google.analytics.admin.v1beta.CustomDimensionOrBuilder> + getCustomDimensionFieldBuilder() { + if (customDimensionBuilder_ == null) { + customDimensionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.CustomDimension, + com.google.analytics.admin.v1beta.CustomDimension.Builder, + com.google.analytics.admin.v1beta.CustomDimensionOrBuilder>( + getCustomDimension(), getParentForChildren(), isClean()); + customDimension_ = null; + } + return customDimensionBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Required. The list of fields to be updated. Omitted fields will not be updated.
+     * To replace the entire entity, use one path with the string "*" to match
+     * all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * Required. The list of fields to be updated. Omitted fields will not be updated.
+     * To replace the entire entity, use one path with the string "*" to match
+     * all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The list of fields to be updated. Omitted fields will not be updated.
+     * To replace the entire entity, use one path with the string "*" to match
+     * all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The list of fields to be updated. Omitted fields will not be updated.
+     * To replace the entire entity, use one path with the string "*" to match
+     * all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The list of fields to be updated. Omitted fields will not be updated.
+     * To replace the entire entity, use one path with the string "*" to match
+     * all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The list of fields to be updated. Omitted fields will not be updated.
+     * To replace the entire entity, use one path with the string "*" to match
+     * all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The list of fields to be updated. Omitted fields will not be updated.
+     * To replace the entire entity, use one path with the string "*" to match
+     * all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The list of fields to be updated. Omitted fields will not be updated.
+     * To replace the entire entity, use one path with the string "*" to match
+     * all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Required. The list of fields to be updated. Omitted fields will not be updated.
+     * To replace the entire entity, use one path with the string "*" to match
+     * all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @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.admin.v1beta.UpdateCustomDimensionRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.UpdateCustomDimensionRequest) + private static final com.google.analytics.admin.v1beta.UpdateCustomDimensionRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.UpdateCustomDimensionRequest(); + } + + public static com.google.analytics.admin.v1beta.UpdateCustomDimensionRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateCustomDimensionRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateCustomDimensionRequest(input, extensionRegistry); + } + }; + + 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.admin.v1beta.UpdateCustomDimensionRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/UpdateCustomDimensionRequestOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/UpdateCustomDimensionRequestOrBuilder.java new file mode 100644 index 000000000000..fc32b920cd87 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/UpdateCustomDimensionRequestOrBuilder.java @@ -0,0 +1,104 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +public interface UpdateCustomDimensionRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.UpdateCustomDimensionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The CustomDimension to update
+   * 
+ * + * .google.analytics.admin.v1beta.CustomDimension custom_dimension = 1; + * + * @return Whether the customDimension field is set. + */ + boolean hasCustomDimension(); + /** + * + * + *
+   * The CustomDimension to update
+   * 
+ * + * .google.analytics.admin.v1beta.CustomDimension custom_dimension = 1; + * + * @return The customDimension. + */ + com.google.analytics.admin.v1beta.CustomDimension getCustomDimension(); + /** + * + * + *
+   * The CustomDimension to update
+   * 
+ * + * .google.analytics.admin.v1beta.CustomDimension custom_dimension = 1; + */ + com.google.analytics.admin.v1beta.CustomDimensionOrBuilder getCustomDimensionOrBuilder(); + + /** + * + * + *
+   * Required. The list of fields to be updated. Omitted fields will not be updated.
+   * To replace the entire entity, use one path with the string "*" to match
+   * all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. The list of fields to be updated. Omitted fields will not be updated.
+   * To replace the entire entity, use one path with the string "*" to match
+   * all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. The list of fields to be updated. Omitted fields will not be updated.
+   * To replace the entire entity, use one path with the string "*" to match
+   * all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/UpdateCustomMetricRequest.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/UpdateCustomMetricRequest.java new file mode 100644 index 000000000000..ebd37edc0013 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/UpdateCustomMetricRequest.java @@ -0,0 +1,1045 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * Request message for UpdateCustomMetric RPC.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.UpdateCustomMetricRequest} + */ +public final class UpdateCustomMetricRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.UpdateCustomMetricRequest) + UpdateCustomMetricRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateCustomMetricRequest.newBuilder() to construct. + private UpdateCustomMetricRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateCustomMetricRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateCustomMetricRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateCustomMetricRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.analytics.admin.v1beta.CustomMetric.Builder subBuilder = null; + if (customMetric_ != null) { + subBuilder = customMetric_.toBuilder(); + } + customMetric_ = + input.readMessage( + com.google.analytics.admin.v1beta.CustomMetric.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(customMetric_); + customMetric_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_UpdateCustomMetricRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_UpdateCustomMetricRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.UpdateCustomMetricRequest.class, + com.google.analytics.admin.v1beta.UpdateCustomMetricRequest.Builder.class); + } + + public static final int CUSTOM_METRIC_FIELD_NUMBER = 1; + private com.google.analytics.admin.v1beta.CustomMetric customMetric_; + /** + * + * + *
+   * The CustomMetric to update
+   * 
+ * + * .google.analytics.admin.v1beta.CustomMetric custom_metric = 1; + * + * @return Whether the customMetric field is set. + */ + @java.lang.Override + public boolean hasCustomMetric() { + return customMetric_ != null; + } + /** + * + * + *
+   * The CustomMetric to update
+   * 
+ * + * .google.analytics.admin.v1beta.CustomMetric custom_metric = 1; + * + * @return The customMetric. + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.CustomMetric getCustomMetric() { + return customMetric_ == null + ? com.google.analytics.admin.v1beta.CustomMetric.getDefaultInstance() + : customMetric_; + } + /** + * + * + *
+   * The CustomMetric to update
+   * 
+ * + * .google.analytics.admin.v1beta.CustomMetric custom_metric = 1; + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.CustomMetricOrBuilder getCustomMetricOrBuilder() { + return getCustomMetric(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. The list of fields to be updated. Omitted fields will not be updated.
+   * To replace the entire entity, use one path with the string "*" to match
+   * all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Required. The list of fields to be updated. Omitted fields will not be updated.
+   * To replace the entire entity, use one path with the string "*" to match
+   * all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Required. The list of fields to be updated. Omitted fields will not be updated.
+   * To replace the entire entity, use one path with the string "*" to match
+   * all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + 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 (customMetric_ != null) { + output.writeMessage(1, getCustomMetric()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (customMetric_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCustomMetric()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + size += unknownFields.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.admin.v1beta.UpdateCustomMetricRequest)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.UpdateCustomMetricRequest other = + (com.google.analytics.admin.v1beta.UpdateCustomMetricRequest) obj; + + if (hasCustomMetric() != other.hasCustomMetric()) return false; + if (hasCustomMetric()) { + if (!getCustomMetric().equals(other.getCustomMetric())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCustomMetric()) { + hash = (37 * hash) + CUSTOM_METRIC_FIELD_NUMBER; + hash = (53 * hash) + getCustomMetric().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.UpdateCustomMetricRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.UpdateCustomMetricRequest 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.admin.v1beta.UpdateCustomMetricRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.UpdateCustomMetricRequest 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.admin.v1beta.UpdateCustomMetricRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.UpdateCustomMetricRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.UpdateCustomMetricRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.UpdateCustomMetricRequest 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.admin.v1beta.UpdateCustomMetricRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.UpdateCustomMetricRequest 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.admin.v1beta.UpdateCustomMetricRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.UpdateCustomMetricRequest 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.admin.v1beta.UpdateCustomMetricRequest 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; + } + /** + * + * + *
+   * Request message for UpdateCustomMetric RPC.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.UpdateCustomMetricRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.UpdateCustomMetricRequest) + com.google.analytics.admin.v1beta.UpdateCustomMetricRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_UpdateCustomMetricRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_UpdateCustomMetricRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.UpdateCustomMetricRequest.class, + com.google.analytics.admin.v1beta.UpdateCustomMetricRequest.Builder.class); + } + + // Construct using com.google.analytics.admin.v1beta.UpdateCustomMetricRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (customMetricBuilder_ == null) { + customMetric_ = null; + } else { + customMetric_ = null; + customMetricBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_UpdateCustomMetricRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.UpdateCustomMetricRequest getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.UpdateCustomMetricRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.UpdateCustomMetricRequest build() { + com.google.analytics.admin.v1beta.UpdateCustomMetricRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.UpdateCustomMetricRequest buildPartial() { + com.google.analytics.admin.v1beta.UpdateCustomMetricRequest result = + new com.google.analytics.admin.v1beta.UpdateCustomMetricRequest(this); + if (customMetricBuilder_ == null) { + result.customMetric_ = customMetric_; + } else { + result.customMetric_ = customMetricBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + onBuilt(); + return result; + } + + @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.admin.v1beta.UpdateCustomMetricRequest) { + return mergeFrom((com.google.analytics.admin.v1beta.UpdateCustomMetricRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1beta.UpdateCustomMetricRequest other) { + if (other == com.google.analytics.admin.v1beta.UpdateCustomMetricRequest.getDefaultInstance()) + return this; + if (other.hasCustomMetric()) { + mergeCustomMetric(other.getCustomMetric()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.UpdateCustomMetricRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.UpdateCustomMetricRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.analytics.admin.v1beta.CustomMetric customMetric_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.CustomMetric, + com.google.analytics.admin.v1beta.CustomMetric.Builder, + com.google.analytics.admin.v1beta.CustomMetricOrBuilder> + customMetricBuilder_; + /** + * + * + *
+     * The CustomMetric to update
+     * 
+ * + * .google.analytics.admin.v1beta.CustomMetric custom_metric = 1; + * + * @return Whether the customMetric field is set. + */ + public boolean hasCustomMetric() { + return customMetricBuilder_ != null || customMetric_ != null; + } + /** + * + * + *
+     * The CustomMetric to update
+     * 
+ * + * .google.analytics.admin.v1beta.CustomMetric custom_metric = 1; + * + * @return The customMetric. + */ + public com.google.analytics.admin.v1beta.CustomMetric getCustomMetric() { + if (customMetricBuilder_ == null) { + return customMetric_ == null + ? com.google.analytics.admin.v1beta.CustomMetric.getDefaultInstance() + : customMetric_; + } else { + return customMetricBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The CustomMetric to update
+     * 
+ * + * .google.analytics.admin.v1beta.CustomMetric custom_metric = 1; + */ + public Builder setCustomMetric(com.google.analytics.admin.v1beta.CustomMetric value) { + if (customMetricBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + customMetric_ = value; + onChanged(); + } else { + customMetricBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The CustomMetric to update
+     * 
+ * + * .google.analytics.admin.v1beta.CustomMetric custom_metric = 1; + */ + public Builder setCustomMetric( + com.google.analytics.admin.v1beta.CustomMetric.Builder builderForValue) { + if (customMetricBuilder_ == null) { + customMetric_ = builderForValue.build(); + onChanged(); + } else { + customMetricBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The CustomMetric to update
+     * 
+ * + * .google.analytics.admin.v1beta.CustomMetric custom_metric = 1; + */ + public Builder mergeCustomMetric(com.google.analytics.admin.v1beta.CustomMetric value) { + if (customMetricBuilder_ == null) { + if (customMetric_ != null) { + customMetric_ = + com.google.analytics.admin.v1beta.CustomMetric.newBuilder(customMetric_) + .mergeFrom(value) + .buildPartial(); + } else { + customMetric_ = value; + } + onChanged(); + } else { + customMetricBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The CustomMetric to update
+     * 
+ * + * .google.analytics.admin.v1beta.CustomMetric custom_metric = 1; + */ + public Builder clearCustomMetric() { + if (customMetricBuilder_ == null) { + customMetric_ = null; + onChanged(); + } else { + customMetric_ = null; + customMetricBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The CustomMetric to update
+     * 
+ * + * .google.analytics.admin.v1beta.CustomMetric custom_metric = 1; + */ + public com.google.analytics.admin.v1beta.CustomMetric.Builder getCustomMetricBuilder() { + + onChanged(); + return getCustomMetricFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The CustomMetric to update
+     * 
+ * + * .google.analytics.admin.v1beta.CustomMetric custom_metric = 1; + */ + public com.google.analytics.admin.v1beta.CustomMetricOrBuilder getCustomMetricOrBuilder() { + if (customMetricBuilder_ != null) { + return customMetricBuilder_.getMessageOrBuilder(); + } else { + return customMetric_ == null + ? com.google.analytics.admin.v1beta.CustomMetric.getDefaultInstance() + : customMetric_; + } + } + /** + * + * + *
+     * The CustomMetric to update
+     * 
+ * + * .google.analytics.admin.v1beta.CustomMetric custom_metric = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.CustomMetric, + com.google.analytics.admin.v1beta.CustomMetric.Builder, + com.google.analytics.admin.v1beta.CustomMetricOrBuilder> + getCustomMetricFieldBuilder() { + if (customMetricBuilder_ == null) { + customMetricBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.CustomMetric, + com.google.analytics.admin.v1beta.CustomMetric.Builder, + com.google.analytics.admin.v1beta.CustomMetricOrBuilder>( + getCustomMetric(), getParentForChildren(), isClean()); + customMetric_ = null; + } + return customMetricBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Required. The list of fields to be updated. Omitted fields will not be updated.
+     * To replace the entire entity, use one path with the string "*" to match
+     * all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * Required. The list of fields to be updated. Omitted fields will not be updated.
+     * To replace the entire entity, use one path with the string "*" to match
+     * all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The list of fields to be updated. Omitted fields will not be updated.
+     * To replace the entire entity, use one path with the string "*" to match
+     * all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The list of fields to be updated. Omitted fields will not be updated.
+     * To replace the entire entity, use one path with the string "*" to match
+     * all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The list of fields to be updated. Omitted fields will not be updated.
+     * To replace the entire entity, use one path with the string "*" to match
+     * all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The list of fields to be updated. Omitted fields will not be updated.
+     * To replace the entire entity, use one path with the string "*" to match
+     * all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The list of fields to be updated. Omitted fields will not be updated.
+     * To replace the entire entity, use one path with the string "*" to match
+     * all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The list of fields to be updated. Omitted fields will not be updated.
+     * To replace the entire entity, use one path with the string "*" to match
+     * all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Required. The list of fields to be updated. Omitted fields will not be updated.
+     * To replace the entire entity, use one path with the string "*" to match
+     * all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @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.admin.v1beta.UpdateCustomMetricRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.UpdateCustomMetricRequest) + private static final com.google.analytics.admin.v1beta.UpdateCustomMetricRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.UpdateCustomMetricRequest(); + } + + public static com.google.analytics.admin.v1beta.UpdateCustomMetricRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateCustomMetricRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateCustomMetricRequest(input, extensionRegistry); + } + }; + + 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.admin.v1beta.UpdateCustomMetricRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/UpdateCustomMetricRequestOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/UpdateCustomMetricRequestOrBuilder.java new file mode 100644 index 000000000000..2e3f2238afea --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/UpdateCustomMetricRequestOrBuilder.java @@ -0,0 +1,104 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +public interface UpdateCustomMetricRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.UpdateCustomMetricRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The CustomMetric to update
+   * 
+ * + * .google.analytics.admin.v1beta.CustomMetric custom_metric = 1; + * + * @return Whether the customMetric field is set. + */ + boolean hasCustomMetric(); + /** + * + * + *
+   * The CustomMetric to update
+   * 
+ * + * .google.analytics.admin.v1beta.CustomMetric custom_metric = 1; + * + * @return The customMetric. + */ + com.google.analytics.admin.v1beta.CustomMetric getCustomMetric(); + /** + * + * + *
+   * The CustomMetric to update
+   * 
+ * + * .google.analytics.admin.v1beta.CustomMetric custom_metric = 1; + */ + com.google.analytics.admin.v1beta.CustomMetricOrBuilder getCustomMetricOrBuilder(); + + /** + * + * + *
+   * Required. The list of fields to be updated. Omitted fields will not be updated.
+   * To replace the entire entity, use one path with the string "*" to match
+   * all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. The list of fields to be updated. Omitted fields will not be updated.
+   * To replace the entire entity, use one path with the string "*" to match
+   * all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. The list of fields to be updated. Omitted fields will not be updated.
+   * To replace the entire entity, use one path with the string "*" to match
+   * all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/UpdateDataRetentionSettingsRequest.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/UpdateDataRetentionSettingsRequest.java new file mode 100644 index 000000000000..be2c4f29aab6 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/UpdateDataRetentionSettingsRequest.java @@ -0,0 +1,1101 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * Request message for UpdateDataRetentionSettings RPC.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest} + */ +public final class UpdateDataRetentionSettingsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest) + UpdateDataRetentionSettingsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateDataRetentionSettingsRequest.newBuilder() to construct. + private UpdateDataRetentionSettingsRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateDataRetentionSettingsRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateDataRetentionSettingsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateDataRetentionSettingsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.analytics.admin.v1beta.DataRetentionSettings.Builder subBuilder = null; + if (dataRetentionSettings_ != null) { + subBuilder = dataRetentionSettings_.toBuilder(); + } + dataRetentionSettings_ = + input.readMessage( + com.google.analytics.admin.v1beta.DataRetentionSettings.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(dataRetentionSettings_); + dataRetentionSettings_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_UpdateDataRetentionSettingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_UpdateDataRetentionSettingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest.class, + com.google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest.Builder.class); + } + + public static final int DATA_RETENTION_SETTINGS_FIELD_NUMBER = 1; + private com.google.analytics.admin.v1beta.DataRetentionSettings dataRetentionSettings_; + /** + * + * + *
+   * Required. The settings to update.
+   * The `name` field is used to identify the settings to be updated.
+   * 
+ * + * + * .google.analytics.admin.v1beta.DataRetentionSettings data_retention_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dataRetentionSettings field is set. + */ + @java.lang.Override + public boolean hasDataRetentionSettings() { + return dataRetentionSettings_ != null; + } + /** + * + * + *
+   * Required. The settings to update.
+   * The `name` field is used to identify the settings to be updated.
+   * 
+ * + * + * .google.analytics.admin.v1beta.DataRetentionSettings data_retention_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dataRetentionSettings. + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.DataRetentionSettings getDataRetentionSettings() { + return dataRetentionSettings_ == null + ? com.google.analytics.admin.v1beta.DataRetentionSettings.getDefaultInstance() + : dataRetentionSettings_; + } + /** + * + * + *
+   * Required. The settings to update.
+   * The `name` field is used to identify the settings to be updated.
+   * 
+ * + * + * .google.analytics.admin.v1beta.DataRetentionSettings data_retention_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.DataRetentionSettingsOrBuilder + getDataRetentionSettingsOrBuilder() { + return getDataRetentionSettings(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. The list of fields to be updated. Field names must be in snake case
+   * (e.g., "field_to_update"). Omitted fields will not be updated. To replace
+   * the entire entity, use one path with the string "*" to match all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Required. The list of fields to be updated. Field names must be in snake case
+   * (e.g., "field_to_update"). Omitted fields will not be updated. To replace
+   * the entire entity, use one path with the string "*" to match all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Required. The list of fields to be updated. Field names must be in snake case
+   * (e.g., "field_to_update"). Omitted fields will not be updated. To replace
+   * the entire entity, use one path with the string "*" to match all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + 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 (dataRetentionSettings_ != null) { + output.writeMessage(1, getDataRetentionSettings()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (dataRetentionSettings_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, getDataRetentionSettings()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + size += unknownFields.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.admin.v1beta.UpdateDataRetentionSettingsRequest)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest other = + (com.google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest) obj; + + if (hasDataRetentionSettings() != other.hasDataRetentionSettings()) return false; + if (hasDataRetentionSettings()) { + if (!getDataRetentionSettings().equals(other.getDataRetentionSettings())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasDataRetentionSettings()) { + hash = (37 * hash) + DATA_RETENTION_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getDataRetentionSettings().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest 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.admin.v1beta.UpdateDataRetentionSettingsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest 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.admin.v1beta.UpdateDataRetentionSettingsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest 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.admin.v1beta.UpdateDataRetentionSettingsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest + 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.admin.v1beta.UpdateDataRetentionSettingsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest 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.admin.v1beta.UpdateDataRetentionSettingsRequest 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; + } + /** + * + * + *
+   * Request message for UpdateDataRetentionSettings RPC.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest) + com.google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_UpdateDataRetentionSettingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_UpdateDataRetentionSettingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest.class, + com.google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest.Builder.class); + } + + // Construct using + // com.google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (dataRetentionSettingsBuilder_ == null) { + dataRetentionSettings_ = null; + } else { + dataRetentionSettings_ = null; + dataRetentionSettingsBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_UpdateDataRetentionSettingsRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest + getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest build() { + com.google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest buildPartial() { + com.google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest result = + new com.google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest(this); + if (dataRetentionSettingsBuilder_ == null) { + result.dataRetentionSettings_ = dataRetentionSettings_; + } else { + result.dataRetentionSettings_ = dataRetentionSettingsBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + onBuilt(); + return result; + } + + @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.admin.v1beta.UpdateDataRetentionSettingsRequest) { + return mergeFrom( + (com.google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest other) { + if (other + == com.google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest + .getDefaultInstance()) return this; + if (other.hasDataRetentionSettings()) { + mergeDataRetentionSettings(other.getDataRetentionSettings()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.analytics.admin.v1beta.DataRetentionSettings dataRetentionSettings_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.DataRetentionSettings, + com.google.analytics.admin.v1beta.DataRetentionSettings.Builder, + com.google.analytics.admin.v1beta.DataRetentionSettingsOrBuilder> + dataRetentionSettingsBuilder_; + /** + * + * + *
+     * Required. The settings to update.
+     * The `name` field is used to identify the settings to be updated.
+     * 
+ * + * + * .google.analytics.admin.v1beta.DataRetentionSettings data_retention_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dataRetentionSettings field is set. + */ + public boolean hasDataRetentionSettings() { + return dataRetentionSettingsBuilder_ != null || dataRetentionSettings_ != null; + } + /** + * + * + *
+     * Required. The settings to update.
+     * The `name` field is used to identify the settings to be updated.
+     * 
+ * + * + * .google.analytics.admin.v1beta.DataRetentionSettings data_retention_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dataRetentionSettings. + */ + public com.google.analytics.admin.v1beta.DataRetentionSettings getDataRetentionSettings() { + if (dataRetentionSettingsBuilder_ == null) { + return dataRetentionSettings_ == null + ? com.google.analytics.admin.v1beta.DataRetentionSettings.getDefaultInstance() + : dataRetentionSettings_; + } else { + return dataRetentionSettingsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The settings to update.
+     * The `name` field is used to identify the settings to be updated.
+     * 
+ * + * + * .google.analytics.admin.v1beta.DataRetentionSettings data_retention_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDataRetentionSettings( + com.google.analytics.admin.v1beta.DataRetentionSettings value) { + if (dataRetentionSettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dataRetentionSettings_ = value; + onChanged(); + } else { + dataRetentionSettingsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The settings to update.
+     * The `name` field is used to identify the settings to be updated.
+     * 
+ * + * + * .google.analytics.admin.v1beta.DataRetentionSettings data_retention_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDataRetentionSettings( + com.google.analytics.admin.v1beta.DataRetentionSettings.Builder builderForValue) { + if (dataRetentionSettingsBuilder_ == null) { + dataRetentionSettings_ = builderForValue.build(); + onChanged(); + } else { + dataRetentionSettingsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The settings to update.
+     * The `name` field is used to identify the settings to be updated.
+     * 
+ * + * + * .google.analytics.admin.v1beta.DataRetentionSettings data_retention_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeDataRetentionSettings( + com.google.analytics.admin.v1beta.DataRetentionSettings value) { + if (dataRetentionSettingsBuilder_ == null) { + if (dataRetentionSettings_ != null) { + dataRetentionSettings_ = + com.google.analytics.admin.v1beta.DataRetentionSettings.newBuilder( + dataRetentionSettings_) + .mergeFrom(value) + .buildPartial(); + } else { + dataRetentionSettings_ = value; + } + onChanged(); + } else { + dataRetentionSettingsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The settings to update.
+     * The `name` field is used to identify the settings to be updated.
+     * 
+ * + * + * .google.analytics.admin.v1beta.DataRetentionSettings data_retention_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearDataRetentionSettings() { + if (dataRetentionSettingsBuilder_ == null) { + dataRetentionSettings_ = null; + onChanged(); + } else { + dataRetentionSettings_ = null; + dataRetentionSettingsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The settings to update.
+     * The `name` field is used to identify the settings to be updated.
+     * 
+ * + * + * .google.analytics.admin.v1beta.DataRetentionSettings data_retention_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.analytics.admin.v1beta.DataRetentionSettings.Builder + getDataRetentionSettingsBuilder() { + + onChanged(); + return getDataRetentionSettingsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The settings to update.
+     * The `name` field is used to identify the settings to be updated.
+     * 
+ * + * + * .google.analytics.admin.v1beta.DataRetentionSettings data_retention_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.analytics.admin.v1beta.DataRetentionSettingsOrBuilder + getDataRetentionSettingsOrBuilder() { + if (dataRetentionSettingsBuilder_ != null) { + return dataRetentionSettingsBuilder_.getMessageOrBuilder(); + } else { + return dataRetentionSettings_ == null + ? com.google.analytics.admin.v1beta.DataRetentionSettings.getDefaultInstance() + : dataRetentionSettings_; + } + } + /** + * + * + *
+     * Required. The settings to update.
+     * The `name` field is used to identify the settings to be updated.
+     * 
+ * + * + * .google.analytics.admin.v1beta.DataRetentionSettings data_retention_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.DataRetentionSettings, + com.google.analytics.admin.v1beta.DataRetentionSettings.Builder, + com.google.analytics.admin.v1beta.DataRetentionSettingsOrBuilder> + getDataRetentionSettingsFieldBuilder() { + if (dataRetentionSettingsBuilder_ == null) { + dataRetentionSettingsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.DataRetentionSettings, + com.google.analytics.admin.v1beta.DataRetentionSettings.Builder, + com.google.analytics.admin.v1beta.DataRetentionSettingsOrBuilder>( + getDataRetentionSettings(), getParentForChildren(), isClean()); + dataRetentionSettings_ = null; + } + return dataRetentionSettingsBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Required. The list of fields to be updated. Field names must be in snake case
+     * (e.g., "field_to_update"). Omitted fields will not be updated. To replace
+     * the entire entity, use one path with the string "*" to match all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * Required. The list of fields to be updated. Field names must be in snake case
+     * (e.g., "field_to_update"). Omitted fields will not be updated. To replace
+     * the entire entity, use one path with the string "*" to match all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The list of fields to be updated. Field names must be in snake case
+     * (e.g., "field_to_update"). Omitted fields will not be updated. To replace
+     * the entire entity, use one path with the string "*" to match all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The list of fields to be updated. Field names must be in snake case
+     * (e.g., "field_to_update"). Omitted fields will not be updated. To replace
+     * the entire entity, use one path with the string "*" to match all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The list of fields to be updated. Field names must be in snake case
+     * (e.g., "field_to_update"). Omitted fields will not be updated. To replace
+     * the entire entity, use one path with the string "*" to match all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The list of fields to be updated. Field names must be in snake case
+     * (e.g., "field_to_update"). Omitted fields will not be updated. To replace
+     * the entire entity, use one path with the string "*" to match all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The list of fields to be updated. Field names must be in snake case
+     * (e.g., "field_to_update"). Omitted fields will not be updated. To replace
+     * the entire entity, use one path with the string "*" to match all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The list of fields to be updated. Field names must be in snake case
+     * (e.g., "field_to_update"). Omitted fields will not be updated. To replace
+     * the entire entity, use one path with the string "*" to match all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Required. The list of fields to be updated. Field names must be in snake case
+     * (e.g., "field_to_update"). Omitted fields will not be updated. To replace
+     * the entire entity, use one path with the string "*" to match all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @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.admin.v1beta.UpdateDataRetentionSettingsRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest) + private static final com.google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest(); + } + + public static com.google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateDataRetentionSettingsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateDataRetentionSettingsRequest(input, extensionRegistry); + } + }; + + 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.admin.v1beta.UpdateDataRetentionSettingsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/UpdateDataRetentionSettingsRequestOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/UpdateDataRetentionSettingsRequestOrBuilder.java new file mode 100644 index 000000000000..6ad37f6e7161 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/UpdateDataRetentionSettingsRequestOrBuilder.java @@ -0,0 +1,114 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +public interface UpdateDataRetentionSettingsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The settings to update.
+   * The `name` field is used to identify the settings to be updated.
+   * 
+ * + * + * .google.analytics.admin.v1beta.DataRetentionSettings data_retention_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dataRetentionSettings field is set. + */ + boolean hasDataRetentionSettings(); + /** + * + * + *
+   * Required. The settings to update.
+   * The `name` field is used to identify the settings to be updated.
+   * 
+ * + * + * .google.analytics.admin.v1beta.DataRetentionSettings data_retention_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dataRetentionSettings. + */ + com.google.analytics.admin.v1beta.DataRetentionSettings getDataRetentionSettings(); + /** + * + * + *
+   * Required. The settings to update.
+   * The `name` field is used to identify the settings to be updated.
+   * 
+ * + * + * .google.analytics.admin.v1beta.DataRetentionSettings data_retention_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.analytics.admin.v1beta.DataRetentionSettingsOrBuilder + getDataRetentionSettingsOrBuilder(); + + /** + * + * + *
+   * Required. The list of fields to be updated. Field names must be in snake case
+   * (e.g., "field_to_update"). Omitted fields will not be updated. To replace
+   * the entire entity, use one path with the string "*" to match all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. The list of fields to be updated. Field names must be in snake case
+   * (e.g., "field_to_update"). Omitted fields will not be updated. To replace
+   * the entire entity, use one path with the string "*" to match all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. The list of fields to be updated. Field names must be in snake case
+   * (e.g., "field_to_update"). Omitted fields will not be updated. To replace
+   * the entire entity, use one path with the string "*" to match all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/UpdateDataStreamRequest.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/UpdateDataStreamRequest.java new file mode 100644 index 000000000000..07ee28c93086 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/UpdateDataStreamRequest.java @@ -0,0 +1,1045 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * Request message for UpdateDataStream RPC.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.UpdateDataStreamRequest} + */ +public final class UpdateDataStreamRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.UpdateDataStreamRequest) + UpdateDataStreamRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateDataStreamRequest.newBuilder() to construct. + private UpdateDataStreamRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateDataStreamRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateDataStreamRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateDataStreamRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.analytics.admin.v1beta.DataStream.Builder subBuilder = null; + if (dataStream_ != null) { + subBuilder = dataStream_.toBuilder(); + } + dataStream_ = + input.readMessage( + com.google.analytics.admin.v1beta.DataStream.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(dataStream_); + dataStream_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_UpdateDataStreamRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_UpdateDataStreamRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.UpdateDataStreamRequest.class, + com.google.analytics.admin.v1beta.UpdateDataStreamRequest.Builder.class); + } + + public static final int DATA_STREAM_FIELD_NUMBER = 1; + private com.google.analytics.admin.v1beta.DataStream dataStream_; + /** + * + * + *
+   * The DataStream to update
+   * 
+ * + * .google.analytics.admin.v1beta.DataStream data_stream = 1; + * + * @return Whether the dataStream field is set. + */ + @java.lang.Override + public boolean hasDataStream() { + return dataStream_ != null; + } + /** + * + * + *
+   * The DataStream to update
+   * 
+ * + * .google.analytics.admin.v1beta.DataStream data_stream = 1; + * + * @return The dataStream. + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.DataStream getDataStream() { + return dataStream_ == null + ? com.google.analytics.admin.v1beta.DataStream.getDefaultInstance() + : dataStream_; + } + /** + * + * + *
+   * The DataStream to update
+   * 
+ * + * .google.analytics.admin.v1beta.DataStream data_stream = 1; + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.DataStreamOrBuilder getDataStreamOrBuilder() { + return getDataStream(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. The list of fields to be updated. Omitted fields will not be updated.
+   * To replace the entire entity, use one path with the string "*" to match
+   * all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Required. The list of fields to be updated. Omitted fields will not be updated.
+   * To replace the entire entity, use one path with the string "*" to match
+   * all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Required. The list of fields to be updated. Omitted fields will not be updated.
+   * To replace the entire entity, use one path with the string "*" to match
+   * all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + 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 (dataStream_ != null) { + output.writeMessage(1, getDataStream()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (dataStream_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getDataStream()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + size += unknownFields.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.admin.v1beta.UpdateDataStreamRequest)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.UpdateDataStreamRequest other = + (com.google.analytics.admin.v1beta.UpdateDataStreamRequest) obj; + + if (hasDataStream() != other.hasDataStream()) return false; + if (hasDataStream()) { + if (!getDataStream().equals(other.getDataStream())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasDataStream()) { + hash = (37 * hash) + DATA_STREAM_FIELD_NUMBER; + hash = (53 * hash) + getDataStream().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.UpdateDataStreamRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.UpdateDataStreamRequest 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.admin.v1beta.UpdateDataStreamRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.UpdateDataStreamRequest 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.admin.v1beta.UpdateDataStreamRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.UpdateDataStreamRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.UpdateDataStreamRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.UpdateDataStreamRequest 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.admin.v1beta.UpdateDataStreamRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.UpdateDataStreamRequest 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.admin.v1beta.UpdateDataStreamRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.UpdateDataStreamRequest 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.admin.v1beta.UpdateDataStreamRequest 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; + } + /** + * + * + *
+   * Request message for UpdateDataStream RPC.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.UpdateDataStreamRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.UpdateDataStreamRequest) + com.google.analytics.admin.v1beta.UpdateDataStreamRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_UpdateDataStreamRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_UpdateDataStreamRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.UpdateDataStreamRequest.class, + com.google.analytics.admin.v1beta.UpdateDataStreamRequest.Builder.class); + } + + // Construct using com.google.analytics.admin.v1beta.UpdateDataStreamRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (dataStreamBuilder_ == null) { + dataStream_ = null; + } else { + dataStream_ = null; + dataStreamBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_UpdateDataStreamRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.UpdateDataStreamRequest getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.UpdateDataStreamRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.UpdateDataStreamRequest build() { + com.google.analytics.admin.v1beta.UpdateDataStreamRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.UpdateDataStreamRequest buildPartial() { + com.google.analytics.admin.v1beta.UpdateDataStreamRequest result = + new com.google.analytics.admin.v1beta.UpdateDataStreamRequest(this); + if (dataStreamBuilder_ == null) { + result.dataStream_ = dataStream_; + } else { + result.dataStream_ = dataStreamBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + onBuilt(); + return result; + } + + @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.admin.v1beta.UpdateDataStreamRequest) { + return mergeFrom((com.google.analytics.admin.v1beta.UpdateDataStreamRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1beta.UpdateDataStreamRequest other) { + if (other == com.google.analytics.admin.v1beta.UpdateDataStreamRequest.getDefaultInstance()) + return this; + if (other.hasDataStream()) { + mergeDataStream(other.getDataStream()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.UpdateDataStreamRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.UpdateDataStreamRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.analytics.admin.v1beta.DataStream dataStream_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.DataStream, + com.google.analytics.admin.v1beta.DataStream.Builder, + com.google.analytics.admin.v1beta.DataStreamOrBuilder> + dataStreamBuilder_; + /** + * + * + *
+     * The DataStream to update
+     * 
+ * + * .google.analytics.admin.v1beta.DataStream data_stream = 1; + * + * @return Whether the dataStream field is set. + */ + public boolean hasDataStream() { + return dataStreamBuilder_ != null || dataStream_ != null; + } + /** + * + * + *
+     * The DataStream to update
+     * 
+ * + * .google.analytics.admin.v1beta.DataStream data_stream = 1; + * + * @return The dataStream. + */ + public com.google.analytics.admin.v1beta.DataStream getDataStream() { + if (dataStreamBuilder_ == null) { + return dataStream_ == null + ? com.google.analytics.admin.v1beta.DataStream.getDefaultInstance() + : dataStream_; + } else { + return dataStreamBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The DataStream to update
+     * 
+ * + * .google.analytics.admin.v1beta.DataStream data_stream = 1; + */ + public Builder setDataStream(com.google.analytics.admin.v1beta.DataStream value) { + if (dataStreamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dataStream_ = value; + onChanged(); + } else { + dataStreamBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The DataStream to update
+     * 
+ * + * .google.analytics.admin.v1beta.DataStream data_stream = 1; + */ + public Builder setDataStream( + com.google.analytics.admin.v1beta.DataStream.Builder builderForValue) { + if (dataStreamBuilder_ == null) { + dataStream_ = builderForValue.build(); + onChanged(); + } else { + dataStreamBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The DataStream to update
+     * 
+ * + * .google.analytics.admin.v1beta.DataStream data_stream = 1; + */ + public Builder mergeDataStream(com.google.analytics.admin.v1beta.DataStream value) { + if (dataStreamBuilder_ == null) { + if (dataStream_ != null) { + dataStream_ = + com.google.analytics.admin.v1beta.DataStream.newBuilder(dataStream_) + .mergeFrom(value) + .buildPartial(); + } else { + dataStream_ = value; + } + onChanged(); + } else { + dataStreamBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The DataStream to update
+     * 
+ * + * .google.analytics.admin.v1beta.DataStream data_stream = 1; + */ + public Builder clearDataStream() { + if (dataStreamBuilder_ == null) { + dataStream_ = null; + onChanged(); + } else { + dataStream_ = null; + dataStreamBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The DataStream to update
+     * 
+ * + * .google.analytics.admin.v1beta.DataStream data_stream = 1; + */ + public com.google.analytics.admin.v1beta.DataStream.Builder getDataStreamBuilder() { + + onChanged(); + return getDataStreamFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The DataStream to update
+     * 
+ * + * .google.analytics.admin.v1beta.DataStream data_stream = 1; + */ + public com.google.analytics.admin.v1beta.DataStreamOrBuilder getDataStreamOrBuilder() { + if (dataStreamBuilder_ != null) { + return dataStreamBuilder_.getMessageOrBuilder(); + } else { + return dataStream_ == null + ? com.google.analytics.admin.v1beta.DataStream.getDefaultInstance() + : dataStream_; + } + } + /** + * + * + *
+     * The DataStream to update
+     * 
+ * + * .google.analytics.admin.v1beta.DataStream data_stream = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.DataStream, + com.google.analytics.admin.v1beta.DataStream.Builder, + com.google.analytics.admin.v1beta.DataStreamOrBuilder> + getDataStreamFieldBuilder() { + if (dataStreamBuilder_ == null) { + dataStreamBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.DataStream, + com.google.analytics.admin.v1beta.DataStream.Builder, + com.google.analytics.admin.v1beta.DataStreamOrBuilder>( + getDataStream(), getParentForChildren(), isClean()); + dataStream_ = null; + } + return dataStreamBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Required. The list of fields to be updated. Omitted fields will not be updated.
+     * To replace the entire entity, use one path with the string "*" to match
+     * all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * Required. The list of fields to be updated. Omitted fields will not be updated.
+     * To replace the entire entity, use one path with the string "*" to match
+     * all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The list of fields to be updated. Omitted fields will not be updated.
+     * To replace the entire entity, use one path with the string "*" to match
+     * all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The list of fields to be updated. Omitted fields will not be updated.
+     * To replace the entire entity, use one path with the string "*" to match
+     * all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The list of fields to be updated. Omitted fields will not be updated.
+     * To replace the entire entity, use one path with the string "*" to match
+     * all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The list of fields to be updated. Omitted fields will not be updated.
+     * To replace the entire entity, use one path with the string "*" to match
+     * all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The list of fields to be updated. Omitted fields will not be updated.
+     * To replace the entire entity, use one path with the string "*" to match
+     * all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The list of fields to be updated. Omitted fields will not be updated.
+     * To replace the entire entity, use one path with the string "*" to match
+     * all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Required. The list of fields to be updated. Omitted fields will not be updated.
+     * To replace the entire entity, use one path with the string "*" to match
+     * all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @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.admin.v1beta.UpdateDataStreamRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.UpdateDataStreamRequest) + private static final com.google.analytics.admin.v1beta.UpdateDataStreamRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.UpdateDataStreamRequest(); + } + + public static com.google.analytics.admin.v1beta.UpdateDataStreamRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateDataStreamRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateDataStreamRequest(input, extensionRegistry); + } + }; + + 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.admin.v1beta.UpdateDataStreamRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/UpdateDataStreamRequestOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/UpdateDataStreamRequestOrBuilder.java new file mode 100644 index 000000000000..1d454c49d9a3 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/UpdateDataStreamRequestOrBuilder.java @@ -0,0 +1,104 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +public interface UpdateDataStreamRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.UpdateDataStreamRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The DataStream to update
+   * 
+ * + * .google.analytics.admin.v1beta.DataStream data_stream = 1; + * + * @return Whether the dataStream field is set. + */ + boolean hasDataStream(); + /** + * + * + *
+   * The DataStream to update
+   * 
+ * + * .google.analytics.admin.v1beta.DataStream data_stream = 1; + * + * @return The dataStream. + */ + com.google.analytics.admin.v1beta.DataStream getDataStream(); + /** + * + * + *
+   * The DataStream to update
+   * 
+ * + * .google.analytics.admin.v1beta.DataStream data_stream = 1; + */ + com.google.analytics.admin.v1beta.DataStreamOrBuilder getDataStreamOrBuilder(); + + /** + * + * + *
+   * Required. The list of fields to be updated. Omitted fields will not be updated.
+   * To replace the entire entity, use one path with the string "*" to match
+   * all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. The list of fields to be updated. Omitted fields will not be updated.
+   * To replace the entire entity, use one path with the string "*" to match
+   * all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. The list of fields to be updated. Omitted fields will not be updated.
+   * To replace the entire entity, use one path with the string "*" to match
+   * all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/UpdateGoogleAdsLinkRequest.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/UpdateGoogleAdsLinkRequest.java new file mode 100644 index 000000000000..95c5ab0d6e01 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/UpdateGoogleAdsLinkRequest.java @@ -0,0 +1,1048 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * Request message for UpdateGoogleAdsLink RPC
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest} + */ +public final class UpdateGoogleAdsLinkRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest) + UpdateGoogleAdsLinkRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateGoogleAdsLinkRequest.newBuilder() to construct. + private UpdateGoogleAdsLinkRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateGoogleAdsLinkRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateGoogleAdsLinkRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateGoogleAdsLinkRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.analytics.admin.v1beta.GoogleAdsLink.Builder subBuilder = null; + if (googleAdsLink_ != null) { + subBuilder = googleAdsLink_.toBuilder(); + } + googleAdsLink_ = + input.readMessage( + com.google.analytics.admin.v1beta.GoogleAdsLink.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(googleAdsLink_); + googleAdsLink_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_UpdateGoogleAdsLinkRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_UpdateGoogleAdsLinkRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest.class, + com.google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest.Builder.class); + } + + public static final int GOOGLE_ADS_LINK_FIELD_NUMBER = 1; + private com.google.analytics.admin.v1beta.GoogleAdsLink googleAdsLink_; + /** + * + * + *
+   * The GoogleAdsLink to update
+   * 
+ * + * .google.analytics.admin.v1beta.GoogleAdsLink google_ads_link = 1; + * + * @return Whether the googleAdsLink field is set. + */ + @java.lang.Override + public boolean hasGoogleAdsLink() { + return googleAdsLink_ != null; + } + /** + * + * + *
+   * The GoogleAdsLink to update
+   * 
+ * + * .google.analytics.admin.v1beta.GoogleAdsLink google_ads_link = 1; + * + * @return The googleAdsLink. + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.GoogleAdsLink getGoogleAdsLink() { + return googleAdsLink_ == null + ? com.google.analytics.admin.v1beta.GoogleAdsLink.getDefaultInstance() + : googleAdsLink_; + } + /** + * + * + *
+   * The GoogleAdsLink to update
+   * 
+ * + * .google.analytics.admin.v1beta.GoogleAdsLink google_ads_link = 1; + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.GoogleAdsLinkOrBuilder getGoogleAdsLinkOrBuilder() { + return getGoogleAdsLink(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. The list of fields to be updated. Field names must be in snake case
+   * (e.g., "field_to_update"). Omitted fields will not be updated. To replace
+   * the entire entity, use one path with the string "*" to match all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Required. The list of fields to be updated. Field names must be in snake case
+   * (e.g., "field_to_update"). Omitted fields will not be updated. To replace
+   * the entire entity, use one path with the string "*" to match all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Required. The list of fields to be updated. Field names must be in snake case
+   * (e.g., "field_to_update"). Omitted fields will not be updated. To replace
+   * the entire entity, use one path with the string "*" to match all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + 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 (googleAdsLink_ != null) { + output.writeMessage(1, getGoogleAdsLink()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (googleAdsLink_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getGoogleAdsLink()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + size += unknownFields.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.admin.v1beta.UpdateGoogleAdsLinkRequest)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest other = + (com.google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest) obj; + + if (hasGoogleAdsLink() != other.hasGoogleAdsLink()) return false; + if (hasGoogleAdsLink()) { + if (!getGoogleAdsLink().equals(other.getGoogleAdsLink())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasGoogleAdsLink()) { + hash = (37 * hash) + GOOGLE_ADS_LINK_FIELD_NUMBER; + hash = (53 * hash) + getGoogleAdsLink().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest 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.admin.v1beta.UpdateGoogleAdsLinkRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest 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.admin.v1beta.UpdateGoogleAdsLinkRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest 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.admin.v1beta.UpdateGoogleAdsLinkRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest 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.admin.v1beta.UpdateGoogleAdsLinkRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest 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.admin.v1beta.UpdateGoogleAdsLinkRequest 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; + } + /** + * + * + *
+   * Request message for UpdateGoogleAdsLink RPC
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest) + com.google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_UpdateGoogleAdsLinkRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_UpdateGoogleAdsLinkRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest.class, + com.google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest.Builder.class); + } + + // Construct using com.google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (googleAdsLinkBuilder_ == null) { + googleAdsLink_ = null; + } else { + googleAdsLink_ = null; + googleAdsLinkBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_UpdateGoogleAdsLinkRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest + getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest build() { + com.google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest buildPartial() { + com.google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest result = + new com.google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest(this); + if (googleAdsLinkBuilder_ == null) { + result.googleAdsLink_ = googleAdsLink_; + } else { + result.googleAdsLink_ = googleAdsLinkBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + onBuilt(); + return result; + } + + @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.admin.v1beta.UpdateGoogleAdsLinkRequest) { + return mergeFrom((com.google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest other) { + if (other + == com.google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest.getDefaultInstance()) + return this; + if (other.hasGoogleAdsLink()) { + mergeGoogleAdsLink(other.getGoogleAdsLink()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.analytics.admin.v1beta.GoogleAdsLink googleAdsLink_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.GoogleAdsLink, + com.google.analytics.admin.v1beta.GoogleAdsLink.Builder, + com.google.analytics.admin.v1beta.GoogleAdsLinkOrBuilder> + googleAdsLinkBuilder_; + /** + * + * + *
+     * The GoogleAdsLink to update
+     * 
+ * + * .google.analytics.admin.v1beta.GoogleAdsLink google_ads_link = 1; + * + * @return Whether the googleAdsLink field is set. + */ + public boolean hasGoogleAdsLink() { + return googleAdsLinkBuilder_ != null || googleAdsLink_ != null; + } + /** + * + * + *
+     * The GoogleAdsLink to update
+     * 
+ * + * .google.analytics.admin.v1beta.GoogleAdsLink google_ads_link = 1; + * + * @return The googleAdsLink. + */ + public com.google.analytics.admin.v1beta.GoogleAdsLink getGoogleAdsLink() { + if (googleAdsLinkBuilder_ == null) { + return googleAdsLink_ == null + ? com.google.analytics.admin.v1beta.GoogleAdsLink.getDefaultInstance() + : googleAdsLink_; + } else { + return googleAdsLinkBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The GoogleAdsLink to update
+     * 
+ * + * .google.analytics.admin.v1beta.GoogleAdsLink google_ads_link = 1; + */ + public Builder setGoogleAdsLink(com.google.analytics.admin.v1beta.GoogleAdsLink value) { + if (googleAdsLinkBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + googleAdsLink_ = value; + onChanged(); + } else { + googleAdsLinkBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The GoogleAdsLink to update
+     * 
+ * + * .google.analytics.admin.v1beta.GoogleAdsLink google_ads_link = 1; + */ + public Builder setGoogleAdsLink( + com.google.analytics.admin.v1beta.GoogleAdsLink.Builder builderForValue) { + if (googleAdsLinkBuilder_ == null) { + googleAdsLink_ = builderForValue.build(); + onChanged(); + } else { + googleAdsLinkBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The GoogleAdsLink to update
+     * 
+ * + * .google.analytics.admin.v1beta.GoogleAdsLink google_ads_link = 1; + */ + public Builder mergeGoogleAdsLink(com.google.analytics.admin.v1beta.GoogleAdsLink value) { + if (googleAdsLinkBuilder_ == null) { + if (googleAdsLink_ != null) { + googleAdsLink_ = + com.google.analytics.admin.v1beta.GoogleAdsLink.newBuilder(googleAdsLink_) + .mergeFrom(value) + .buildPartial(); + } else { + googleAdsLink_ = value; + } + onChanged(); + } else { + googleAdsLinkBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The GoogleAdsLink to update
+     * 
+ * + * .google.analytics.admin.v1beta.GoogleAdsLink google_ads_link = 1; + */ + public Builder clearGoogleAdsLink() { + if (googleAdsLinkBuilder_ == null) { + googleAdsLink_ = null; + onChanged(); + } else { + googleAdsLink_ = null; + googleAdsLinkBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The GoogleAdsLink to update
+     * 
+ * + * .google.analytics.admin.v1beta.GoogleAdsLink google_ads_link = 1; + */ + public com.google.analytics.admin.v1beta.GoogleAdsLink.Builder getGoogleAdsLinkBuilder() { + + onChanged(); + return getGoogleAdsLinkFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The GoogleAdsLink to update
+     * 
+ * + * .google.analytics.admin.v1beta.GoogleAdsLink google_ads_link = 1; + */ + public com.google.analytics.admin.v1beta.GoogleAdsLinkOrBuilder getGoogleAdsLinkOrBuilder() { + if (googleAdsLinkBuilder_ != null) { + return googleAdsLinkBuilder_.getMessageOrBuilder(); + } else { + return googleAdsLink_ == null + ? com.google.analytics.admin.v1beta.GoogleAdsLink.getDefaultInstance() + : googleAdsLink_; + } + } + /** + * + * + *
+     * The GoogleAdsLink to update
+     * 
+ * + * .google.analytics.admin.v1beta.GoogleAdsLink google_ads_link = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.GoogleAdsLink, + com.google.analytics.admin.v1beta.GoogleAdsLink.Builder, + com.google.analytics.admin.v1beta.GoogleAdsLinkOrBuilder> + getGoogleAdsLinkFieldBuilder() { + if (googleAdsLinkBuilder_ == null) { + googleAdsLinkBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.GoogleAdsLink, + com.google.analytics.admin.v1beta.GoogleAdsLink.Builder, + com.google.analytics.admin.v1beta.GoogleAdsLinkOrBuilder>( + getGoogleAdsLink(), getParentForChildren(), isClean()); + googleAdsLink_ = null; + } + return googleAdsLinkBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Required. The list of fields to be updated. Field names must be in snake case
+     * (e.g., "field_to_update"). Omitted fields will not be updated. To replace
+     * the entire entity, use one path with the string "*" to match all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * Required. The list of fields to be updated. Field names must be in snake case
+     * (e.g., "field_to_update"). Omitted fields will not be updated. To replace
+     * the entire entity, use one path with the string "*" to match all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The list of fields to be updated. Field names must be in snake case
+     * (e.g., "field_to_update"). Omitted fields will not be updated. To replace
+     * the entire entity, use one path with the string "*" to match all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The list of fields to be updated. Field names must be in snake case
+     * (e.g., "field_to_update"). Omitted fields will not be updated. To replace
+     * the entire entity, use one path with the string "*" to match all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The list of fields to be updated. Field names must be in snake case
+     * (e.g., "field_to_update"). Omitted fields will not be updated. To replace
+     * the entire entity, use one path with the string "*" to match all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The list of fields to be updated. Field names must be in snake case
+     * (e.g., "field_to_update"). Omitted fields will not be updated. To replace
+     * the entire entity, use one path with the string "*" to match all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The list of fields to be updated. Field names must be in snake case
+     * (e.g., "field_to_update"). Omitted fields will not be updated. To replace
+     * the entire entity, use one path with the string "*" to match all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The list of fields to be updated. Field names must be in snake case
+     * (e.g., "field_to_update"). Omitted fields will not be updated. To replace
+     * the entire entity, use one path with the string "*" to match all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Required. The list of fields to be updated. Field names must be in snake case
+     * (e.g., "field_to_update"). Omitted fields will not be updated. To replace
+     * the entire entity, use one path with the string "*" to match all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @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.admin.v1beta.UpdateGoogleAdsLinkRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest) + private static final com.google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest(); + } + + public static com.google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateGoogleAdsLinkRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateGoogleAdsLinkRequest(input, extensionRegistry); + } + }; + + 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.admin.v1beta.UpdateGoogleAdsLinkRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/UpdateGoogleAdsLinkRequestOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/UpdateGoogleAdsLinkRequestOrBuilder.java new file mode 100644 index 000000000000..81e0014e26db --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/UpdateGoogleAdsLinkRequestOrBuilder.java @@ -0,0 +1,104 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +public interface UpdateGoogleAdsLinkRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The GoogleAdsLink to update
+   * 
+ * + * .google.analytics.admin.v1beta.GoogleAdsLink google_ads_link = 1; + * + * @return Whether the googleAdsLink field is set. + */ + boolean hasGoogleAdsLink(); + /** + * + * + *
+   * The GoogleAdsLink to update
+   * 
+ * + * .google.analytics.admin.v1beta.GoogleAdsLink google_ads_link = 1; + * + * @return The googleAdsLink. + */ + com.google.analytics.admin.v1beta.GoogleAdsLink getGoogleAdsLink(); + /** + * + * + *
+   * The GoogleAdsLink to update
+   * 
+ * + * .google.analytics.admin.v1beta.GoogleAdsLink google_ads_link = 1; + */ + com.google.analytics.admin.v1beta.GoogleAdsLinkOrBuilder getGoogleAdsLinkOrBuilder(); + + /** + * + * + *
+   * Required. The list of fields to be updated. Field names must be in snake case
+   * (e.g., "field_to_update"). Omitted fields will not be updated. To replace
+   * the entire entity, use one path with the string "*" to match all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. The list of fields to be updated. Field names must be in snake case
+   * (e.g., "field_to_update"). Omitted fields will not be updated. To replace
+   * the entire entity, use one path with the string "*" to match all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. The list of fields to be updated. Field names must be in snake case
+   * (e.g., "field_to_update"). Omitted fields will not be updated. To replace
+   * the entire entity, use one path with the string "*" to match all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/UpdateMeasurementProtocolSecretRequest.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/UpdateMeasurementProtocolSecretRequest.java new file mode 100644 index 000000000000..f59a1255d52b --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/UpdateMeasurementProtocolSecretRequest.java @@ -0,0 +1,1063 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * Request message for UpdateMeasurementProtocolSecret RPC
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest} + */ +public final class UpdateMeasurementProtocolSecretRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest) + UpdateMeasurementProtocolSecretRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateMeasurementProtocolSecretRequest.newBuilder() to construct. + private UpdateMeasurementProtocolSecretRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateMeasurementProtocolSecretRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateMeasurementProtocolSecretRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateMeasurementProtocolSecretRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.analytics.admin.v1beta.MeasurementProtocolSecret.Builder subBuilder = null; + if (measurementProtocolSecret_ != null) { + subBuilder = measurementProtocolSecret_.toBuilder(); + } + measurementProtocolSecret_ = + input.readMessage( + com.google.analytics.admin.v1beta.MeasurementProtocolSecret.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(measurementProtocolSecret_); + measurementProtocolSecret_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_UpdateMeasurementProtocolSecretRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_UpdateMeasurementProtocolSecretRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest.class, + com.google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest.Builder.class); + } + + public static final int MEASUREMENT_PROTOCOL_SECRET_FIELD_NUMBER = 1; + private com.google.analytics.admin.v1beta.MeasurementProtocolSecret measurementProtocolSecret_; + /** + * + * + *
+   * Required. The measurement protocol secret to update.
+   * 
+ * + * + * .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secret = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the measurementProtocolSecret field is set. + */ + @java.lang.Override + public boolean hasMeasurementProtocolSecret() { + return measurementProtocolSecret_ != null; + } + /** + * + * + *
+   * Required. The measurement protocol secret to update.
+   * 
+ * + * + * .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secret = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The measurementProtocolSecret. + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.MeasurementProtocolSecret + getMeasurementProtocolSecret() { + return measurementProtocolSecret_ == null + ? com.google.analytics.admin.v1beta.MeasurementProtocolSecret.getDefaultInstance() + : measurementProtocolSecret_; + } + /** + * + * + *
+   * Required. The measurement protocol secret to update.
+   * 
+ * + * + * .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secret = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.MeasurementProtocolSecretOrBuilder + getMeasurementProtocolSecretOrBuilder() { + return getMeasurementProtocolSecret(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * The list of fields to be updated. Omitted fields will not be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * The list of fields to be updated. Omitted fields will not be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * The list of fields to be updated. Omitted fields will not be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + 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 (measurementProtocolSecret_ != null) { + output.writeMessage(1, getMeasurementProtocolSecret()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (measurementProtocolSecret_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, getMeasurementProtocolSecret()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + size += unknownFields.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.admin.v1beta.UpdateMeasurementProtocolSecretRequest)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest other = + (com.google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest) obj; + + if (hasMeasurementProtocolSecret() != other.hasMeasurementProtocolSecret()) return false; + if (hasMeasurementProtocolSecret()) { + if (!getMeasurementProtocolSecret().equals(other.getMeasurementProtocolSecret())) + return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasMeasurementProtocolSecret()) { + hash = (37 * hash) + MEASUREMENT_PROTOCOL_SECRET_FIELD_NUMBER; + hash = (53 * hash) + getMeasurementProtocolSecret().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest 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.admin.v1beta.UpdateMeasurementProtocolSecretRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest 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.admin.v1beta.UpdateMeasurementProtocolSecretRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest 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.admin.v1beta.UpdateMeasurementProtocolSecretRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest + 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.admin.v1beta.UpdateMeasurementProtocolSecretRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest 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.admin.v1beta.UpdateMeasurementProtocolSecretRequest 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; + } + /** + * + * + *
+   * Request message for UpdateMeasurementProtocolSecret RPC
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest) + com.google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_UpdateMeasurementProtocolSecretRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_UpdateMeasurementProtocolSecretRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest.class, + com.google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest.Builder + .class); + } + + // Construct using + // com.google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (measurementProtocolSecretBuilder_ == null) { + measurementProtocolSecret_ = null; + } else { + measurementProtocolSecret_ = null; + measurementProtocolSecretBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_UpdateMeasurementProtocolSecretRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest + getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest build() { + com.google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest buildPartial() { + com.google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest result = + new com.google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest(this); + if (measurementProtocolSecretBuilder_ == null) { + result.measurementProtocolSecret_ = measurementProtocolSecret_; + } else { + result.measurementProtocolSecret_ = measurementProtocolSecretBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + onBuilt(); + return result; + } + + @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.admin.v1beta.UpdateMeasurementProtocolSecretRequest) { + return mergeFrom( + (com.google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest other) { + if (other + == com.google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest + .getDefaultInstance()) return this; + if (other.hasMeasurementProtocolSecret()) { + mergeMeasurementProtocolSecret(other.getMeasurementProtocolSecret()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.analytics.admin.v1beta.MeasurementProtocolSecret measurementProtocolSecret_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.MeasurementProtocolSecret, + com.google.analytics.admin.v1beta.MeasurementProtocolSecret.Builder, + com.google.analytics.admin.v1beta.MeasurementProtocolSecretOrBuilder> + measurementProtocolSecretBuilder_; + /** + * + * + *
+     * Required. The measurement protocol secret to update.
+     * 
+ * + * + * .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secret = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the measurementProtocolSecret field is set. + */ + public boolean hasMeasurementProtocolSecret() { + return measurementProtocolSecretBuilder_ != null || measurementProtocolSecret_ != null; + } + /** + * + * + *
+     * Required. The measurement protocol secret to update.
+     * 
+ * + * + * .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secret = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The measurementProtocolSecret. + */ + public com.google.analytics.admin.v1beta.MeasurementProtocolSecret + getMeasurementProtocolSecret() { + if (measurementProtocolSecretBuilder_ == null) { + return measurementProtocolSecret_ == null + ? com.google.analytics.admin.v1beta.MeasurementProtocolSecret.getDefaultInstance() + : measurementProtocolSecret_; + } else { + return measurementProtocolSecretBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The measurement protocol secret to update.
+     * 
+ * + * + * .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secret = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setMeasurementProtocolSecret( + com.google.analytics.admin.v1beta.MeasurementProtocolSecret value) { + if (measurementProtocolSecretBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + measurementProtocolSecret_ = value; + onChanged(); + } else { + measurementProtocolSecretBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The measurement protocol secret to update.
+     * 
+ * + * + * .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secret = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setMeasurementProtocolSecret( + com.google.analytics.admin.v1beta.MeasurementProtocolSecret.Builder builderForValue) { + if (measurementProtocolSecretBuilder_ == null) { + measurementProtocolSecret_ = builderForValue.build(); + onChanged(); + } else { + measurementProtocolSecretBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The measurement protocol secret to update.
+     * 
+ * + * + * .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secret = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeMeasurementProtocolSecret( + com.google.analytics.admin.v1beta.MeasurementProtocolSecret value) { + if (measurementProtocolSecretBuilder_ == null) { + if (measurementProtocolSecret_ != null) { + measurementProtocolSecret_ = + com.google.analytics.admin.v1beta.MeasurementProtocolSecret.newBuilder( + measurementProtocolSecret_) + .mergeFrom(value) + .buildPartial(); + } else { + measurementProtocolSecret_ = value; + } + onChanged(); + } else { + measurementProtocolSecretBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The measurement protocol secret to update.
+     * 
+ * + * + * .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secret = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearMeasurementProtocolSecret() { + if (measurementProtocolSecretBuilder_ == null) { + measurementProtocolSecret_ = null; + onChanged(); + } else { + measurementProtocolSecret_ = null; + measurementProtocolSecretBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The measurement protocol secret to update.
+     * 
+ * + * + * .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secret = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.analytics.admin.v1beta.MeasurementProtocolSecret.Builder + getMeasurementProtocolSecretBuilder() { + + onChanged(); + return getMeasurementProtocolSecretFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The measurement protocol secret to update.
+     * 
+ * + * + * .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secret = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.analytics.admin.v1beta.MeasurementProtocolSecretOrBuilder + getMeasurementProtocolSecretOrBuilder() { + if (measurementProtocolSecretBuilder_ != null) { + return measurementProtocolSecretBuilder_.getMessageOrBuilder(); + } else { + return measurementProtocolSecret_ == null + ? com.google.analytics.admin.v1beta.MeasurementProtocolSecret.getDefaultInstance() + : measurementProtocolSecret_; + } + } + /** + * + * + *
+     * Required. The measurement protocol secret to update.
+     * 
+ * + * + * .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secret = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.MeasurementProtocolSecret, + com.google.analytics.admin.v1beta.MeasurementProtocolSecret.Builder, + com.google.analytics.admin.v1beta.MeasurementProtocolSecretOrBuilder> + getMeasurementProtocolSecretFieldBuilder() { + if (measurementProtocolSecretBuilder_ == null) { + measurementProtocolSecretBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.MeasurementProtocolSecret, + com.google.analytics.admin.v1beta.MeasurementProtocolSecret.Builder, + com.google.analytics.admin.v1beta.MeasurementProtocolSecretOrBuilder>( + getMeasurementProtocolSecret(), getParentForChildren(), isClean()); + measurementProtocolSecret_ = null; + } + return measurementProtocolSecretBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * The list of fields to be updated. Omitted fields will not be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * The list of fields to be updated. Omitted fields will not be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The list of fields to be updated. Omitted fields will not be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The list of fields to be updated. Omitted fields will not be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The list of fields to be updated. Omitted fields will not be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The list of fields to be updated. Omitted fields will not be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The list of fields to be updated. Omitted fields will not be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The list of fields to be updated. Omitted fields will not be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * The list of fields to be updated. Omitted fields will not be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @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.admin.v1beta.UpdateMeasurementProtocolSecretRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest) + private static final com.google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest(); + } + + public static com.google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateMeasurementProtocolSecretRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateMeasurementProtocolSecretRequest(input, extensionRegistry); + } + }; + + 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.admin.v1beta.UpdateMeasurementProtocolSecretRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/UpdateMeasurementProtocolSecretRequestOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/UpdateMeasurementProtocolSecretRequestOrBuilder.java new file mode 100644 index 000000000000..938c81baa9ba --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/UpdateMeasurementProtocolSecretRequestOrBuilder.java @@ -0,0 +1,102 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +public interface UpdateMeasurementProtocolSecretRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The measurement protocol secret to update.
+   * 
+ * + * + * .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secret = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the measurementProtocolSecret field is set. + */ + boolean hasMeasurementProtocolSecret(); + /** + * + * + *
+   * Required. The measurement protocol secret to update.
+   * 
+ * + * + * .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secret = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The measurementProtocolSecret. + */ + com.google.analytics.admin.v1beta.MeasurementProtocolSecret getMeasurementProtocolSecret(); + /** + * + * + *
+   * Required. The measurement protocol secret to update.
+   * 
+ * + * + * .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secret = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.analytics.admin.v1beta.MeasurementProtocolSecretOrBuilder + getMeasurementProtocolSecretOrBuilder(); + + /** + * + * + *
+   * The list of fields to be updated. Omitted fields will not be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * The list of fields to be updated. Omitted fields will not be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * The list of fields to be updated. Omitted fields will not be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/UpdatePropertyRequest.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/UpdatePropertyRequest.java new file mode 100644 index 000000000000..428d2b6b7a38 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/UpdatePropertyRequest.java @@ -0,0 +1,1092 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +/** + * + * + *
+ * Request message for UpdateProperty RPC.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.UpdatePropertyRequest} + */ +public final class UpdatePropertyRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1beta.UpdatePropertyRequest) + UpdatePropertyRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdatePropertyRequest.newBuilder() to construct. + private UpdatePropertyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdatePropertyRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdatePropertyRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdatePropertyRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.analytics.admin.v1beta.Property.Builder subBuilder = null; + if (property_ != null) { + subBuilder = property_.toBuilder(); + } + property_ = + input.readMessage( + com.google.analytics.admin.v1beta.Property.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(property_); + property_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_UpdatePropertyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_UpdatePropertyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.UpdatePropertyRequest.class, + com.google.analytics.admin.v1beta.UpdatePropertyRequest.Builder.class); + } + + public static final int PROPERTY_FIELD_NUMBER = 1; + private com.google.analytics.admin.v1beta.Property property_; + /** + * + * + *
+   * Required. The property to update.
+   * The property's `name` field is used to identify the property to be
+   * updated.
+   * 
+ * + * + * .google.analytics.admin.v1beta.Property property = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the property field is set. + */ + @java.lang.Override + public boolean hasProperty() { + return property_ != null; + } + /** + * + * + *
+   * Required. The property to update.
+   * The property's `name` field is used to identify the property to be
+   * updated.
+   * 
+ * + * + * .google.analytics.admin.v1beta.Property property = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The property. + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.Property getProperty() { + return property_ == null + ? com.google.analytics.admin.v1beta.Property.getDefaultInstance() + : property_; + } + /** + * + * + *
+   * Required. The property to update.
+   * The property's `name` field is used to identify the property to be
+   * updated.
+   * 
+ * + * + * .google.analytics.admin.v1beta.Property property = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.analytics.admin.v1beta.PropertyOrBuilder getPropertyOrBuilder() { + return getProperty(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. The list of fields to be updated. Field names must be in snake case
+   * (e.g., "field_to_update"). Omitted fields will not be updated. To replace
+   * the entire entity, use one path with the string "*" to match all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Required. The list of fields to be updated. Field names must be in snake case
+   * (e.g., "field_to_update"). Omitted fields will not be updated. To replace
+   * the entire entity, use one path with the string "*" to match all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Required. The list of fields to be updated. Field names must be in snake case
+   * (e.g., "field_to_update"). Omitted fields will not be updated. To replace
+   * the entire entity, use one path with the string "*" to match all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + 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 (property_ != null) { + output.writeMessage(1, getProperty()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (property_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getProperty()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + size += unknownFields.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.admin.v1beta.UpdatePropertyRequest)) { + return super.equals(obj); + } + com.google.analytics.admin.v1beta.UpdatePropertyRequest other = + (com.google.analytics.admin.v1beta.UpdatePropertyRequest) obj; + + if (hasProperty() != other.hasProperty()) return false; + if (hasProperty()) { + if (!getProperty().equals(other.getProperty())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasProperty()) { + hash = (37 * hash) + PROPERTY_FIELD_NUMBER; + hash = (53 * hash) + getProperty().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1beta.UpdatePropertyRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.UpdatePropertyRequest 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.admin.v1beta.UpdatePropertyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.UpdatePropertyRequest 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.admin.v1beta.UpdatePropertyRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1beta.UpdatePropertyRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1beta.UpdatePropertyRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.UpdatePropertyRequest 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.admin.v1beta.UpdatePropertyRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.UpdatePropertyRequest 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.admin.v1beta.UpdatePropertyRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1beta.UpdatePropertyRequest 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.admin.v1beta.UpdatePropertyRequest 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; + } + /** + * + * + *
+   * Request message for UpdateProperty RPC.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1beta.UpdatePropertyRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1beta.UpdatePropertyRequest) + com.google.analytics.admin.v1beta.UpdatePropertyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_UpdatePropertyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_UpdatePropertyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1beta.UpdatePropertyRequest.class, + com.google.analytics.admin.v1beta.UpdatePropertyRequest.Builder.class); + } + + // Construct using com.google.analytics.admin.v1beta.UpdatePropertyRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (propertyBuilder_ == null) { + property_ = null; + } else { + property_ = null; + propertyBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1beta.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1beta_UpdatePropertyRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.UpdatePropertyRequest getDefaultInstanceForType() { + return com.google.analytics.admin.v1beta.UpdatePropertyRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.UpdatePropertyRequest build() { + com.google.analytics.admin.v1beta.UpdatePropertyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1beta.UpdatePropertyRequest buildPartial() { + com.google.analytics.admin.v1beta.UpdatePropertyRequest result = + new com.google.analytics.admin.v1beta.UpdatePropertyRequest(this); + if (propertyBuilder_ == null) { + result.property_ = property_; + } else { + result.property_ = propertyBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + onBuilt(); + return result; + } + + @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.admin.v1beta.UpdatePropertyRequest) { + return mergeFrom((com.google.analytics.admin.v1beta.UpdatePropertyRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1beta.UpdatePropertyRequest other) { + if (other == com.google.analytics.admin.v1beta.UpdatePropertyRequest.getDefaultInstance()) + return this; + if (other.hasProperty()) { + mergeProperty(other.getProperty()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.analytics.admin.v1beta.UpdatePropertyRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1beta.UpdatePropertyRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.analytics.admin.v1beta.Property property_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.Property, + com.google.analytics.admin.v1beta.Property.Builder, + com.google.analytics.admin.v1beta.PropertyOrBuilder> + propertyBuilder_; + /** + * + * + *
+     * Required. The property to update.
+     * The property's `name` field is used to identify the property to be
+     * updated.
+     * 
+ * + * + * .google.analytics.admin.v1beta.Property property = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the property field is set. + */ + public boolean hasProperty() { + return propertyBuilder_ != null || property_ != null; + } + /** + * + * + *
+     * Required. The property to update.
+     * The property's `name` field is used to identify the property to be
+     * updated.
+     * 
+ * + * + * .google.analytics.admin.v1beta.Property property = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The property. + */ + public com.google.analytics.admin.v1beta.Property getProperty() { + if (propertyBuilder_ == null) { + return property_ == null + ? com.google.analytics.admin.v1beta.Property.getDefaultInstance() + : property_; + } else { + return propertyBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The property to update.
+     * The property's `name` field is used to identify the property to be
+     * updated.
+     * 
+ * + * + * .google.analytics.admin.v1beta.Property property = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setProperty(com.google.analytics.admin.v1beta.Property value) { + if (propertyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + property_ = value; + onChanged(); + } else { + propertyBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The property to update.
+     * The property's `name` field is used to identify the property to be
+     * updated.
+     * 
+ * + * + * .google.analytics.admin.v1beta.Property property = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setProperty(com.google.analytics.admin.v1beta.Property.Builder builderForValue) { + if (propertyBuilder_ == null) { + property_ = builderForValue.build(); + onChanged(); + } else { + propertyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The property to update.
+     * The property's `name` field is used to identify the property to be
+     * updated.
+     * 
+ * + * + * .google.analytics.admin.v1beta.Property property = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeProperty(com.google.analytics.admin.v1beta.Property value) { + if (propertyBuilder_ == null) { + if (property_ != null) { + property_ = + com.google.analytics.admin.v1beta.Property.newBuilder(property_) + .mergeFrom(value) + .buildPartial(); + } else { + property_ = value; + } + onChanged(); + } else { + propertyBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The property to update.
+     * The property's `name` field is used to identify the property to be
+     * updated.
+     * 
+ * + * + * .google.analytics.admin.v1beta.Property property = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearProperty() { + if (propertyBuilder_ == null) { + property_ = null; + onChanged(); + } else { + property_ = null; + propertyBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The property to update.
+     * The property's `name` field is used to identify the property to be
+     * updated.
+     * 
+ * + * + * .google.analytics.admin.v1beta.Property property = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.analytics.admin.v1beta.Property.Builder getPropertyBuilder() { + + onChanged(); + return getPropertyFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The property to update.
+     * The property's `name` field is used to identify the property to be
+     * updated.
+     * 
+ * + * + * .google.analytics.admin.v1beta.Property property = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.analytics.admin.v1beta.PropertyOrBuilder getPropertyOrBuilder() { + if (propertyBuilder_ != null) { + return propertyBuilder_.getMessageOrBuilder(); + } else { + return property_ == null + ? com.google.analytics.admin.v1beta.Property.getDefaultInstance() + : property_; + } + } + /** + * + * + *
+     * Required. The property to update.
+     * The property's `name` field is used to identify the property to be
+     * updated.
+     * 
+ * + * + * .google.analytics.admin.v1beta.Property property = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.Property, + com.google.analytics.admin.v1beta.Property.Builder, + com.google.analytics.admin.v1beta.PropertyOrBuilder> + getPropertyFieldBuilder() { + if (propertyBuilder_ == null) { + propertyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1beta.Property, + com.google.analytics.admin.v1beta.Property.Builder, + com.google.analytics.admin.v1beta.PropertyOrBuilder>( + getProperty(), getParentForChildren(), isClean()); + property_ = null; + } + return propertyBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Required. The list of fields to be updated. Field names must be in snake case
+     * (e.g., "field_to_update"). Omitted fields will not be updated. To replace
+     * the entire entity, use one path with the string "*" to match all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * Required. The list of fields to be updated. Field names must be in snake case
+     * (e.g., "field_to_update"). Omitted fields will not be updated. To replace
+     * the entire entity, use one path with the string "*" to match all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The list of fields to be updated. Field names must be in snake case
+     * (e.g., "field_to_update"). Omitted fields will not be updated. To replace
+     * the entire entity, use one path with the string "*" to match all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The list of fields to be updated. Field names must be in snake case
+     * (e.g., "field_to_update"). Omitted fields will not be updated. To replace
+     * the entire entity, use one path with the string "*" to match all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The list of fields to be updated. Field names must be in snake case
+     * (e.g., "field_to_update"). Omitted fields will not be updated. To replace
+     * the entire entity, use one path with the string "*" to match all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The list of fields to be updated. Field names must be in snake case
+     * (e.g., "field_to_update"). Omitted fields will not be updated. To replace
+     * the entire entity, use one path with the string "*" to match all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The list of fields to be updated. Field names must be in snake case
+     * (e.g., "field_to_update"). Omitted fields will not be updated. To replace
+     * the entire entity, use one path with the string "*" to match all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The list of fields to be updated. Field names must be in snake case
+     * (e.g., "field_to_update"). Omitted fields will not be updated. To replace
+     * the entire entity, use one path with the string "*" to match all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Required. The list of fields to be updated. Field names must be in snake case
+     * (e.g., "field_to_update"). Omitted fields will not be updated. To replace
+     * the entire entity, use one path with the string "*" to match all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @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.admin.v1beta.UpdatePropertyRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1beta.UpdatePropertyRequest) + private static final com.google.analytics.admin.v1beta.UpdatePropertyRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1beta.UpdatePropertyRequest(); + } + + public static com.google.analytics.admin.v1beta.UpdatePropertyRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdatePropertyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdatePropertyRequest(input, extensionRegistry); + } + }; + + 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.admin.v1beta.UpdatePropertyRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/UpdatePropertyRequestOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/UpdatePropertyRequestOrBuilder.java new file mode 100644 index 000000000000..ae3d95295034 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/UpdatePropertyRequestOrBuilder.java @@ -0,0 +1,116 @@ +/* + * Copyright 2020 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/admin/v1beta/analytics_admin.proto + +package com.google.analytics.admin.v1beta; + +public interface UpdatePropertyRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.UpdatePropertyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The property to update.
+   * The property's `name` field is used to identify the property to be
+   * updated.
+   * 
+ * + * + * .google.analytics.admin.v1beta.Property property = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the property field is set. + */ + boolean hasProperty(); + /** + * + * + *
+   * Required. The property to update.
+   * The property's `name` field is used to identify the property to be
+   * updated.
+   * 
+ * + * + * .google.analytics.admin.v1beta.Property property = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The property. + */ + com.google.analytics.admin.v1beta.Property getProperty(); + /** + * + * + *
+   * Required. The property to update.
+   * The property's `name` field is used to identify the property to be
+   * updated.
+   * 
+ * + * + * .google.analytics.admin.v1beta.Property property = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.analytics.admin.v1beta.PropertyOrBuilder getPropertyOrBuilder(); + + /** + * + * + *
+   * Required. The list of fields to be updated. Field names must be in snake case
+   * (e.g., "field_to_update"). Omitted fields will not be updated. To replace
+   * the entire entity, use one path with the string "*" to match all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. The list of fields to be updated. Field names must be in snake case
+   * (e.g., "field_to_update"). Omitted fields will not be updated. To replace
+   * the entire entity, use one path with the string "*" to match all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. The list of fields to be updated. Field names must be in snake case
+   * (e.g., "field_to_update"). Omitted fields will not be updated. To replace
+   * the entire entity, use one path with the string "*" to match all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/proto/google/analytics/admin/v1beta/analytics_admin.proto b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/proto/google/analytics/admin/v1beta/analytics_admin.proto new file mode 100644 index 000000000000..7e80f73628f9 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/proto/google/analytics/admin/v1beta/analytics_admin.proto @@ -0,0 +1,1333 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.analytics.admin.v1beta; + +import "google/analytics/admin/v1beta/resources.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/analytics/admin/v1beta;admin"; +option java_multiple_files = true; +option java_outer_classname = "AnalyticsAdminProto"; +option java_package = "com.google.analytics.admin.v1beta"; + +// Service Interface for the Analytics Admin API (GA4). +service AnalyticsAdminService { + option (google.api.default_host) = "analyticsadmin.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/analytics.edit," + "https://www.googleapis.com/auth/analytics.readonly"; + + // Lookup for a single Account. + rpc GetAccount(GetAccountRequest) returns (Account) { + option (google.api.http) = { + get: "/v1beta/{name=accounts/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Returns all accounts accessible by the caller. + // + // Note that these accounts might not currently have GA4 properties. + // Soft-deleted (ie: "trashed") accounts are excluded by default. + // Returns an empty list if no relevant accounts are found. + rpc ListAccounts(ListAccountsRequest) returns (ListAccountsResponse) { + option (google.api.http) = { + get: "/v1beta/accounts" + }; + } + + // Marks target Account as soft-deleted (ie: "trashed") and returns it. + // + // This API does not have a method to restore soft-deleted accounts. + // However, they can be restored using the Trash Can UI. + // + // If the accounts are not restored before the expiration time, the account + // and all child resources (eg: Properties, GoogleAdsLinks, Streams, + // UserLinks) will be permanently purged. + // https://support.google.com/analytics/answer/6154772 + // + // Returns an error if the target is not found. + rpc DeleteAccount(DeleteAccountRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta/{name=accounts/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates an account. + rpc UpdateAccount(UpdateAccountRequest) returns (Account) { + option (google.api.http) = { + patch: "/v1beta/{account.name=accounts/*}" + body: "account" + }; + option (google.api.method_signature) = "account,update_mask"; + } + + // Requests a ticket for creating an account. + rpc ProvisionAccountTicket(ProvisionAccountTicketRequest) returns (ProvisionAccountTicketResponse) { + option (google.api.http) = { + post: "/v1beta/accounts:provisionAccountTicket" + body: "*" + }; + } + + // Returns summaries of all accounts accessible by the caller. + rpc ListAccountSummaries(ListAccountSummariesRequest) returns (ListAccountSummariesResponse) { + option (google.api.http) = { + get: "/v1beta/accountSummaries" + }; + } + + // Lookup for a single "GA4" Property. + rpc GetProperty(GetPropertyRequest) returns (Property) { + option (google.api.http) = { + get: "/v1beta/{name=properties/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Returns child Properties under the specified parent Account. + // + // Only "GA4" properties will be returned. + // Properties will be excluded if the caller does not have access. + // Soft-deleted (ie: "trashed") properties are excluded by default. + // Returns an empty list if no relevant properties are found. + rpc ListProperties(ListPropertiesRequest) returns (ListPropertiesResponse) { + option (google.api.http) = { + get: "/v1beta/properties" + }; + } + + // Creates an "GA4" property with the specified location and attributes. + rpc CreateProperty(CreatePropertyRequest) returns (Property) { + option (google.api.http) = { + post: "/v1beta/properties" + body: "property" + }; + option (google.api.method_signature) = "property"; + } + + // Marks target Property as soft-deleted (ie: "trashed") and returns it. + // + // This API does not have a method to restore soft-deleted properties. + // However, they can be restored using the Trash Can UI. + // + // If the properties are not restored before the expiration time, the Property + // and all child resources (eg: GoogleAdsLinks, Streams, UserLinks) + // will be permanently purged. + // https://support.google.com/analytics/answer/6154772 + // + // Returns an error if the target is not found, or is not an GA4 Property. + rpc DeleteProperty(DeletePropertyRequest) returns (Property) { + option (google.api.http) = { + delete: "/v1beta/{name=properties/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates a property. + rpc UpdateProperty(UpdatePropertyRequest) returns (Property) { + option (google.api.http) = { + patch: "/v1beta/{property.name=properties/*}" + body: "property" + }; + option (google.api.method_signature) = "property,update_mask"; + } + + // Creates a FirebaseLink. + // + // Properties can have at most one FirebaseLink. + rpc CreateFirebaseLink(CreateFirebaseLinkRequest) returns (FirebaseLink) { + option (google.api.http) = { + post: "/v1beta/{parent=properties/*}/firebaseLinks" + body: "firebase_link" + }; + option (google.api.method_signature) = "parent,firebase_link"; + } + + // Deletes a FirebaseLink on a property + rpc DeleteFirebaseLink(DeleteFirebaseLinkRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta/{name=properties/*/firebaseLinks/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists FirebaseLinks on a property. + // Properties can have at most one FirebaseLink. + rpc ListFirebaseLinks(ListFirebaseLinksRequest) returns (ListFirebaseLinksResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=properties/*}/firebaseLinks" + }; + option (google.api.method_signature) = "parent"; + } + + // Creates a GoogleAdsLink. + rpc CreateGoogleAdsLink(CreateGoogleAdsLinkRequest) returns (GoogleAdsLink) { + option (google.api.http) = { + post: "/v1beta/{parent=properties/*}/googleAdsLinks" + body: "google_ads_link" + }; + option (google.api.method_signature) = "parent,google_ads_link"; + } + + // Updates a GoogleAdsLink on a property + rpc UpdateGoogleAdsLink(UpdateGoogleAdsLinkRequest) returns (GoogleAdsLink) { + option (google.api.http) = { + patch: "/v1beta/{google_ads_link.name=properties/*/googleAdsLinks/*}" + body: "google_ads_link" + }; + option (google.api.method_signature) = "google_ads_link,update_mask"; + } + + // Deletes a GoogleAdsLink on a property + rpc DeleteGoogleAdsLink(DeleteGoogleAdsLinkRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta/{name=properties/*/googleAdsLinks/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists GoogleAdsLinks on a property. + rpc ListGoogleAdsLinks(ListGoogleAdsLinksRequest) returns (ListGoogleAdsLinksResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=properties/*}/googleAdsLinks" + }; + option (google.api.method_signature) = "parent"; + } + + // Get data sharing settings on an account. + // Data sharing settings are singletons. + rpc GetDataSharingSettings(GetDataSharingSettingsRequest) returns (DataSharingSettings) { + option (google.api.http) = { + get: "/v1beta/{name=accounts/*/dataSharingSettings}" + }; + option (google.api.method_signature) = "name"; + } + + // Lookup for a single "GA4" MeasurementProtocolSecret. + rpc GetMeasurementProtocolSecret(GetMeasurementProtocolSecretRequest) returns (MeasurementProtocolSecret) { + option (google.api.http) = { + get: "/v1beta/{name=properties/*/dataStreams/*/measurementProtocolSecrets/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Returns child MeasurementProtocolSecrets under the specified parent + // Property. + rpc ListMeasurementProtocolSecrets(ListMeasurementProtocolSecretsRequest) returns (ListMeasurementProtocolSecretsResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=properties/*/dataStreams/*}/measurementProtocolSecrets" + }; + option (google.api.method_signature) = "parent"; + } + + // Creates a measurement protocol secret. + rpc CreateMeasurementProtocolSecret(CreateMeasurementProtocolSecretRequest) returns (MeasurementProtocolSecret) { + option (google.api.http) = { + post: "/v1beta/{parent=properties/*/dataStreams/*}/measurementProtocolSecrets" + body: "measurement_protocol_secret" + }; + option (google.api.method_signature) = "parent,measurement_protocol_secret"; + } + + // Deletes target MeasurementProtocolSecret. + rpc DeleteMeasurementProtocolSecret(DeleteMeasurementProtocolSecretRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta/{name=properties/*/dataStreams/*/measurementProtocolSecrets/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates a measurement protocol secret. + rpc UpdateMeasurementProtocolSecret(UpdateMeasurementProtocolSecretRequest) returns (MeasurementProtocolSecret) { + option (google.api.http) = { + patch: "/v1beta/{measurement_protocol_secret.name=properties/*/dataStreams/*/measurementProtocolSecrets/*}" + body: "measurement_protocol_secret" + }; + option (google.api.method_signature) = "measurement_protocol_secret,update_mask"; + } + + // Acknowledges the terms of user data collection for the specified property. + // + // This acknowledgement must be completed (either in the Google Analytics UI + // or via this API) before MeasurementProtocolSecret resources may be created. + rpc AcknowledgeUserDataCollection(AcknowledgeUserDataCollectionRequest) returns (AcknowledgeUserDataCollectionResponse) { + option (google.api.http) = { + post: "/v1beta/{property=properties/*}:acknowledgeUserDataCollection" + body: "*" + }; + } + + // Searches through all changes to an account or its children given the + // specified set of filters. + rpc SearchChangeHistoryEvents(SearchChangeHistoryEventsRequest) returns (SearchChangeHistoryEventsResponse) { + option (google.api.http) = { + post: "/v1beta/{account=accounts/*}:searchChangeHistoryEvents" + body: "*" + }; + } + + // Creates a conversion event with the specified attributes. + rpc CreateConversionEvent(CreateConversionEventRequest) returns (ConversionEvent) { + option (google.api.http) = { + post: "/v1beta/{parent=properties/*}/conversionEvents" + body: "conversion_event" + }; + option (google.api.method_signature) = "parent,conversion_event"; + } + + // Retrieve a single conversion event. + rpc GetConversionEvent(GetConversionEventRequest) returns (ConversionEvent) { + option (google.api.http) = { + get: "/v1beta/{name=properties/*/conversionEvents/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Deletes a conversion event in a property. + rpc DeleteConversionEvent(DeleteConversionEventRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta/{name=properties/*/conversionEvents/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Returns a list of conversion events in the specified parent property. + // + // Returns an empty list if no conversion events are found. + rpc ListConversionEvents(ListConversionEventsRequest) returns (ListConversionEventsResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=properties/*}/conversionEvents" + }; + option (google.api.method_signature) = "parent"; + } + + // Creates a CustomDimension. + rpc CreateCustomDimension(CreateCustomDimensionRequest) returns (CustomDimension) { + option (google.api.http) = { + post: "/v1beta/{parent=properties/*}/customDimensions" + body: "custom_dimension" + }; + option (google.api.method_signature) = "parent,custom_dimension"; + } + + // Updates a CustomDimension on a property. + rpc UpdateCustomDimension(UpdateCustomDimensionRequest) returns (CustomDimension) { + option (google.api.http) = { + patch: "/v1beta/{custom_dimension.name=properties/*/customDimensions/*}" + body: "custom_dimension" + }; + option (google.api.method_signature) = "custom_dimension,update_mask"; + } + + // Lists CustomDimensions on a property. + rpc ListCustomDimensions(ListCustomDimensionsRequest) returns (ListCustomDimensionsResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=properties/*}/customDimensions" + }; + option (google.api.method_signature) = "parent"; + } + + // Archives a CustomDimension on a property. + rpc ArchiveCustomDimension(ArchiveCustomDimensionRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1beta/{name=properties/*/customDimensions/*}:archive" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Lookup for a single CustomDimension. + rpc GetCustomDimension(GetCustomDimensionRequest) returns (CustomDimension) { + option (google.api.http) = { + get: "/v1beta/{name=properties/*/customDimensions/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a CustomMetric. + rpc CreateCustomMetric(CreateCustomMetricRequest) returns (CustomMetric) { + option (google.api.http) = { + post: "/v1beta/{parent=properties/*}/customMetrics" + body: "custom_metric" + }; + option (google.api.method_signature) = "parent,custom_metric"; + } + + // Updates a CustomMetric on a property. + rpc UpdateCustomMetric(UpdateCustomMetricRequest) returns (CustomMetric) { + option (google.api.http) = { + patch: "/v1beta/{custom_metric.name=properties/*/customMetrics/*}" + body: "custom_metric" + }; + option (google.api.method_signature) = "custom_metric,update_mask"; + } + + // Lists CustomMetrics on a property. + rpc ListCustomMetrics(ListCustomMetricsRequest) returns (ListCustomMetricsResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=properties/*}/customMetrics" + }; + option (google.api.method_signature) = "parent"; + } + + // Archives a CustomMetric on a property. + rpc ArchiveCustomMetric(ArchiveCustomMetricRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1beta/{name=properties/*/customMetrics/*}:archive" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Lookup for a single CustomMetric. + rpc GetCustomMetric(GetCustomMetricRequest) returns (CustomMetric) { + option (google.api.http) = { + get: "/v1beta/{name=properties/*/customMetrics/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Returns the singleton data retention settings for this property. + rpc GetDataRetentionSettings(GetDataRetentionSettingsRequest) returns (DataRetentionSettings) { + option (google.api.http) = { + get: "/v1beta/{name=properties/*/dataRetentionSettings}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates the singleton data retention settings for this property. + rpc UpdateDataRetentionSettings(UpdateDataRetentionSettingsRequest) returns (DataRetentionSettings) { + option (google.api.http) = { + patch: "/v1beta/{data_retention_settings.name=properties/*/dataRetentionSettings}" + body: "data_retention_settings" + }; + option (google.api.method_signature) = "data_retention_settings,update_mask"; + } + + // Creates a DataStream. + rpc CreateDataStream(CreateDataStreamRequest) returns (DataStream) { + option (google.api.http) = { + post: "/v1beta/{parent=properties/*}/dataStreams" + body: "data_stream" + }; + option (google.api.method_signature) = "parent,data_stream"; + } + + // Deletes a DataStream on a property. + rpc DeleteDataStream(DeleteDataStreamRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta/{name=properties/*/dataStreams/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates a DataStream on a property. + rpc UpdateDataStream(UpdateDataStreamRequest) returns (DataStream) { + option (google.api.http) = { + patch: "/v1beta/{data_stream.name=properties/*/dataStreams/*}" + body: "data_stream" + }; + option (google.api.method_signature) = "data_stream,update_mask"; + } + + // Lists DataStreams on a property. + rpc ListDataStreams(ListDataStreamsRequest) returns (ListDataStreamsResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=properties/*}/dataStreams" + }; + option (google.api.method_signature) = "parent"; + } + + // Lookup for a single DataStream. + rpc GetDataStream(GetDataStreamRequest) returns (DataStream) { + option (google.api.http) = { + get: "/v1beta/{name=properties/*/dataStreams/*}" + }; + option (google.api.method_signature) = "name"; + } +} + +// Request message for GetAccount RPC. +message GetAccountRequest { + // Required. The name of the account to lookup. + // Format: accounts/{account} + // Example: "accounts/100" + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/Account" + } + ]; +} + +// Request message for ListAccounts RPC. +message ListAccountsRequest { + // The maximum number of resources to return. The service may return + // fewer than this value, even if there are additional pages. + // If unspecified, at most 50 resources will be returned. + // The maximum value is 200; (higher values will be coerced to the maximum) + int32 page_size = 1; + + // A page token, received from a previous `ListAccounts` call. + // Provide this to retrieve the subsequent page. + // When paginating, all other parameters provided to `ListAccounts` must + // match the call that provided the page token. + string page_token = 2; + + // Whether to include soft-deleted (ie: "trashed") Accounts in the + // results. Accounts can be inspected to determine whether they are deleted or + // not. + bool show_deleted = 3; +} + +// Request message for ListAccounts RPC. +message ListAccountsResponse { + // Results that were accessible to the caller. + repeated Account accounts = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// Request message for DeleteAccount RPC. +message DeleteAccountRequest { + // Required. The name of the Account to soft-delete. + // Format: accounts/{account} + // Example: "accounts/100" + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/Account" + } + ]; +} + +// Request message for UpdateAccount RPC. +message UpdateAccountRequest { + // Required. The account to update. + // The account's `name` field is used to identify the account. + Account account = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of fields to be updated. Field names must be in snake case + // (e.g., "field_to_update"). Omitted fields will not be updated. To replace + // the entire entity, use one path with the string "*" to match all fields. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for ProvisionAccountTicket RPC. +message ProvisionAccountTicketRequest { + // The account to create. + Account account = 1; + + // Redirect URI where the user will be sent after accepting Terms of Service. + // Must be configured in Developers Console as a Redirect URI + string redirect_uri = 2; +} + +// Response message for ProvisionAccountTicket RPC. +message ProvisionAccountTicketResponse { + // The param to be passed in the ToS link. + string account_ticket_id = 1; +} + +// Request message for GetProperty RPC. +message GetPropertyRequest { + // Required. The name of the property to lookup. + // Format: properties/{property_id} + // Example: "properties/1000" + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/Property" + } + ]; +} + +// Request message for ListProperties RPC. +message ListPropertiesRequest { + // Required. An expression for filtering the results of the request. + // Fields eligible for filtering are: + // `parent:`(The resource name of the parent account/property) or + // `ancestor:`(The resource name of the parent account) or + // `firebase_project:`(The id or number of the linked firebase project). + // Some examples of filters: + // + // ``` + // | Filter | Description | + // |-----------------------------|-------------------------------------------| + // | parent:accounts/123 | The account with account id: 123. | + // | parent:properties/123 | The property with property id: 123. | + // | ancestor:accounts/123 | The account with account id: 123. | + // | firebase_project:project-id | The firebase project with id: project-id. | + // | firebase_project:123 | The firebase project with number: 123. | + // ``` + string filter = 1 [(google.api.field_behavior) = REQUIRED]; + + // The maximum number of resources to return. The service may return + // fewer than this value, even if there are additional pages. + // If unspecified, at most 50 resources will be returned. + // The maximum value is 200; (higher values will be coerced to the maximum) + int32 page_size = 2; + + // A page token, received from a previous `ListProperties` call. + // Provide this to retrieve the subsequent page. + // When paginating, all other parameters provided to `ListProperties` must + // match the call that provided the page token. + string page_token = 3; + + // Whether to include soft-deleted (ie: "trashed") Properties in the + // results. Properties can be inspected to determine whether they are deleted + // or not. + bool show_deleted = 4; +} + +// Response message for ListProperties RPC. +message ListPropertiesResponse { + // Results that matched the filter criteria and were accessible to the caller. + repeated Property properties = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// Request message for UpdateProperty RPC. +message UpdatePropertyRequest { + // Required. The property to update. + // The property's `name` field is used to identify the property to be + // updated. + Property property = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of fields to be updated. Field names must be in snake case + // (e.g., "field_to_update"). Omitted fields will not be updated. To replace + // the entire entity, use one path with the string "*" to match all fields. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for CreateProperty RPC. +message CreatePropertyRequest { + // Required. The property to create. + // Note: the supplied property must specify its parent. + Property property = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for DeleteProperty RPC. +message DeletePropertyRequest { + // Required. The name of the Property to soft-delete. + // Format: properties/{property_id} + // Example: "properties/1000" + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/Property" + } + ]; +} + +// Request message for CreateFirebaseLink RPC +message CreateFirebaseLinkRequest { + // Required. Format: properties/{property_id} + // Example: properties/1234 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/FirebaseLink" + } + ]; + + // Required. The Firebase link to create. + FirebaseLink firebase_link = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for DeleteFirebaseLink RPC +message DeleteFirebaseLinkRequest { + // Required. Format: properties/{property_id}/firebaseLinks/{firebase_link_id} + // Example: properties/1234/firebaseLinks/5678 + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/FirebaseLink" + } + ]; +} + +// Request message for ListFirebaseLinks RPC +message ListFirebaseLinksRequest { + // Required. Format: properties/{property_id} + // Example: properties/1234 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/FirebaseLink" + } + ]; + + // The maximum number of resources to return. The service may return + // fewer than this value, even if there are additional pages. + // If unspecified, at most 50 resources will be returned. + // The maximum value is 200; (higher values will be coerced to the maximum) + int32 page_size = 2; + + // A page token, received from a previous `ListFirebaseLinks` call. + // Provide this to retrieve the subsequent page. + // When paginating, all other parameters provided to `ListProperties` must + // match the call that provided the page token. + string page_token = 3; +} + +// Response message for ListFirebaseLinks RPC +message ListFirebaseLinksResponse { + // List of FirebaseLinks. This will have at most one value. + repeated FirebaseLink firebase_links = 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. + // Currently, Google Analytics supports only one FirebaseLink per property, + // so this will never be populated. + string next_page_token = 2; +} + +// Request message for CreateGoogleAdsLink RPC +message CreateGoogleAdsLinkRequest { + // Required. Example format: properties/1234 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/GoogleAdsLink" + } + ]; + + // Required. The GoogleAdsLink to create. + GoogleAdsLink google_ads_link = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for UpdateGoogleAdsLink RPC +message UpdateGoogleAdsLinkRequest { + // The GoogleAdsLink to update + GoogleAdsLink google_ads_link = 1; + + // Required. The list of fields to be updated. Field names must be in snake case + // (e.g., "field_to_update"). Omitted fields will not be updated. To replace + // the entire entity, use one path with the string "*" to match all fields. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for DeleteGoogleAdsLink RPC. +message DeleteGoogleAdsLinkRequest { + // Required. Example format: properties/1234/googleAdsLinks/5678 + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/GoogleAdsLink" + } + ]; +} + +// Request message for ListGoogleAdsLinks RPC. +message ListGoogleAdsLinksRequest { + // Required. Example format: properties/1234 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/GoogleAdsLink" + } + ]; + + // The maximum number of resources to return. + // If unspecified, at most 50 resources will be returned. + // The maximum value is 200 (higher values will be coerced to the maximum). + int32 page_size = 2; + + // A page token, received from a previous `ListGoogleAdsLinks` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListGoogleAdsLinks` must + // match the call that provided the page token. + string page_token = 3; +} + +// Response message for ListGoogleAdsLinks RPC. +message ListGoogleAdsLinksResponse { + // List of GoogleAdsLinks. + repeated GoogleAdsLink google_ads_links = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// Request message for GetDataSharingSettings RPC. +message GetDataSharingSettingsRequest { + // Required. The name of the settings to lookup. + // Format: accounts/{account}/dataSharingSettings + // Example: "accounts/1000/dataSharingSettings" + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/DataSharingSettings" + } + ]; +} + +// Request message for ListAccountSummaries RPC. +message ListAccountSummariesRequest { + // The maximum number of AccountSummary resources to return. The service may + // return fewer than this value, even if there are additional pages. + // If unspecified, at most 50 resources will be returned. + // The maximum value is 200; (higher values will be coerced to the maximum) + int32 page_size = 1; + + // A page token, received from a previous `ListAccountSummaries` call. + // Provide this to retrieve the subsequent page. + // When paginating, all other parameters provided to `ListAccountSummaries` + // must match the call that provided the page token. + string page_token = 2; +} + +// Response message for ListAccountSummaries RPC. +message ListAccountSummariesResponse { + // Account summaries of all accounts the caller has access to. + repeated AccountSummary account_summaries = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// Request message for AcknowledgeUserDataCollection RPC. +message AcknowledgeUserDataCollectionRequest { + // Required. The property for which to acknowledge user data collection. + string property = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/Property" + } + ]; + + // Required. An acknowledgement that the caller of this method understands the terms + // of user data collection. + // + // This field must contain the exact value: + // "I acknowledge that I have the necessary privacy disclosures and rights + // from my end users for the collection and processing of their data, + // including the association of such data with the visitation information + // Google Analytics collects from my site and/or app property." + string acknowledgement = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for AcknowledgeUserDataCollection RPC. +message AcknowledgeUserDataCollectionResponse { + +} + +// Request message for SearchChangeHistoryEvents RPC. +message SearchChangeHistoryEventsRequest { + // Required. The account resource for which to return change history resources. + string account = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/Account" + } + ]; + + // Optional. Resource name for a child property. If set, only return changes + // made to this property or its child resources. + string property = 2 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/Property" + } + ]; + + // Optional. If set, only return changes if they are for a resource that matches at + // least one of these types. + repeated ChangeHistoryResourceType resource_type = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set, only return changes that match one or more of these types of + // actions. + repeated ActionType action = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set, only return changes if they are made by a user in this list. + repeated string actor_email = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set, only return changes made after this time (inclusive). + google.protobuf.Timestamp earliest_change_time = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set, only return changes made before this time (inclusive). + google.protobuf.Timestamp latest_change_time = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The maximum number of ChangeHistoryEvent items to return. + // The service may return fewer than this value, even if there are additional + // pages. If unspecified, at most 50 items will be returned. + // The maximum value is 200 (higher values will be coerced to the maximum). + int32 page_size = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `SearchChangeHistoryEvents` call. + // Provide this to retrieve the subsequent page. When paginating, all other + // parameters provided to `SearchChangeHistoryEvents` must match the call that + // provided the page token. + string page_token = 9 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for SearchAccounts RPC. +message SearchChangeHistoryEventsResponse { + // Results that were accessible to the caller. + repeated ChangeHistoryEvent change_history_events = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// Request message for GetMeasurementProtocolSecret RPC. +message GetMeasurementProtocolSecretRequest { + // Required. The name of the measurement protocol secret to lookup. + // Format: + // properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/MeasurementProtocolSecret" + } + ]; +} + +// Request message for CreateMeasurementProtocolSecret RPC +message CreateMeasurementProtocolSecretRequest { + // Required. The parent resource where this secret will be created. + // Format: properties/{property}/dataStreams/{dataStream} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/MeasurementProtocolSecret" + } + ]; + + // Required. The measurement protocol secret to create. + MeasurementProtocolSecret measurement_protocol_secret = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for DeleteMeasurementProtocolSecret RPC +message DeleteMeasurementProtocolSecretRequest { + // Required. The name of the MeasurementProtocolSecret to delete. + // Format: + // properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/MeasurementProtocolSecret" + } + ]; +} + +// Request message for UpdateMeasurementProtocolSecret RPC +message UpdateMeasurementProtocolSecretRequest { + // Required. The measurement protocol secret to update. + MeasurementProtocolSecret measurement_protocol_secret = 1 [(google.api.field_behavior) = REQUIRED]; + + // The list of fields to be updated. Omitted fields will not be updated. + google.protobuf.FieldMask update_mask = 2; +} + +// Request message for ListMeasurementProtocolSecret RPC +message ListMeasurementProtocolSecretsRequest { + // Required. The resource name of the parent stream. + // Format: + // properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/MeasurementProtocolSecret" + } + ]; + + // The maximum number of resources to return. + // If unspecified, at most 10 resources will be returned. + // The maximum value is 10. Higher values will be coerced to the maximum. + int32 page_size = 2; + + // A page token, received from a previous `ListMeasurementProtocolSecrets` + // call. Provide this to retrieve the subsequent page. When paginating, all + // other parameters provided to `ListMeasurementProtocolSecrets` must match + // the call that provided the page token. + string page_token = 3; +} + +// Response message for ListMeasurementProtocolSecret RPC +message ListMeasurementProtocolSecretsResponse { + // A list of secrets for the parent stream specified in the request. + repeated MeasurementProtocolSecret measurement_protocol_secrets = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// Request message for CreateConversionEvent RPC +message CreateConversionEventRequest { + // Required. The conversion event to create. + ConversionEvent conversion_event = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The resource name of the parent property where this conversion event will + // be created. Format: properties/123 + string parent = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/ConversionEvent" + } + ]; +} + +// Request message for GetConversionEvent RPC +message GetConversionEventRequest { + // Required. The resource name of the conversion event to retrieve. + // Format: properties/{property}/conversionEvents/{conversion_event} + // Example: "properties/123/conversionEvents/456" + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/ConversionEvent" + } + ]; +} + +// Request message for DeleteConversionEvent RPC +message DeleteConversionEventRequest { + // Required. The resource name of the conversion event to delete. + // Format: properties/{property}/conversionEvents/{conversion_event} + // Example: "properties/123/conversionEvents/456" + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/ConversionEvent" + } + ]; +} + +// Request message for ListConversionEvents RPC +message ListConversionEventsRequest { + // Required. The resource name of the parent property. + // Example: 'properties/123' + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/ConversionEvent" + } + ]; + + // The maximum number of resources to return. + // If unspecified, at most 50 resources will be returned. + // The maximum value is 200; (higher values will be coerced to the maximum) + int32 page_size = 2; + + // A page token, received from a previous `ListConversionEvents` call. + // Provide this to retrieve the subsequent page. + // When paginating, all other parameters provided to `ListConversionEvents` + // must match the call that provided the page token. + string page_token = 3; +} + +// Response message for ListConversionEvents RPC. +message ListConversionEventsResponse { + // The requested conversion events + repeated ConversionEvent conversion_events = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// Request message for CreateCustomDimension RPC. +message CreateCustomDimensionRequest { + // Required. Example format: properties/1234 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/CustomDimension" + } + ]; + + // Required. The CustomDimension to create. + CustomDimension custom_dimension = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for UpdateCustomDimension RPC. +message UpdateCustomDimensionRequest { + // The CustomDimension to update + CustomDimension custom_dimension = 1; + + // Required. The list of fields to be updated. Omitted fields will not be updated. + // To replace the entire entity, use one path with the string "*" to match + // all fields. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for ListCustomDimensions RPC. +message ListCustomDimensionsRequest { + // Required. Example format: properties/1234 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/CustomDimension" + } + ]; + + // The maximum number of resources to return. + // If unspecified, at most 50 resources will be returned. + // The maximum value is 200 (higher values will be coerced to the maximum). + int32 page_size = 2; + + // A page token, received from a previous `ListCustomDimensions` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListCustomDimensions` + // must match the call that provided the page token. + string page_token = 3; +} + +// Response message for ListCustomDimensions RPC. +message ListCustomDimensionsResponse { + // List of CustomDimensions. + repeated CustomDimension custom_dimensions = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// Request message for ArchiveCustomDimension RPC. +message ArchiveCustomDimensionRequest { + // Required. The name of the CustomDimension to archive. + // Example format: properties/1234/customDimensions/5678 + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/CustomDimension" + } + ]; +} + +// Request message for GetCustomDimension RPC. +message GetCustomDimensionRequest { + // Required. The name of the CustomDimension to get. + // Example format: properties/1234/customDimensions/5678 + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/CustomDimension" + } + ]; +} + +// Request message for CreateCustomMetric RPC. +message CreateCustomMetricRequest { + // Required. Example format: properties/1234 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/CustomMetric" + } + ]; + + // Required. The CustomMetric to create. + CustomMetric custom_metric = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for UpdateCustomMetric RPC. +message UpdateCustomMetricRequest { + // The CustomMetric to update + CustomMetric custom_metric = 1; + + // Required. The list of fields to be updated. Omitted fields will not be updated. + // To replace the entire entity, use one path with the string "*" to match + // all fields. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for ListCustomMetrics RPC. +message ListCustomMetricsRequest { + // Required. Example format: properties/1234 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/CustomMetric" + } + ]; + + // The maximum number of resources to return. + // If unspecified, at most 50 resources will be returned. + // The maximum value is 200 (higher values will be coerced to the maximum). + int32 page_size = 2; + + // A page token, received from a previous `ListCustomMetrics` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListCustomMetrics` must + // match the call that provided the page token. + string page_token = 3; +} + +// Response message for ListCustomMetrics RPC. +message ListCustomMetricsResponse { + // List of CustomMetrics. + repeated CustomMetric custom_metrics = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// Request message for ArchiveCustomMetric RPC. +message ArchiveCustomMetricRequest { + // Required. The name of the CustomMetric to archive. + // Example format: properties/1234/customMetrics/5678 + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/CustomMetric" + } + ]; +} + +// Request message for GetCustomMetric RPC. +message GetCustomMetricRequest { + // Required. The name of the CustomMetric to get. + // Example format: properties/1234/customMetrics/5678 + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/CustomMetric" + } + ]; +} + +// Request message for GetDataRetentionSettings RPC. +message GetDataRetentionSettingsRequest { + // Required. The name of the settings to lookup. + // Format: + // properties/{property}/dataRetentionSettings + // Example: "properties/1000/dataRetentionSettings" + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/DataRetentionSettings" + } + ]; +} + +// Request message for UpdateDataRetentionSettings RPC. +message UpdateDataRetentionSettingsRequest { + // Required. The settings to update. + // The `name` field is used to identify the settings to be updated. + DataRetentionSettings data_retention_settings = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of fields to be updated. Field names must be in snake case + // (e.g., "field_to_update"). Omitted fields will not be updated. To replace + // the entire entity, use one path with the string "*" to match all fields. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for CreateDataStream RPC. +message CreateDataStreamRequest { + // Required. Example format: properties/1234 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/DataStream" + } + ]; + + // Required. The DataStream to create. + DataStream data_stream = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for DeleteDataStream RPC. +message DeleteDataStreamRequest { + // Required. The name of the DataStream to delete. + // Example format: properties/1234/dataStreams/5678 + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/DataStream" + } + ]; +} + +// Request message for UpdateDataStream RPC. +message UpdateDataStreamRequest { + // The DataStream to update + DataStream data_stream = 1; + + // Required. The list of fields to be updated. Omitted fields will not be updated. + // To replace the entire entity, use one path with the string "*" to match + // all fields. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for ListDataStreams RPC. +message ListDataStreamsRequest { + // Required. Example format: properties/1234 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/DataStream" + } + ]; + + // The maximum number of resources to return. + // If unspecified, at most 50 resources will be returned. + // The maximum value is 200 (higher values will be coerced to the maximum). + int32 page_size = 2; + + // A page token, received from a previous `ListDataStreams` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListDataStreams` must + // match the call that provided the page token. + string page_token = 3; +} + +// Response message for ListDataStreams RPC. +message ListDataStreamsResponse { + // List of DataStreams. + repeated DataStream data_streams = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// Request message for GetDataStream RPC. +message GetDataStreamRequest { + // Required. The name of the DataStream to get. + // Example format: properties/1234/dataStreams/5678 + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/DataStream" + } + ]; +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/proto/google/analytics/admin/v1beta/resources.proto b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/proto/google/analytics/admin/v1beta/resources.proto new file mode 100644 index 000000000000..2a7010305a22 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/proto/google/analytics/admin/v1beta/resources.proto @@ -0,0 +1,905 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.analytics.admin.v1beta; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; + +option go_package = "google.golang.org/genproto/googleapis/analytics/admin/v1beta;admin"; +option java_multiple_files = true; +option java_outer_classname = "ResourcesProto"; +option java_package = "com.google.analytics.admin.v1beta"; + +// The category selected for this property, used for industry benchmarking. +enum IndustryCategory { + // Industry category unspecified + INDUSTRY_CATEGORY_UNSPECIFIED = 0; + + // Automotive + AUTOMOTIVE = 1; + + // Business and industrial markets + BUSINESS_AND_INDUSTRIAL_MARKETS = 2; + + // Finance + FINANCE = 3; + + // Healthcare + HEALTHCARE = 4; + + // Technology + TECHNOLOGY = 5; + + // Travel + TRAVEL = 6; + + // Other + OTHER = 7; + + // Arts and entertainment + ARTS_AND_ENTERTAINMENT = 8; + + // Beauty and fitness + BEAUTY_AND_FITNESS = 9; + + // Books and literature + BOOKS_AND_LITERATURE = 10; + + // Food and drink + FOOD_AND_DRINK = 11; + + // Games + GAMES = 12; + + // Hobbies and leisure + HOBBIES_AND_LEISURE = 13; + + // Home and garden + HOME_AND_GARDEN = 14; + + // Internet and telecom + INTERNET_AND_TELECOM = 15; + + // Law and government + LAW_AND_GOVERNMENT = 16; + + // News + NEWS = 17; + + // Online communities + ONLINE_COMMUNITIES = 18; + + // People and society + PEOPLE_AND_SOCIETY = 19; + + // Pets and animals + PETS_AND_ANIMALS = 20; + + // Real estate + REAL_ESTATE = 21; + + // Reference + REFERENCE = 22; + + // Science + SCIENCE = 23; + + // Sports + SPORTS = 24; + + // Jobs and education + JOBS_AND_EDUCATION = 25; + + // Shopping + SHOPPING = 26; +} + +// Various levels of service for Google Analytics. +enum ServiceLevel { + // Service level not specified or invalid. + SERVICE_LEVEL_UNSPECIFIED = 0; + + // The standard version of Google Analytics. + GOOGLE_ANALYTICS_STANDARD = 1; + + // The paid, premium version of Google Analytics. + GOOGLE_ANALYTICS_360 = 2; +} + +// Different kinds of actors that can make changes to Google Analytics +// resources. +enum ActorType { + // Unknown or unspecified actor type. + ACTOR_TYPE_UNSPECIFIED = 0; + + // Changes made by the user specified in actor_email. + USER = 1; + + // Changes made by the Google Analytics system. + SYSTEM = 2; + + // Changes made by Google Analytics support team staff. + SUPPORT = 3; +} + +// Types of actions that may change a resource. +enum ActionType { + // Action type unknown or not specified. + ACTION_TYPE_UNSPECIFIED = 0; + + // Resource was created in this change. + CREATED = 1; + + // Resource was updated in this change. + UPDATED = 2; + + // Resource was deleted in this change. + DELETED = 3; +} + +// Types of resources whose changes may be returned from change history. +enum ChangeHistoryResourceType { + // Resource type unknown or not specified. + CHANGE_HISTORY_RESOURCE_TYPE_UNSPECIFIED = 0; + + // Account resource + ACCOUNT = 1; + + // Property resource + PROPERTY = 2; + + // FirebaseLink resource + FIREBASE_LINK = 6; + + // GoogleAdsLink resource + GOOGLE_ADS_LINK = 7; + + // GoogleSignalsSettings resource + GOOGLE_SIGNALS_SETTINGS = 8; + + // ConversionEvent resource + CONVERSION_EVENT = 9; + + // MeasurementProtocolSecret resource + MEASUREMENT_PROTOCOL_SECRET = 10; + + // DataRetentionSettings resource + DATA_RETENTION_SETTINGS = 13; + + // DisplayVideo360AdvertiserLink resource + DISPLAY_VIDEO_360_ADVERTISER_LINK = 14; + + // DisplayVideo360AdvertiserLinkProposal resource + DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL = 15; + + // DataStream resource + DATA_STREAM = 18; + + // AttributionSettings resource + ATTRIBUTION_SETTINGS = 20; +} + +// Types of Property resources. +enum PropertyType { + // Unknown or unspecified property type + PROPERTY_TYPE_UNSPECIFIED = 0; + + // Ordinary GA4 property + PROPERTY_TYPE_ORDINARY = 1; + + // GA4 subproperty + PROPERTY_TYPE_SUBPROPERTY = 2; + + // GA4 rollup property + PROPERTY_TYPE_ROLLUP = 3; +} + +// A resource message representing a Google Analytics account. +message Account { + option (google.api.resource) = { + type: "analyticsadmin.googleapis.com/Account" + pattern: "accounts/{account}" + }; + + // Output only. Resource name of this account. + // Format: accounts/{account} + // Example: "accounts/100" + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when this account was originally created. + google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when account payload fields were last updated. + google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Human-readable display name for this account. + string display_name = 4 [(google.api.field_behavior) = REQUIRED]; + + // Country of business. Must be a Unicode CLDR region code. + string region_code = 5; + + // Output only. Indicates whether this Account is soft-deleted or not. Deleted + // accounts are excluded from List results unless specifically requested. + bool deleted = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A resource message representing a Google Analytics GA4 property. +message Property { + option (google.api.resource) = { + type: "analyticsadmin.googleapis.com/Property" + pattern: "properties/{property}" + }; + + // Output only. Resource name of this property. + // Format: properties/{property_id} + // Example: "properties/1000" + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. The property type for this Property resource. When creating a property, if + // the type is "PROPERTY_TYPE_UNSPECIFIED", then "ORDINARY_PROPERTY" will be + // implied. "SUBPROPERTY" and "ROLLUP_PROPERTY" types cannot yet be created + // via Google Analytics Admin API. + PropertyType property_type = 14 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. Time when the entity was originally created. + google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when entity payload fields were last updated. + google.protobuf.Timestamp update_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. Resource name of this property's logical parent. + // + // Note: The Property-Moving UI can be used to change the parent. + // Format: accounts/{account}, properties/{property} + // Example: "accounts/100", "properties/101" + string parent = 2 [(google.api.field_behavior) = IMMUTABLE]; + + // Required. Human-readable display name for this property. + // + // The max allowed display name length is 100 UTF-16 code units. + string display_name = 5 [(google.api.field_behavior) = REQUIRED]; + + // Industry associated with this property + // Example: AUTOMOTIVE, FOOD_AND_DRINK + IndustryCategory industry_category = 6; + + // Required. Reporting Time Zone, used as the day boundary for reports, regardless of + // where the data originates. If the time zone honors DST, Analytics will + // automatically adjust for the changes. + // + // NOTE: Changing the time zone only affects data going forward, and is not + // applied retroactively. + // + // Format: https://www.iana.org/time-zones + // Example: "America/Los_Angeles" + string time_zone = 7 [(google.api.field_behavior) = REQUIRED]; + + // The currency type used in reports involving monetary values. + // + // + // Format: https://en.wikipedia.org/wiki/ISO_4217 + // Examples: "USD", "EUR", "JPY" + string currency_code = 8; + + // Output only. The Google Analytics service level that applies to this property. + ServiceLevel service_level = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. If set, the time at which this property was trashed. If not set, then this + // property is not currently in the trash can. + google.protobuf.Timestamp delete_time = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. If set, the time at which this trashed property will be permanently + // deleted. If not set, then this property is not currently in the trash can + // and is not slated to be deleted. + google.protobuf.Timestamp expire_time = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. The resource name of the parent account + // Format: accounts/{account_id} + // Example: "accounts/123" + string account = 13 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/Account" + } + ]; +} + +// A resource message representing a data stream. +message DataStream { + option (google.api.resource) = { + type: "analyticsadmin.googleapis.com/DataStream" + pattern: "properties/{property}/dataStreams/{data_stream}" + }; + + // Data specific to web streams. + message WebStreamData { + // Output only. Analytics "Measurement ID", without the "G-" prefix. + // Example: "G-1A2BCD345E" would just be "1A2BCD345E" + string measurement_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. ID of the corresponding web app in Firebase, if any. + // This ID can change if the web app is deleted and recreated. + string firebase_app_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. Domain name of the web app being measured, or empty. + // Example: "http://www.google.com", "https://www.google.com" + string default_uri = 3 [(google.api.field_behavior) = IMMUTABLE]; + } + + // Data specific to Android app streams. + message AndroidAppStreamData { + // Output only. ID of the corresponding Android app in Firebase, if any. + // This ID can change if the Android app is deleted and recreated. + string firebase_app_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. The package name for the app being measured. + // Example: "com.example.myandroidapp" + string package_name = 2 [(google.api.field_behavior) = IMMUTABLE]; + } + + // Data specific to iOS app streams. + message IosAppStreamData { + // Output only. ID of the corresponding iOS app in Firebase, if any. + // This ID can change if the iOS app is deleted and recreated. + string firebase_app_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Immutable. The Apple App Store Bundle ID for the app + // Example: "com.example.myiosapp" + string bundle_id = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = REQUIRED + ]; + } + + // The type of the data stream. + enum DataStreamType { + // Type unknown or not specified. + DATA_STREAM_TYPE_UNSPECIFIED = 0; + + // Web data stream. + WEB_DATA_STREAM = 1; + + // Android app data stream. + ANDROID_APP_DATA_STREAM = 2; + + // iOS app data stream. + IOS_APP_DATA_STREAM = 3; + } + + // Data for specific data stream types. The message that will be + // set corresponds to the type of this stream. + oneof stream_data { + // Data specific to web streams. Must be populated if type is + // WEB_DATA_STREAM. + WebStreamData web_stream_data = 6; + + // Data specific to Android app streams. Must be populated if type is + // ANDROID_APP_DATA_STREAM. + AndroidAppStreamData android_app_stream_data = 7; + + // Data specific to iOS app streams. Must be populated if type is + // IOS_APP_DATA_STREAM. + IosAppStreamData ios_app_stream_data = 8; + } + + // Output only. Resource name of this Data Stream. + // Format: properties/{property_id}/dataStreams/{stream_id} + // Example: "properties/1000/dataStreams/2000" + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Immutable. The type of this DataStream resource. + DataStreamType type = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = REQUIRED + ]; + + // Human-readable display name for the Data Stream. + // + // Required for web data streams. + // + // The max allowed display name length is 255 UTF-16 code units. + string display_name = 3; + + // Output only. Time when this stream was originally created. + google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when stream payload fields were last updated. + google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A link between a GA4 property and a Firebase project. +message FirebaseLink { + option (google.api.resource) = { + type: "analyticsadmin.googleapis.com/FirebaseLink" + pattern: "properties/{property}/firebaseLinks/{firebase_link}" + }; + + // Output only. Example format: properties/1234/firebaseLinks/5678 + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. Firebase project resource name. When creating a FirebaseLink, you may + // provide this resource name using either a project number or project ID. + // Once this resource has been created, returned FirebaseLinks will always + // have a project_name that contains a project number. + // + // Format: 'projects/{project number}' + // Example: 'projects/1234' + string project = 2 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. Time when this FirebaseLink was originally created. + google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A link between a GA4 property and a Google Ads account. +message GoogleAdsLink { + option (google.api.resource) = { + type: "analyticsadmin.googleapis.com/GoogleAdsLink" + pattern: "properties/{property}/googleAdsLinks/{google_ads_link}" + }; + + // Output only. Format: properties/{propertyId}/googleAdsLinks/{googleAdsLinkId} + // + // Note: googleAdsLinkId is not the Google Ads customer ID. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. Google Ads customer ID. + string customer_id = 3 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. If true, this link is for a Google Ads manager account. + bool can_manage_clients = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Enable personalized advertising features with this integration. + // Automatically publish my Google Analytics audience lists and Google + // Analytics remarketing events/parameters to the linked Google Ads account. + // If this field is not set on create/update, it will be defaulted to true. + google.protobuf.BoolValue ads_personalization_enabled = 5; + + // Output only. Time when this link was originally created. + google.protobuf.Timestamp create_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when this link was last updated. + google.protobuf.Timestamp update_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Email address of the user that created the link. + // An empty string will be returned if the email address can't be retrieved. + string creator_email_address = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A resource message representing data sharing settings of a Google Analytics +// account. +message DataSharingSettings { + option (google.api.resource) = { + type: "analyticsadmin.googleapis.com/DataSharingSettings" + pattern: "accounts/{account}/dataSharingSettings" + }; + + // Output only. Resource name. + // Format: accounts/{account}/dataSharingSettings + // Example: "accounts/1000/dataSharingSettings" + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Allows Google support to access the data in order to help troubleshoot + // issues. + bool sharing_with_google_support_enabled = 2; + + // Allows Google sales teams that are assigned to the customer to access the + // data in order to suggest configuration changes to improve results. + // Sales team restrictions still apply when enabled. + bool sharing_with_google_assigned_sales_enabled = 3; + + // Allows any of Google sales to access the data in order to suggest + // configuration changes to improve results. + bool sharing_with_google_any_sales_enabled = 4; + + // Allows Google to use the data to improve other Google products or services. + bool sharing_with_google_products_enabled = 5; + + // Allows Google to share the data anonymously in aggregate form with others. + bool sharing_with_others_enabled = 6; +} + +// A virtual resource representing an overview of an account and +// all its child GA4 properties. +message AccountSummary { + option (google.api.resource) = { + type: "analyticsadmin.googleapis.com/AccountSummary" + pattern: "accountSummaries/{account_summary}" + }; + + // Resource name for this account summary. + // Format: accountSummaries/{account_id} + // Example: "accountSummaries/1000" + string name = 1; + + // Resource name of account referred to by this account summary + // Format: accounts/{account_id} + // Example: "accounts/1000" + string account = 2 [(google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/Account" + }]; + + // Display name for the account referred to in this account summary. + string display_name = 3; + + // List of summaries for child accounts of this account. + repeated PropertySummary property_summaries = 4; +} + +// A virtual resource representing metadata for a GA4 property. +message PropertySummary { + // Resource name of property referred to by this property summary + // Format: properties/{property_id} + // Example: "properties/1000" + string property = 1 [(google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/Property" + }]; + + // Display name for the property referred to in this property summary. + string display_name = 2; + + // The property's property type. + PropertyType property_type = 3; + + // Resource name of this property's logical parent. + // + // Note: The Property-Moving UI can be used to change the parent. + // Format: accounts/{account}, properties/{property} + // Example: "accounts/100", "properties/200" + string parent = 4; +} + +// A secret value used for sending hits to Measurement Protocol. +message MeasurementProtocolSecret { + option (google.api.resource) = { + type: "analyticsadmin.googleapis.com/MeasurementProtocolSecret" + pattern: "properties/{property}/dataStreams/{data_stream}/measurementProtocolSecrets/{measurement_protocol_secret}" + }; + + // Output only. Resource name of this secret. This secret may be a child of any type of + // stream. + // Format: + // properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret} + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Human-readable display name for this secret. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Output only. The measurement protocol secret value. Pass this value to the api_secret + // field of the Measurement Protocol API when sending hits to this + // secret's parent property. + string secret_value = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A set of changes within a Google Analytics account or its child properties +// that resulted from the same cause. Common causes would be updates made in the +// Google Analytics UI, changes from customer support, or automatic Google +// Analytics system changes. +message ChangeHistoryEvent { + // ID of this change history event. This ID is unique across Google Analytics. + string id = 1; + + // Time when change was made. + google.protobuf.Timestamp change_time = 2; + + // The type of actor that made this change. + ActorType actor_type = 3; + + // Email address of the Google account that made the change. This will be a + // valid email address if the actor field is set to USER, and empty otherwise. + // Google accounts that have been deleted will cause an error. + string user_actor_email = 4; + + // If true, then the list of changes returned was filtered, and does not + // represent all changes that occurred in this event. + bool changes_filtered = 5; + + // A list of changes made in this change history event that fit the filters + // specified in SearchChangeHistoryEventsRequest. + repeated ChangeHistoryChange changes = 6; +} + +// A description of a change to a single Google Analytics resource. +message ChangeHistoryChange { + // A snapshot of a resource as before or after the result of a change in + // change history. + message ChangeHistoryResource { + oneof resource { + // A snapshot of an Account resource in change history. + Account account = 1; + + // A snapshot of a Property resource in change history. + Property property = 2; + + // A snapshot of a FirebaseLink resource in change history. + FirebaseLink firebase_link = 6; + + // A snapshot of a GoogleAdsLink resource in change history. + GoogleAdsLink google_ads_link = 7; + + // A snapshot of a ConversionEvent resource in change history. + ConversionEvent conversion_event = 11; + + // A snapshot of a MeasurementProtocolSecret resource in change history. + MeasurementProtocolSecret measurement_protocol_secret = 12; + + // A snapshot of a data retention settings resource in change history. + DataRetentionSettings data_retention_settings = 15; + + // A snapshot of a DataStream resource in change history. + DataStream data_stream = 18; + } + } + + // Resource name of the resource whose changes are described by this entry. + string resource = 1; + + // The type of action that changed this resource. + ActionType action = 2; + + // Resource contents from before the change was made. If this resource was + // created in this change, this field will be missing. + ChangeHistoryResource resource_before_change = 3; + + // Resource contents from after the change was made. If this resource was + // deleted in this change, this field will be missing. + ChangeHistoryResource resource_after_change = 4; +} + +// A conversion event in a Google Analytics property. +message ConversionEvent { + option (google.api.resource) = { + type: "analyticsadmin.googleapis.com/ConversionEvent" + pattern: "properties/{property}/conversionEvents/{conversion_event}" + }; + + // Output only. Resource name of this conversion event. + // Format: properties/{property}/conversionEvents/{conversion_event} + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. The event name for this conversion event. + // Examples: 'click', 'purchase' + string event_name = 2 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. Time when this conversion event was created in the property. + google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. If set, this event can currently be deleted via DeleteConversionEvent. + bool deletable = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. If set to true, this conversion event refers to a custom event. If set to + // false, this conversion event refers to a default event in GA. Default + // events typically have special meaning in GA. Default events are usually + // created for you by the GA system, but in some cases can be created by + // property admins. Custom events count towards the maximum number of + // custom conversion events that may be created per property. + bool custom = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A definition for a CustomDimension. +message CustomDimension { + option (google.api.resource) = { + type: "analyticsadmin.googleapis.com/CustomDimension" + pattern: "properties/{property}/customDimensions/{custom_dimension}" + }; + + // Valid values for the scope of this dimension. + enum DimensionScope { + // Scope unknown or not specified. + DIMENSION_SCOPE_UNSPECIFIED = 0; + + // Dimension scoped to an event. + EVENT = 1; + + // Dimension scoped to a user. + USER = 2; + } + + // Output only. Resource name for this CustomDimension resource. + // Format: properties/{property}/customDimensions/{customDimension} + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Immutable. Tagging parameter name for this custom dimension. + // + // If this is a user-scoped dimension, then this is the user property name. + // If this is an event-scoped dimension, then this is the event parameter + // name. + // + // May only contain alphanumeric and underscore characters, starting with a + // letter. Max length of 24 characters for user-scoped dimensions, 40 + // characters for event-scoped dimensions. + string parameter_name = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Required. Display name for this custom dimension as shown in the Analytics UI. + // Max length of 82 characters, alphanumeric plus space and underscore + // starting with a letter. Legacy system-generated display names may contain + // square brackets, but updates to this field will never permit square + // brackets. + string display_name = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Description for this custom dimension. Max length of 150 characters. + string description = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Immutable. The scope of this dimension. + DimensionScope scope = 5 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Optional. If set to true, sets this dimension as NPA and excludes it from ads + // personalization. + // + // This is currently only supported by user-scoped custom dimensions. + bool disallow_ads_personalization = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// A definition for a custom metric. +message CustomMetric { + option (google.api.resource) = { + type: "analyticsadmin.googleapis.com/CustomMetric" + pattern: "properties/{property}/customMetrics/{custom_metric}" + }; + + // Possible types of representing the custom metric's value. + // + // Currency representation may change in the future, requiring a breaking API + // change. + enum MeasurementUnit { + // MeasurementUnit unspecified or missing. + MEASUREMENT_UNIT_UNSPECIFIED = 0; + + // This metric uses default units. + STANDARD = 1; + + // This metric measures a currency. + CURRENCY = 2; + + // This metric measures feet. + FEET = 3; + + // This metric measures meters. + METERS = 4; + + // This metric measures kilometers. + KILOMETERS = 5; + + // This metric measures miles. + MILES = 6; + + // This metric measures milliseconds. + MILLISECONDS = 7; + + // This metric measures seconds. + SECONDS = 8; + + // This metric measures minutes. + MINUTES = 9; + + // This metric measures hours. + HOURS = 10; + } + + // The scope of this metric. + enum MetricScope { + // Scope unknown or not specified. + METRIC_SCOPE_UNSPECIFIED = 0; + + // Metric scoped to an event. + EVENT = 1; + } + + // Labels that mark the data in this custom metric as data that should be + // restricted to specific users. + enum RestrictedMetricType { + // Type unknown or unspecified. + RESTRICTED_METRIC_TYPE_UNSPECIFIED = 0; + + // Metric reports cost data. + COST_DATA = 1; + + // Metric reports revenue data. + REVENUE_DATA = 2; + } + + // Output only. Resource name for this CustomMetric resource. + // Format: properties/{property}/customMetrics/{customMetric} + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Immutable. Tagging name for this custom metric. + // + // If this is an event-scoped metric, then this is the event parameter + // name. + // + // May only contain alphanumeric and underscore charactes, starting with a + // letter. Max length of 40 characters for event-scoped metrics. + string parameter_name = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Required. Display name for this custom metric as shown in the Analytics UI. + // Max length of 82 characters, alphanumeric plus space and underscore + // starting with a letter. Legacy system-generated display names may contain + // square brackets, but updates to this field will never permit square + // brackets. + string display_name = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Description for this custom dimension. + // Max length of 150 characters. + string description = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The type for the custom metric's value. + MeasurementUnit measurement_unit = 5 [(google.api.field_behavior) = REQUIRED]; + + // Required. Immutable. The scope of this custom metric. + MetricScope scope = 6 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Optional. Types of restricted data that this metric may contain. Required for metrics + // with CURRENCY measurement unit. Must be empty for metrics with a + // non-CURRENCY measurement unit. + repeated RestrictedMetricType restricted_metric_type = 8 [(google.api.field_behavior) = OPTIONAL]; +} + +// Settings values for data retention. This is a singleton resource. +message DataRetentionSettings { + option (google.api.resource) = { + type: "analyticsadmin.googleapis.com/DataRetentionSettings" + pattern: "properties/{property}/dataRetentionSettings" + }; + + // Valid values for the data retention duration. + enum RetentionDuration { + // Data retention time duration is not specified. + RETENTION_DURATION_UNSPECIFIED = 0; + + // The data retention time duration is 2 months. + TWO_MONTHS = 1; + + // The data retention time duration is 14 months. + FOURTEEN_MONTHS = 3; + + // The data retention time duration is 26 months. + // Available to 360 properties only. + TWENTY_SIX_MONTHS = 4; + + // The data retention time duration is 38 months. + // Available to 360 properties only. + THIRTY_EIGHT_MONTHS = 5; + + // The data retention time duration is 50 months. + // Available to 360 properties only. + FIFTY_MONTHS = 6; + } + + // Output only. Resource name for this DataRetentionSetting resource. + // Format: properties/{property}/dataRetentionSettings + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The length of time that event-level data is retained. + RetentionDuration event_data_retention = 2; + + // If true, reset the retention period for the user identifier with every + // event from that user. + bool reset_user_data_on_new_activity = 3; +} diff --git a/java-analytics-admin/versions.txt b/java-analytics-admin/versions.txt index 2a781041eb78..c6ef244fd230 100644 --- a/java-analytics-admin/versions.txt +++ b/java-analytics-admin/versions.txt @@ -4,3 +4,5 @@ google-analytics-admin:0.11.0:0.11.1-SNAPSHOT grpc-google-analytics-admin-v1alpha:0.11.0:0.11.1-SNAPSHOT proto-google-analytics-admin-v1alpha:0.11.0:0.11.1-SNAPSHOT +proto-google-analytics-admin-v1beta:0.11.0:0.11.1-SNAPSHOT +grpc-google-analytics-admin-v1beta:0.11.0:0.11.1-SNAPSHOT